diff options
author | John Reck <jreck@google.com> | 2010-11-04 12:00:17 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2010-11-09 11:35:04 -0800 |
commit | e14391e94c850b8bd03680c23b38978db68687a8 (patch) | |
tree | 3fed87e6620fecaf3edc7259ae58a11662bedcb2 /WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | |
parent | 1bd705833a68f07850cf7e204b26f8d328d16951 (diff) | |
download | external_webkit-e14391e94c850b8bd03680c23b38978db68687a8.zip external_webkit-e14391e94c850b8bd03680c23b38978db68687a8.tar.gz external_webkit-e14391e94c850b8bd03680c23b38978db68687a8.tar.bz2 |
Merge Webkit at r70949: Initial merge by git.
Change-Id: I77b8645c083b5d0da8dba73ed01d4014aab9848e
Diffstat (limited to 'WebKit/qt/tests/qwebpage/tst_qwebpage.cpp')
-rw-r--r-- | WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 0462953..e6b5909 100644 --- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -77,7 +77,6 @@ private slots: void cleanupTestCase(); void acceptNavigationRequest(); - void infiniteLoopJS(); void geolocationRequestJS(); void loadFinished(); void acceptNavigationRequestWithNewWindow(); @@ -128,6 +127,7 @@ private slots: void testStopScheduledPageRefresh(); void findText(); void supportedContentType(); + void infiniteLoopJS(); private: QWebView* m_view; @@ -285,9 +285,9 @@ void tst_QWebPage::loadFinished() QSignalSpy spyLoadStarted(m_view, SIGNAL(loadStarted())); QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); - m_view->setHtml(QString("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html," - "<head><meta http-equiv='refresh' content='1'></head>foo \">" - "<frame src=\"data:text/html,bar\"></frameset>"), QUrl()); + m_view->page()->mainFrame()->load(QUrl("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html," + "<head><meta http-equiv='refresh' content='1'></head>foo \">" + "<frame src=\"data:text/html,bar\"></frameset>")); QTRY_COMPARE(spyLoadFinished.count(), 1); QTRY_VERIFY(spyLoadStarted.count() > 1); @@ -295,8 +295,8 @@ void tst_QWebPage::loadFinished() spyLoadFinished.clear(); - m_view->setHtml(QString("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html," - "foo \"><frame src=\"data:text/html,bar\"></frameset>"), QUrl()); + m_view->page()->mainFrame()->load(QUrl("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html," + "foo \"><frame src=\"data:text/html,bar\"></frameset>")); QTRY_COMPARE(spyLoadFinished.count(), 1); QCOMPARE(spyLoadFinished.count(), 1); } @@ -1516,11 +1516,6 @@ void tst_QWebPage::inputMethods() QString selectionValue = variant.value<QString>(); QCOMPARE(selectionValue, QString("eb")); - //Cancel current composition first - inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); - QInputMethodEvent eventSelection2("",inputAttributes); - page->event(&eventSelection2); - //Set selection with negative length inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); QInputMethodEvent eventSelection3("",inputAttributes); @@ -1887,7 +1882,8 @@ public: { ErrorPageExtensionReturn* errorPage = static_cast<ErrorPageExtensionReturn*>(output); - errorPage->content = "data:text/html,error"; + errorPage->contentType = "text/html"; + errorPage->content = "error"; return true; } }; @@ -1904,7 +1900,7 @@ void tst_QWebPage::errorPageExtension() page->mainFrame()->setUrl(QUrl("http://non.existent/url")); QTRY_COMPARE(spyLoadFinished.count(), 2); - QCOMPARE(page->mainFrame()->toPlainText(), QString("data:text/html,error")); + QCOMPARE(page->mainFrame()->toPlainText(), QString("error")); QCOMPARE(page->history()->count(), 2); QCOMPARE(page->history()->currentItem().url(), QUrl("http://non.existent/url")); QCOMPARE(page->history()->canGoBack(), true); @@ -1931,14 +1927,15 @@ void tst_QWebPage::errorPageExtensionInIFrames() ErrorPage* page = new ErrorPage; m_view->setPage(page); - m_view->setHtml(QString("data:text/html," - "<h1>h1</h1>" - "<iframe src='data:text/html,<p/>p'></iframe>" - "<iframe src='non-existent.html'></iframe>")); + m_view->page()->mainFrame()->load(QUrl( + "data:text/html," + "<h1>h1</h1>" + "<iframe src='data:text/html,<p/>p'></iframe>" + "<iframe src='http://non.existent/url'></iframe>")); QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); QTRY_COMPARE(spyLoadFinished.count(), 1); - QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error")); + QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("error")); m_view->setPage(0); } @@ -1952,7 +1949,7 @@ void tst_QWebPage::errorPageExtensionInFrameset() QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); QTRY_COMPARE(spyLoadFinished.count(), 1); - QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error")); + QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("error")); m_view->setPage(0); } |