diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-05-31 11:33:19 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-05-31 11:33:53 +0200 |
commit | d2d5d24f86f12a2d1b0a6bc46c0d48306d7d2130 (patch) | |
tree | d67555a6c699c49a89ea10863b6c0e4c0c3f5cae /tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | |
parent | f9e951d0946fe0fcd51e9015108f92c46ecc8138 (diff) | |
parent | 42d864c86d8c85db7b2d42f8505d962a642e4c77 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I561c00b3a844ab493a5bf0148a5923662842cf5d
Diffstat (limited to 'tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp')
-rw-r--r-- | tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index df290babf..d717c6c8a 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -203,9 +203,6 @@ private Q_SLOTS: void progressSignal(); void urlChange(); void requestedUrlAfterSetAndLoadFailures(); - void javaScriptWindowObjectCleared_data(); - void javaScriptWindowObjectCleared(); - void javaScriptWindowObjectClearedOnEvaluate(); void asyncAndDelete(); void earlyToHtml(); void setHtml(); @@ -3921,48 +3918,6 @@ void tst_QWebEnginePage::requestedUrlAfterSetAndLoadFailures() QVERIFY(!spy.at(1).first().toBool()); } -void tst_QWebEnginePage::javaScriptWindowObjectCleared_data() -{ - QTest::addColumn<QString>("html"); - QTest::addColumn<int>("signalCount"); - QTest::newRow("with <script>") << "<html><body><script>i=0</script><p>hello world</p></body></html>" << 1; - // NOTE: Empty scripts no longer cause this signal to be emitted. - QTest::newRow("with empty <script>") << "<html><body><script></script><p>hello world</p></body></html>" << 0; - QTest::newRow("without <script>") << "<html><body><p>hello world</p></body></html>" << 0; -} - -void tst_QWebEnginePage::javaScriptWindowObjectCleared() -{ -#if !defined(QWEBENGINEPAGE_JAVASCRIPTWINDOWOBJECTCLEARED) - QSKIP("QWEBENGINEPAGE_JAVASCRIPTWINDOWOBJECTCLEARED"); -#else - QWebEnginePage page; - QSignalSpy spy(&page, SIGNAL(javaScriptWindowObjectCleared())); - QFETCH(QString, html); - page.setHtml(html); - - QFETCH(int, signalCount); - QCOMPARE(spy.count(), signalCount); -#endif -} - -void tst_QWebEnginePage::javaScriptWindowObjectClearedOnEvaluate() -{ -#if !defined(QWEBENGINEPAGE_EVALUATEJAVASCRIPT) - QSKIP("QWEBENGINEPAGE_EVALUATEJAVASCRIPT"); -#else - QWebEnginePage page; - QSignalSpy spy(&page, SIGNAL(javaScriptWindowObjectCleared())); - page.setHtml("<html></html>"); - QCOMPARE(spy.count(), 0); - page.evaluateJavaScript("var a = 'a';"); - QCOMPARE(spy.count(), 1); - // no new clear for a new script: - page.evaluateJavaScript("var a = 1;"); - QCOMPARE(spy.count(), 1); -#endif -} - void tst_QWebEnginePage::asyncAndDelete() { QWebEnginePage *page = new QWebEnginePage; |