summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptengine
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.6-s60' into 4.7-s60axis2010-03-221-3/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe mkspecs/common/symbian/symbian.conf src/gui/graphicsview/qgraphicswidget.h src/gui/kernel/qapplication.cpp src/gui/text/qtextlayout.cpp src/openvg/qpixmapdata_vg.cpp src/s60installs/s60installs.pro tools/runonphone/main.cpp tools/runonphone/serenum_unix.cpp qtextlayout.cpp fixed up together with Eskil. Kept the configure.exe from 4.7 without recompile.
| * installTranslatorFunctions doesn't work for custom global objectKent Hansen2010-03-191-3/+28
| | | | | | | | | | | | | | | | | | | | | | Regression against the old back-end. Don't set the translator properties on the original global object but rather on the active one (except for String.prototype.arg, which should always be added to the original String constructor to match 4.5 behavior). Task-number: QTBUG-6437 Reviewed-by: Jedrzej Nowacki
* | QtScript: Fix regression when calling newQObject() from native constructorKent Hansen2010-03-161-0/+20
|/ | | | | | | | The thisObject passed to native constructors did not have all the new structure flags, so if it was promoted to a QObject (using the overload of newQObject() that takes an existing script object as first argument), the resulting script object did not receive dynamic property access callbacks.
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fix garbage collection issue with script-owned objects with connectionsKent Hansen2009-11-301-0/+18
| | | | | | | | | | This reinstates the pre-4.6 behavior: A script-owned C++ object that's not referenced anymore should be garbage collected, even if it has connections. In order to achieve this, the "weak" reference to the C++ object's wrapper must be invalidated. Task-number: QTBUG-6366 Reviewed-by: Simon Hausmann
* update autotest to match 4.6 behaviorKent Hansen2009-11-231-9/+14
| | | | | In 4.6 the Global Object no longer has an arguments property with undefined value; there should be no such property.
* Add reference to JIRA task for expected test failureKent Hansen2009-11-231-1/+1
|
* Add references to JIRA tasks for expected test failuresKent Hansen2009-11-231-4/+4
| | | | | | These are behavioral differences between QtScript in 4.6 and 4.5, and so should have tasks to figure out whether anyone actually depend on the behavior.
* API review: QRegExp::numCaptures() -> QRegExp::captureCount()Marius Storm-Olsen2009-11-061-1/+1
| | | | | | | QRegExp::numCaptures() is marked as obsolete. Replaced all usage in Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* Say hello to QScriptProgram :-)Kent Hansen2009-10-281-0/+149
| | | | | | | | | | | QScriptProgram encapsulates a Qt Script program (AKA a script). It retains the compiled representation of the script, so that repeated evaluation of the same script becomes faster. An overload of QScriptEngine::evaluate() that takes a QScriptProgram has been added. Reviewed-by: Olivier Goffart
* tests/auto/qscriptengine/qscriptengine.pro Windows CE fixJoerg Bornemann2009-10-071-1/+6
| | | | Reviewed-by: TrustMe
* attempt to make QScriptEngine::collectGarbage() autotest more robustKent Hansen2009-10-021-9/+23
| | | | | | | Since the GC looks for pointers in the C stack, try to kill those pointers before calling collectGarbage(). Reviewed-by: Simon Hausmann
* Fix column number provided to QScriptEngineAgentKent Hansen2009-10-011-1/+0
| | | | | | | | Introduced a helper function in our custom source provider, columnNumberFromOffset(), that maps an absolute offset in the source input to a relative column number. Reviewed-by: Jedrzej Nowacki
* add test case for wrong error message in qtscriptKent Hansen2009-09-251-0/+11
|
* Removed explicit TARGET.EPOCHEAPSIZE statements from script testsMiikka Heikkinen2009-09-231-1/+0
| | | | | | | | Large enough max heap for script tests is now defined by default for all tests in qttest_p4.prf, so removed the statements from individual script tests. Reviewed-by: Janne Anttila
* Fix tst_QScriptEngine::throwErrorFromProcessEventsOlivier Goffart2009-09-221-1/+0
| | | | | | | | | | The problem is that the interpreter did not check for exception while running the "while(true){}" loop, as it deduced that none of the generated opcode would possibly generate an exception. The solution is to force a check right after we come from a timeout. Reviewed-by: Kent Hansen
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp 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/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/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | implement proxying of JSObject::putWithAttributes() on Global ObjectKent Hansen2009-08-261-0/+25
| | | | | | | | | | | | Otherwise the property is stored on the wrong object (the proxy). This fix makes the Qt bindings generated by qtscriptgenerator work again.
* | Memory leak in QScriptEngineAgent.Olivier Goffart2009-08-251-0/+1
| | | | | | | | | | | | | | The documentation of the agent constructor specify that the agant is owned by the engine. Even if the agent is not set to the engine Reviewed-by: Kent Hansen
* | QScriptValue: No need to create the activation object for call or constructOlivier Goffart2009-08-241-9/+23
| | | | | | | | It is uneeded and add useless overhead
* | Merge commit 'qt/master'Jason Barron2009-08-211-115/+676
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | 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.
| * | move the builtinFunctionNames test to qscriptengine autotestsKent Hansen2009-08-191-0/+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.
| * | 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.
| * | remove expected failures, mark expected failureKent Hansen2009-08-181-3/+1
| | |
| * | 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
| * | 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
| * | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-121-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Test the same code as in the documentation for closuresOlivier Goffart2009-08-101-0/+32
| | | |
| * | | mark expected failures for QObject GC-related testsKent Hansen2009-08-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the JSC-based back-end, script-owned QObjects are not always deleted immediately by the GC. I don't know what precisely determines the deletion time yet. (Inserting a qDebug() before evaluate("gc()") seems to fix it, though...)
| * | | finish implementation of QScriptEngine::importExtension()Kent Hansen2009-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | Added the properties to the activation object: __extension__, __setupPackage__ and __postInit__.
| * | | skip QScriptEngine::newActivationObject() testKent Hansen2009-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | It's an internal function, and currently not implemented in the JSC-based back-end.
| * | | remove two expected failures for backtrace()Kent Hansen2009-08-101-2/+0
| | | | | | | | | | | | | | | | | | | | QScriptContext::backtrace() is implemented now (since commit 34511e1001471ed4041794640aefe508f50ad01c), so the tests work.
| * | | mark function scopes test as expected failureKent Hansen2009-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | QScriptValue::scope() and QScriptValue::setScope() are internal function that we don't implement fully in the JSC-based back-end.
| * | | make native function scopes test passKent Hansen2009-08-101-1/+1
| | | | | | | | | | | | | | | | Missing parentheses in function expression (JSC requires them).
| * | | make the global object properties test passKent Hansen2009-08-101-1/+2
| | | | | | | | | | | | | | | | Accept the presence of a JSON object.
| * | | finish implementation of QVariant.prototype.toString()Kent Hansen2009-08-061-1/+0
| | | | | | | | | | | | | | | | Behave like the old back-end.
| * | | give Error constructors DontEnum attributeKent Hansen2009-08-061-6/+0
| | | | | | | | | | | | | | | | As per ECMA-262, chapter 15.
| * | | RegExp.prototype.toString() when pattern is emptyKent Hansen2009-08-051-2/+0
| | | | | | | | | | | | | | | | | | | | Like ECMA-262 says, // starts a single-line comment; /(?:)/ represents an empty regular expression.
| * | | make QScriptEngine::newQMetaObject() workKent Hansen2009-08-051-3/+0
| | | |
| * | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-051-0/+29
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: src/script/qscriptextqobject.cpp
| * | | | clear abort flag when we start a new evaluateKent Hansen2009-08-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Otherwise evaluate() would _always_ return the value previously passed to abortEvaluation(), once a script had been aborted.
| * | | | Do not crash if using popContext() while the current context have not been ↵Olivier Goffart2009-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pushed Reviewed-by: Kent Hansen
| * | | | Implement QScriptEngine::abortEvaluation()Tor Arne Vestbø2009-08-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We store the abort-state in the TimeoutChecker, since that's where we'll mostly access it, but the abort result is stored in the QScriptEngine's d-pointer.
| * | | | Implement QScriptEngine::setProcessEventsInterval()Tor Arne Vestbø2009-08-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We're using a wrapper around TimeoutChecker, where we re-implement didTimeout() to call processEvents().