summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'qt/master'Jason Barron2009-08-2132-1081/+2369
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/examples.pro qmake/Makefile.unix qmake/Makefile.win32 qmake/Makefile.win32-g++ qmake/Makefile.win32-g++-sh qmake/qmake.pro src/script/api/qscriptable.h src/script/api/qscriptclasspropertyiterator.h src/script/api/qscriptcontext.h src/script/api/qscriptengineagent.cpp src/script/api/qscriptstring.cpp src/script/api/qscriptstring.h src/script/api/qscriptvalueiterator.cpp src/script/api/qscriptvalueiterator.h src/script/qscriptclass.cpp src/script/qscriptcontext.cpp src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptvalue.cpp src/script/qscriptvalue_p.h src/script/qscriptvalueimplfwd_p.h src/script/script.pro src/src.pro tests/auto/auto.pro tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp tools/configure/configureapp.cpp
| * Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-211-32/+109
| |\ | | | | | | | | | qtscript-jsc-backend
| | * Merge branch 'kinetic-transform' of git@scm.dev.nokia.troll.no:qt/kineticRhys Weatherley2009-08-201-32/+109
| | |\
| | | * Remove QGraphicsTransform::project()Rhys Weatherley2009-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | QMatrix4x4::toTransform() now does what project() used to do. Reviewed-by: trustme
| | | * Re-implement QGraphicsTransform to use QMatrix4x4Rhys Weatherley2009-08-191-32/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTransform-based transformations create problems when performing X and Y axis rotations because they aren't using true 3D. This change modifies QGraphicsTransform and its sub-classes to use QMatrix4x4 as the standard transformation matrix, with a project() function to project back to 2D when required. Reviewed-by: trustme
| * | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-2022-63/+230
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
| | * | Extend testUndoBlock() with a single command block insertmae2009-08-201-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Test a newly discovered bug when a beginEditBlock()/endEditoBlock() contains only one single insertion command. It should still be treated as an undo block of its own.
| | * | split the qstringbuilder autotest into fourhjk2009-08-2015-43/+38
| | | | | | | | | | | | | | | | | | | | Some S60 and WinCE test scripts prefer to have only one executable per directory.
| * | | use a list to keep track of registered script valuesKent Hansen2009-08-201-2/+0
| | | | | | | | | | | | | | | | Get rid of the hash.
| * | | QEXPECT_FAIL was removed.Jedrzej Nowacki2009-08-201-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Autotest's correction after 3062cd6395ba13746aea452eb53447d915184e2d Column numbers are calculated corectly Reviewed-by: Kent Hansen
| * | | make QScriptEngine::objectById() workKent Hansen2009-08-201-1/+3
| | | | | | | | | | | | | | | | | | | | It needs to work even when there is no public QScriptValue that holds a reference to the object.
| * | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-2019-4/+676
| |\ \ \ | | | | | | | | | | | | | | | qtscript-jsc-backend
| * | | | invalidate wrapped JSC::JSValue when script engine is deletedKent Hansen2009-08-191-3/+1
| | | | | | | | | | | | | | | | | | | | Otherwise we will crash if someone tries to do something with the value.
| * | | | Fix QScriptValue::objectId().Jedrzej Nowacki2009-08-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QScriptValue id were made persistent. It depands on JSC:JSValue JSCell pointer not on QScriptValuePrivate attr. Reviewed-by: Kent Hansen
| * | | | add more detailed tests for QRegExp <--> JS RegExp conversionKent Hansen2009-08-191-1/+19
| | | | |
| * | | | remove expected failureKent Hansen2009-08-191-1/+0
| | | | | | | | | | | | | | | | | | | | Works as of commit 5bca43cca3ac90429e3f9263d0d7ea8c9eb164d4.
| * | | | add test to make sure a JavaScript object's ID persistsKent Hansen2009-08-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if the QScriptValue is destroyed, the underlying ID should not change; e.g. if a new QScriptValue is created and wraps the same object, the ID should be the same as before.
| * | | | update expected output to match that of JSC-based qtscript back-endKent Hansen2009-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | Output of backtrace has changed slightly (e.g. "at" instead of "@").
| * | | | make QScriptEngine::isEvaluating() work for top-level evaluationKent Hansen2009-08-191-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since QScriptEngine::evaluate() doesn't create a new stack frame anymore, we need to use a dedicated variable to keep track of whether the engine is currently evaluating or not.
| * | | | move the builtinFunctionNames test to qscriptengine autotestsKent Hansen2009-08-192-198/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the JSC-based back-end, stack frames aren't created when calling any of the built-in ECMA functions, so we can't base the test on that. Instead, just look up the "name" property of each function and check that it has the expected value.
| * | | | only add qtscript autotests if qt is configured appropriatelyKent Hansen2009-08-191-13/+15
| | | | |
| * | | | make moc autotest compile without qtscriptKent Hansen2009-08-192-1/+4
| | | | |
| * | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-19122-419/+531
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | qtscript-jsc-backend
| * | | | Fix the QScriptContext::argumentsObject and QScriptContext::argument for js ↵Olivier Goffart2009-08-181-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions On js functions, if the number of arguments is different from the number of expected arguments, they are located in different place in the stackframe. We need to call the JSC functions that take that into account. Test is the backtrace test Reviewed-by: Kent Hansen
| * | | | Fix the line numbers on the backtraceOlivier Goffart2009-08-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The returnPC points to the opcode after the call, but we want the opcode right before to compute the line number. Reviewed-by: Kent Hansen
| * | | | implement getter/setter proxying for Global Object and activation objectKent Hansen2009-08-181-0/+25
| | | | |
| * | | | adopt same ownership relationship of scriptengine agents as in old back-endKent Hansen2009-08-181-7/+29
| | | | | | | | | | | | | | | | | | | | The engine owns its agents, and also knows when they are deleted.
| * | | | Few autotest QEXCPECT_FAIL markup.Jedrzej Nowacki2009-08-181-39/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some test from qscriptengineagent were marked as excpected_fail. It should be easier to find regression. Reviewed-by: Kent Hansen
| * | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-1817-548/+79
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: src/script/qscriptclass.cpp src/script/qscriptcontext.cpp src/script/qscriptengine.cpp src/script/qscriptvalue.cpp
| * | | | | remove expected failures, mark expected failureKent Hansen2009-08-181-3/+1
| | | | | |
| * | | | | add a test for comparing Q{Object,Variant} wrappers from scriptKent Hansen2009-08-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the old back-end, this worked because we extended the ECMA comparison algorithm to treat QObject and QVariant wrappers specially. Instead of comparing the script objects (which would always fail), we compared the wrapped values (which could be the same in both wrappers). In the new JSC-based back-end this currently fails. We would have to add a hack (QtScript-specific ifdef) to JSC in order to support it.
| * | | | | adopt variant-to-string conversion of the original qtscript back-endKent Hansen2009-08-171-0/+12
| | | | | |
| * | | | | test default scope chain after a new context has been pushedKent Hansen2009-08-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scope chain should contain the activation object and the Global Object.
| * | | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-1734-19/+264
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend
| * | | | | | push the right object when the argument is the Global ObjectKent Hansen2009-08-141-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the internal Global Object is never exposed to the public, we need to do like we do in setActivationObject(): if the object passed is the Global Object proxy, use the internal Global Object as the "real" argument. (JSC requires that the initial object pushed onto the scope chain is an instance of JSC::JSGlobalObject, and the Global Object proxy is not; hence, we can't push the proxy.)
| * | | | | | Detect evaluation context in the backtraceOlivier Goffart2009-08-141-2/+2
| | | | | | |
| * | | | | | More polishing on the backtraceOlivier Goffart2009-08-141-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change the coding style of function from foo (arg=text) to foo(arg = 'text')
| * | | | | | more extensive backtrace testOlivier Goffart2009-08-141-12/+93
| | | | | | |
| * | | | | | Polish the QScriptContext::backtrace()Olivier Goffart2009-08-142-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - in QScriptContextInfo, get the filename of specials context - in QScriptContextInfo, get the right information for the global context (from the skipped fake frame) - addapt the test to the current backtrace layout.
| * | | | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-1419-387/+1291
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend
| * | | | | | | make sure QScriptContext::scopeChain() returns the right objectKent Hansen2009-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to commit e0a86dc604b87921652b844a5f85889bb6291ed9. Just like in the activationObject() function, we need to check if the activation object is actually a proxy to another object, and return that other object if that's the case (the proxy object should not be exposed to the public).
| * | | | | | | make it possible for any script object to serve as activation objectKent Hansen2009-08-141-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was possible in the old back-end. In JSC, activation objects have to be instances of JSC::JSVariableObject. So the way we solve it is by having our QScriptActivationObject be able to act as a proxy to any other JSObject.
| * | | | | | | Skip the fake context created by Interpreter::exucute for the backtraceOlivier Goffart2009-08-141-6/+0
| | | | | | | |
| * | | | | | | Lazily construct the QScriptActivationObjectOlivier Goffart2009-08-131-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can store flags on the ReturnValueRegister entry in the stackframe header (as native function don't use that) Then when requesting an activation object we can lookup the flags to know if we should create it. This reduce a lot the cost of a native call. Reviewed-by: Kent Hansen
| * | | | | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-12131-2988/+4061
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend
| * | | | | | | | Refactor the way the JS stack are created for native functionOlivier Goffart2009-08-121-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original JavaScriptCore doesn't create stack frame or scope for native function. JSC has been patched to support that. This commit revert our patches to JSC, and implement create the stack frame from QScript Reviewed-by: Kent Hansen
| * | | | | | | | Autotests refactoringJedrzej Nowacki2009-08-121-94/+329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many tests were divided into smaller pieces. Some XFAIL added. Small improvements.
| * | | | | | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-12994-3224/+5937
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: configure src/script/qscriptarray_p.h src/script/qscriptasm.cpp src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata.cpp src/script/qscriptclassdata_p.h src/script/qscriptclassinfo_p.h src/script/qscriptclasspropertyiterator_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptcontextinfo_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmaboolean_p.h src/script/qscriptecmacore.cpp src/script/qscriptecmacore_p.h src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptengineagent_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptextvariant_p.h src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptglobals_p.h src/script/qscriptmember_p.h src/script/qscriptnameid_p.h src/script/qscriptnodepool_p.h src/script/qscriptobject_p.h src/script/qscriptobjectfwd_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptsyntaxcheckresult_p.h src/script/qscriptvalue.cpp src/script/qscriptvalue_p.h src/script/qscriptvaluefwd_p.h src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptvalueiteratorimpl_p.h
| * | | | | | | | | make it possible to pop all items in a scope chain and then push to itKent Hansen2009-08-111-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of the JSC::ExecState functions rely on scopeChain() not being 0. This means we shouldn't pop the scope chain if doing so would make it empty; otherwise when you call e.g. pushScope() or evaluate(), you will crash. So instead of popping the chain completely, we now set the sole scope chain item's object pointer to 0 and add appropriate checks elsewhere. A second issue, not solved in this commit, is that JSC expects the Global Object to always be the last item in every scope chain. If it's not, you will crash.
| * | | | | | | | | Fix line number and arguments in QScriptContext::toStringOlivier Goffart2009-08-112-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For arguments, we always need to skip the implicit 'this' argument For line number, we walk thought the stack frames from the top to find the one above the requested one, which contains the returnPC we need. Also fixed a crash because QScriptContext::parentContext would have returned a pointer with flags inside. Reviewed-by: Kent Hansen