aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Fix tst_qqmlecmascript::functionAssignment_fromJSSimon Hausmann2013-06-181-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the test-case compile with strict mode, where function declarations are not allowed within blocks. An alternative would be to use function expressions here. Change-Id: If7e1cc23ef4a0c6a83e4ba8ae03dc9c6b678730d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix two more errors in the worker script auto testLars Knoll2013-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib1359a985efae18cd4fc8344b81092af57f1a9d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix url test in qqmllanguageSimon Hausmann2013-06-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In V4 URLs were mapped to strings, with V8 they were mapped to opaque variants, which is also what we do with v4 at the moment. In the future we want to provide a real JS API for URLs, but that is a feature that should be discussed in a wider scope and developed on the dev branch. Change-Id: I17660066b2797239eddebad03f49ffa424f86f78 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix the console autotestsLars Knoll2013-06-171-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8936c6baa274e673c23c65637fa199a6140e0a15 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix qmlmin testLars Knoll2013-06-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exclude the test262 test suite, as qmlmin can't deal with all of the test cases there. Change-Id: Ie56c0d9adecc6b1ae0ddcbcd3edd5b0eaf30cd4d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix the remaining test failures in the jsonbinding autotestLars Knoll2013-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip properties that are function objects when converting a V4 Object to a QJsonObject. For arrays the function object gets replaced with null. Fix the test case for arrays to have the correct expected output. Change-Id: I3ee63935d038e0922e33ac6e64e9c31ecfbd4a7e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix and enable the qmldirparser autotestLars Knoll2013-06-173-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2e9b64e5df63dbd9fffc204b7058d3c77255b09c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix most qjsonbinding auto testsLars Knoll2013-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I67476bc7e931e2f4790e859d4a3c00c050752271 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Mark the eval() test as xfailSimon Hausmann2013-06-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eval() works differently in strict mode, and it's nicely covered by test262 Change-Id: I9bb84753032d5106c94d78afe765680f3d85348d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Adjust expected error message for qqmlecmascript::qtbug_22843Simon Hausmann2013-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib6f58c2d7ee5e4f03fcc755d2290bdf204e3aa61 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Re-enable two disabled var property tests and make them passSimon Hausmann2013-06-151-30/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When marking the var properties of a VME-metaobject (we decided to keep its QObject alive), then we must also mark the var properties of the parent VME-metaobject. The two property var inheritance tests verify that. Change-Id: If1f0d4f3daef78d42adb7052cc1ce7bbdd6da585 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix qqmlproperty::warnOnInvalidBindingSimon Hausmann2013-06-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add column to expected warning message * Get rid of eval that doesn't make sense with only one JS engine and doesn't work in strict mode Change-Id: I63cd3784cd8c255af8832ea5ca1e6e5e2d48431e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Comment out test of octal numbersLars Knoll2013-06-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't currently support octal numbers in v4 Change-Id: Icb31d399a199eb573068b431954a22d169de9b9e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Implement error.fileName and error.lineNumberLars Knoll2013-06-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Useful extensions to the error object. This also helped track down a few places in the parser where we wouldn't give correct error information. Change-Id: Id03653e096216e097c13a7a6e698ca142d92da13 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Remove test case that violates the ecma specLars Knoll2013-06-131-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's actually also hard for us to support this properly, so let's simply not do it. Change-Id: I107e1c1f482d64c9d4d58c805e0446e76e85d840 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix test caseLars Knoll2013-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The for..in statements behavior is actually undefined when it comes to inserting values into the object being iterated over. Simply adjust the test case to the v4 behavior. Change-Id: I85774ae98810d8c14ee457138ccc54082de47802 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix qqmlecmascript::propertyVarOwnershipSimon Hausmann2013-06-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't rely on o = new Date in the test-case to really clear the last "reference" on the stack. As it turns out, in v4, we sometimes allocate the result of "new Date" in a different slot and the old slot is still around (and thus the object is visible and marked). Instead work with separate scopes, which requires a little helper function in JS. Change-Id: I5f318feaccfc7d83dbe28be043a0ee83e0c16355 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Don't allow for a QJSValue to be taken from one engine to another through ↵Simon Hausmann2013-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QVariant Change-Id: I21127d22f595b0ff88f6073bddf617423ad17867 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix test case. QDateTime actually writes milliseconds since 5.2Lars Knoll2013-06-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I21a7b63175b173a5036892dd932614a299d519c3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Properly implement Object.prototype.__proto__Lars Knoll2013-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5c3247f46cd86020425f6df8674f8bda7410757b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Cosmetic: Silence the with statement warnings, in addition to the XFAILSimon Hausmann2013-06-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8a89acc93f1446a5ef6cb8441a8ad9b48c4fb752 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix tst_qqmlecmascript::callQtInvokablesSimon Hausmann2013-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to set inheritContext to true, to run the sample scripts the same way as we run QML right now: with lookups disabled. Lookups with custom get() don't work right now and cause the tests to fail lookup properties in QObject. Change-Id: I22a1133d5d568935c64fc5162445a438665713b8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix exception type when trying to assign to read-only QObject propertiesSimon Hausmann2013-06-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [[Put]] throws a type error, and so should the put operation on a QObject Change-Id: I8fad91f3969c1889381d67d8d0ff751a91f8239e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix diagnostic error message when put fails because of a read-only propertySimon Hausmann2013-06-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9310c160386e9610d76ae0a8b3228b22757d5a02 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix toString lookups on QObject bindings (And thus ↵Simon Hausmann2013-06-131-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qqmlecmascript::toObjectString) Change-Id: I20e5788e8810d9354ca51245ee05181c9f4648ae Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix syntax error propagationSimon Hausmann2013-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For syntax errors we use the DiagnosticMessage type in qv4context.cpp, that contains detailed information about the error. We must catch that error correctly in QQmlVME::run and report it to the engine. Change-Id: I8f53c7db8dbdc6afa72396f3c25537690a6f5841 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Mark test using with statement as expected failureSimon Hausmann2013-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We run QML bindings in JS strict mode now, where with is not supported Change-Id: I7e1b2747c50f9affdb6b7cfa80287f1f198ad930 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Remove last traces of v8 API and v8 compatibility layerSimon Hausmann2013-06-123-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The debugger and profiler service remain as bigger parts that need to be ported properly to v4. Change-Id: I68e72d6db66fe497eb58ed60df417ffe4662d115 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Small fix in tst_qqmlecmascriptSimon Hausmann2013-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EVALUATE_ERROR is supposed to return true if an exception was caught Change-Id: I8371206e4a4e9d0c3d40ef09cf61d28ed19e40aa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix qqmlecmascript::enums and nonNotifyableSimon Hausmann2013-06-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the v8 bindings in expressionIdentifier we used to print the url with line number and only in the base class we printed the expression itself. With qv8bindings.cpp gone, we can do that now in the base class, as expected by the test. Adjusted the test also by columns. Change-Id: I8d532d21baf5bf2fbfcca56c2657a1d65025fe84 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix qqmlecmascript::sequenceConversionBindingsSimon Hausmann2013-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the expected error message with the missing column Change-Id: Iac6be0cdf7322bfb4289925c4bb67b5b2f0437f5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Remove failing testSimon Hausmann2013-06-082-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test doesn't seem to make sense anymore, as it tested an implementation aspect of the previous engine with the expression rewriter and v8 compilation. Change-Id: I17a83b82080ab567431d8dc403f14f5266a81ba4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix qqmlecmascript::signalWithJSValueInVariantSimon Hausmann2013-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use arguments.callee as we're now in strict mode :) Change-Id: I9992fd6d39a170ce6f6d751aa49393e50ca0e636 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix qqmlecmascript::nonExistentAttachedObjectSimon Hausmann2013-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add column to the expected error message output Change-Id: I585fdcedd7a78f1a208770765851f04ee5a5b207 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix a few more QJSValue autotestsLars Knoll2013-06-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie870da8f6b8f9e34221bbfd10f328df1dc363294 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix various errors in the qjsvalue auto testLars Knoll2013-06-071-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix creation of Array's from a QStringList Properly implement toVariant() Fix VariantObject::toString() Fix conversion of variant lists to JS values Remove an XFAIL Allow comparison of QJSValue objects created from different engines. There's no reason why we can't simply do this with v4. Change-Id: I8d8c597dbb032926501508d60bd80622ec964d67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix tst_qqmlecmascript::scriptErrors()Simon Hausmann2013-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * In the context wrapper, throw a real JS exception that when serialized to a string includes the "Error:" prefix (due to the error object's name) * Added column information to one of the expected error messages Change-Id: I4c1bc749f01425efb0a27121f7f1b8cf4946d644 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Fix tst_qqmlecmascript::signalArgumentsSimon Hausmann2013-06-073-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't check for arguments.callee, which is only available in non-strict mode Change-Id: I90851862e36e5bc7c518198f9fe5672178a3ec58 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Move QV4::QObjectWrapper into the v4/ subdirectorySimon Hausmann2013-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1c5b3e343e259adbf2f1ff3fa7b2ff225eb9b192 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Improve type error messages when reading propertiesSimon Hausmann2013-06-051-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the expected output of the qobjectConnectionListExceptionHandling and while we're at it this patch also re-enables the importScripts test. The test expects similar output that now passes. importScripts_data produces two failures though, that are unrelated to expected error message but indicate real bugs. Change-Id: I606b8791524d19a4bb20a81c30abc2285a1a0a0f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Move QV8QObjectWrapper::newQObject into QV4::QObjectWrapperSimon Hausmann2013-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...where it is just called wrap(), because it doesn't always create a new JS wrapper for the QObject. Change-Id: Ieed0fc97174eb51cd04df0149e715c234a5822bd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Cleanups in QObject bindingsSimon Hausmann2013-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename v8object to jsWrapper in QQmlData * Rename v8objectid to jsEngineId, as that's the identifier of the engine that currently owns the primary JS wrapper This is in preparation for moving newObject away from QV8QObjectWrapper Change-Id: I6432365e849d159600e22f09e7e2ab2ae2117db6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Get rid of QV8Engine::toQObject and QV8QObjectWrapper::toQObjectSimon Hausmann2013-06-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8726148093079b3385c6b0f16284af0b5ba92066 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Port QObject bindings to use new castSimon Hausmann2013-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib0a8ba76df51276d53cf251b0ed979176e1fba01 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Start converting casting of Managed to subtypes to a better schemeLars Knoll2013-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is now a template based as<Foo>() method available in Managed, that'll allow casting to the proper subclass. It uses the pointer to the vtable and compares it to the classes static vtable for type checking. Like this we can avoid that Managed has to know about all subclasses. Change-Id: Ic966bbe00d85224b8d96cc0ff00f69a6ac67129e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix all autotests related to value typesLars Knoll2013-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 3 bugs in the new implementation, and adjust two expected error messages in the auto test. Change-Id: Ic3c08e54f9babc7e4779d67829e36f3ff805e127 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | | | Fix tst_qqmlecmascript::switchStatement()Simon Hausmann2013-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the expected error message output to include the column number instead of just the line number. Change-Id: Ie8064d6a26f875d8da5b0d68c503d632b6afc69e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Cleanup handlReferenceManagement auto testSimon Hausmann2013-05-281-41/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the vtable hacks with a simple property to maintain a GC visible object reference. Change-Id: Iae178d59dac23114353c152ef86224c9373a6025 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Implement JS ownership policy for var and variant propertiesSimon Hausmann2013-05-241-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of a GC callback, let's keep the lifecycle of the var properties and the QObject wrapped variants in sync with the lifecycle of the JS QObject wrapper, through a markObjects re-implementation. handleReferenceManagement test passes now, fixed a few incorrect gc() calls in there. Change-Id: I78e8ca700e41bba788b61d3816a77cfb3a7c5e58 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | | | Port Qt.include() over to v4Lars Knoll2013-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Still doesn't quite work as it should, but that's no regression to before neither. The reason is that the context handling is still v8 based and needs to be rewritten. Change-Id: I51216f93d6db4ba26f8adddaeb39d8a8c62df7ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>