summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Test the activationObject for js functionsOlivier Goffart2009-08-101-0/+25
|
* more tests for the QScriptContext::argumentsObjectOlivier Goffart2009-08-101-4/+11
|
* Test the same code as in the documentation for closuresOlivier Goffart2009-08-101-0/+32
|
* make QScriptContext::setScope() fail for object created in other engineKent Hansen2009-08-101-8/+15
| | | | | Also fix some autotest failures, improve the descriptions of failures, and make the tests run to completion.
* implement QScriptContext::setActivationObject()Kent Hansen2009-08-101-2/+6
|
* 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.
* implement QScriptContextInfo streaming from datastreamKent Hansen2009-08-101-3/+2
|
* implement QScriptContextInfo::parameterNames() for Qt methodsKent Hansen2009-08-101-9/+16
| | | | | | | | | | | | | | | It doesn't work for overloaded methods yet (unless you just happened to call the overload that's defined last in the source file). In the old back-end we stored the actual overload that was being called in the QScriptContextPrivate. Since QScriptContext is a JSC::ExecState now, we either have to add the information to JSC::ExecState, or add some mapping scheme so we can go determine the meta-index for a particular (ExecState, QtFunction) pair. Also in this commit: Marked expected failures, so the autotests will run to completion.
* implement QScriptClass property query semantics of old back-endKent Hansen2009-08-101-1/+3
| | | | | Look up the property as a normal JS property before falling back to the dynamic query mechanism. This is the documented behavior.
* implement QScriptContext::backtrace()Kent Hansen2009-08-101-1/+1
| | | | | Doesn't pass the test yet, but at least it returns something that might be useful on occasion.
* skip the QScriptContext::returnValue() testKent Hansen2009-08-101-2/+1
| | | | | returnValue() and setReturnValue() are internal functions not implemented in the JSC-based back-end.
* 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.
* make property flags lookup work for properties in prototype chainKent Hansen2009-08-101-0/+8
| | | | | JSObject::getPropertyAttributes() does not follow the prototype chain, so we have to do it.
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-1028-110/+310
|\ | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: src/script/api/qscriptable.cpp src/script/api/qscriptable_p.h src/script/qscriptclassdata.cpp
| * Add QBENCMARK_ONCE to QTestLib.Morten Sorvig2009-08-102-1/+15
| | | | | | | | | | | | | | | | | | | | The code block associated with QBENCHMARK_ONCE macro will only be executed once, whether the backend returns a valid result or not. The "-iterations" command line argument is also ignored. This is useful for benchmarking code that has side effects. Revby: jasplin
| * Make QTimeLine::start() restart from the beginning as the documentation says.David Faure2009-08-101-1/+40
| | | | | | | | | | | | | | | | | | The documentation implies that start restarts. Which it did, but only if the timeline was finished _and_ the duration hadn't been changed meanwhile. So after a setDuration(), start() would do nothing, which was unexpected. Merge-request: 1145 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| * Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtKeith Isdale2009-08-10139-344/+593
| |\
| | * Set default QGraphicsTransform3D axis to (0, 0, 1)Rhys Weatherley2009-08-101-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | The docs said that the default axis was (0, 0, 1), but the code and unit tests were using (0, 0, 0). Modify the code to match the docs because (0, 0, 0) is not very useful. Also optimize the calculation of sin/cos values for 90, 180, and 270 degrees. Reviewed-by: Aaron Kennedy
| | * QItemSelectionModel did not send selectionChanged signal when deleting an itemGabriel de Dietrich2009-08-071-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | in a tree-like model with one of its grand-children being selected. Added recursive deselection for the model. Task-number: 232634 Reviewed-by: thierry
| | * QDockWidget: Make visibilityChanged more accurateThierry Bastian2009-08-071-1/+18
| | | | | | | | | | | | Task-number: 258459
| | * Fixes: QComboBox keyboard search not working properly when current index is -1Olivier Goffart2009-08-071-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | If the current index is invalid, start would be (0,0) but would be skiped Task-number: 220195 Reviewed-by: thierry
| | * xmlpatterns autotest: make tests work from shadow directoryPeter Hartmann2009-08-072-67/+73
| | | | | | | | | | | | | | | | | | ... by prepending SRCDIR to the loaded files. Reviewed-by: TrustMe
| | * fixing qmainwindow autotestThomas Hartmann2009-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | | On windows mobile with native menubar integration the menubar is not a child of the mainwindow Reviewed-by: Joerg
| | * Extra check in pluginloader autotestThomas Hartmann2009-08-071-0/+1
| | | | | | | | | | | | | | | | | | This extra check prevents a crash if plugin loading fails Reviewed-by: Joerg
| | * Adding QApplication::processEvents to autotestThomas Hartmann2009-08-071-0/+1
| | | | | | | | | | | | | | | | | | Windows CE is sometimes a little bit slow Reviewed-by: Joerg
| | * Fixing deployment for shadow builds on Windows CEThomas Hartmann2009-08-072-3/+2
| | | | | | | | | | | | Reviewed-by: Joerg
| | * tst_QFile::copyAfterFail fixed on WindowsJoerg Bornemann2009-08-061-0/+1
| | | | | | | | | | | | | | | | | | We cannot remove a file that's still opened. Reviewed-by: ossi
| | * tst_qsharedpointer compile fix for Windows CEJoerg Bornemann2009-08-061-0/+4
| | | | | | | | | | | | | | | | | | There's no time() on Windows CE. Reviewed-by: Daniel Molkentin
| | * tst_qfileinfo fixed for Windows CEJoerg Bornemann2009-08-061-2/+8
| | | | | | | | | | | | | | | | | | | | | Win CE doesn't support real file permissions (FAT only). Further, we don't have pagefile.sys. Reviewed-by: thartman
| | * tst_QHostInfo: Disable short name tests for lookupIPv4.Jocelyn Turcotte2009-08-061-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | These tests run against domain names in troll.no and to allow shorter names the machine has to be in this domain. Removing them since this specific case test the OS more than Qt itself. Reviewed-by: Thiago
| | * tst_qstyle compile fixJoerg Bornemann2009-08-061-1/+1
| | | | | | | | | | | | Reviewed-by: thartman
| | * fix tst_qlocalsocket::readBufferOverflow for Windows CEJoerg Bornemann2009-08-061-3/+6
| | | | | | | | | | | | | | | | | | | | | The TCP socket must get the chance to read data into its read buffer after the first read operation emptied it. Reviewed-by: thartman
| | * fix warning in tst_qlocalsocketJoerg Bornemann2009-08-061-0/+1
| | | | | | | | | | | | Reviewed-by: thartman
| | * Fix a bug in QProcess. QProcess was not reentrant on UnixBenjamin Poulain2009-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QProcess is supposed to be reentrant but was not on Unix. The constructor of QProcessManager could be exectued several time when QProcess is created. The construction is now protected by a mutex. Task-number: 254246 Reviewed-by: Olivier Goffart
| | * Fixes autotests in QTreeWidget: setHeaderItem & defaultRowSizesLeonardo Sobral Cunha2009-08-061-4/+9
| | | | | | | | | | | | | | | | | | defaultRowSizes was broken on oxygen style because of missing icons. Reviewed-by: paul
| | * Delay too short after fullscreen window shown.Gabriel de Dietrich2009-08-061-2/+1
| | |
| | * Fix QXmlQuery autotestsPeter Hartmann2009-08-062-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | before, it asserted; now, the test is not asserting anymore but still failing, because the fix is not yet checked in. Additionally, it now runs from a shadow directory. Reviewed-by: TrustMe
| | * Fixes autotests in QFileSystemWatcher: watchFileAndItsDirectoryLeonardo Sobral Cunha2009-08-061-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | dnotify is something from older linux kernels and cannot be trusted, therefore we skip some tests. Also we cannot guarantee that 1 operation on the file give only 1 notification in general, so we relaxed the conditions. Reviewed-by: paul
| * | In a .pro file the include() function does not warn if specified fileKeith Isdale2009-08-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | can not be found change that behavior to warn by default. Currently the default behavior of include() in a .pro file is not to warn if the supplied file argument can not be found which can lead to hard to find build errors. The include() will now,by default, warn if the specified file can not be found. If a warning is not required because the included file is optional then example use in the .pro file: include(SomePriFile.pri", "", true) Task-number:259398 Reviewed-by:Marius Storm-Olsen
* | | merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-06151-459/+602
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
| * | QMenuBar: autotests fixedThierry Bastian2009-08-061-9/+5
| | | | | | | | | | | | | | | Apperently we don't get the leave event when simply moving the mouse with the testlib
| * | QMenuBar: we can't test the action geometries when it is nativeThierry Bastian2009-08-061-0/+3
| | |
| * | Skip tst_QWindowSurface::flushOutsidePaintEvent() when using composition managerJocelyn Turcotte2009-08-061-0/+6
| | | | | | | | | | | | | | | | | | | | | The first VERIFY_COLOR(w.geometry(), w.color); call was failing because the window was mapped but not yet painted on the screen. Reviewed-by: Bradley T. Hughes