diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-03-01 15:06:08 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2016-05-30 09:39:07 +0000 |
commit | c004741cb56c26fcb37ed4de10d063d120af39b9 (patch) | |
tree | 9b0d5dd088399570567c8b2bf5c0cc20881cec32 /tests | |
parent | f531565348e550bc2e03917874009331556f0d66 (diff) |
Remove tests for the javaScriptWindowObjectCleared signal
We have no equivalent of QWebFrame::javaScriptWindowObjectCleared and
won't need it.
Change-Id: I998e0412256887414c125df9ab994216dee22dc9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-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 f29b24933..75d186bba 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -202,9 +202,6 @@ private Q_SLOTS: void progressSignal(); void urlChange(); void requestedUrlAfterSetAndLoadFailures(); - void javaScriptWindowObjectCleared_data(); - void javaScriptWindowObjectCleared(); - void javaScriptWindowObjectClearedOnEvaluate(); void asyncAndDelete(); void earlyToHtml(); void setHtml(); @@ -3918,48 +3915,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; |