summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port autotests from own waitForSignal() to QSignalSpy::wait()David Faure2016-11-291-10/+17
| | | | | | | | I added QSignalSpy::wait() in Qt 5.0 exactly for this purpose. Change-Id: I895a92f5f7e4e8554e00f6668e6973cc2c903adf Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix the IPC webChannelTransport not being available on reloadJocelyn Turcotte2016-06-131-2/+23
| | | | | | | | | | | | The gin JavaScript binging gets destroyed on page reload after all references to it disappear from the previous document. Do like other gin wrapper and reinstall the transport binding on DidCreateDocumentElement, following how it's done by the MojoBindingsController. Task-number: QTBUG-53411 Change-Id: Ibcd9ef9dbedc5762d4f2210fd81f68e5b9127680 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
* Add API to set WebChannel on isolated worldAllan Sandfeld Jensen2016-01-151-1/+69
| | | | | | | | | | | Make it possible to set a web-channel so that it can only be accessed by private scripts. Pulls in needed API extension in 3rdparty. Task-number: QTBUG-50318 Change-Id: I61bcce5c318dffe0a406ee8cddf31f58a021c22c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add methods for running javascript in isolated worldsAllan Sandfeld Jensen2016-01-081-0/+2
| | | | | | | | We exposed javascript worlds for user-scripts, this adds variants of runJavaScript that can access those worlds. Change-Id: I5a0b40b863b543cd364c902d0a84ae2c35e2a0b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* stabilize tst_QWebEngineScript::injectionPointJoerg Bornemann2015-11-121-4/+4
| | | | | | | | Use QTRY_COMPARE instead of a hard-coded timeout. Fix usage of setTimeout in DOMContentLoaded event listener. Change-Id: I915ea0d2c54cf45be42803963d03b19c15135fd4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Print JS console messages by defaultKai Koehne2015-11-061-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the behavior of QWebEnginePage/WebEngineView to print JavaScript console.warn and console.error messages by default in a 'js' logging category. This matches also the behavior for QtQml, where console messages end up in a 'qml' logging category by default. So far access to the JavaScript console required either use of the remote debugging functionality, subclassing of QWebEnginePage, or implementing a custom handler. Anyhow, even then writing a seamless forwarding of the data and metadata to the Qt message handler is difficult. This patches implements this forwarding by default. The behavior can be changed by either setting up rules for the 'js' category, e.g. setFilterRules("js.*=false"); or by implementing onJavaScriptConsoleMessage(), or overriding QWebEnginePage::javaScriptConsoleMessage. [ChangeLog] Unhandled JS console messages are now forwarded to to the Qt message handler inside a 'js' category. Change-Id: I5480383a80dcf7a122496f9b7915264ef9036db3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Enable build of QWebEngineScript API testSzabolcs David2015-04-071-24/+24
| | | | | | | The MSVC doesn't support this type of string literal concatenation. Change-Id: I051593a34c801df6c5264370ad751c45bbb41b5a Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* QWebEngineScript autotestPierre Rossi2015-03-181-0/+166
Change-Id: Id29c1ed0b29114f426c35a45192a723d305c5b29 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>