Title: [133039] trunk/Source/WebKit2
Revision
133039
Author
kbal...@webkit.org
Date
2012-10-31 09:45:44 -0700 (Wed, 31 Oct 2012)

Log Message

[Qt][WK2] Fix "Unable to find a renderable master window QQuickView" warnings in tst_QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=100247

Reviewed by Jocelyn Turcotte.

Make sure we have a visible window for tests that want to render.

* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::showWebView):
(tst_QQuickWebView::removeFromCanvas):
(tst_QQuickWebView::multipleWebViewWindows):
(tst_QQuickWebView::multipleWebViews):
(tst_QQuickWebView::basicRenderingSanity):
(tst_QQuickWebView::transparentWebViews):
Removed some unnecessary resize now that the window have a default size.
* UIProcess/API/qt/tests/testwindow.h:
(TestWindow): Resize the window to a default size at construction.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (133038 => 133039)


--- trunk/Source/WebKit2/ChangeLog	2012-10-31 16:42:25 UTC (rev 133038)
+++ trunk/Source/WebKit2/ChangeLog	2012-10-31 16:45:44 UTC (rev 133039)
@@ -1,3 +1,23 @@
+2012-10-31  Balazs Kelemen  <kbal...@webkit.org>
+
+        [Qt][WK2] Fix "Unable to find a renderable master window QQuickView" warnings in tst_QQuickWebView
+        https://bugs.webkit.org/show_bug.cgi?id=100247
+
+        Reviewed by Jocelyn Turcotte.
+
+        Make sure we have a visible window for tests that want to render.
+
+        * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
+        (tst_QQuickWebView::showWebView):
+        (tst_QQuickWebView::removeFromCanvas):
+        (tst_QQuickWebView::multipleWebViewWindows):
+        (tst_QQuickWebView::multipleWebViews):
+        (tst_QQuickWebView::basicRenderingSanity):
+        (tst_QQuickWebView::transparentWebViews):
+        Removed some unnecessary resize now that the window have a default size.
+        * UIProcess/API/qt/tests/testwindow.h:
+        (TestWindow): Resize the window to a default size at construction.
+
 2012-10-31  Thiago Marcos P. Santos  <thiago.san...@intel.com>
 
         [EFL] WebContext::platformDefaultIconDatabasePath() should return a path to a file

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp (133038 => 133039)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp	2012-10-31 16:42:25 UTC (rev 133038)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp	2012-10-31 16:45:44 UTC (rev 133039)
@@ -258,11 +258,8 @@
 
 void tst_QQuickWebView::showWebView()
 {
-    webView()->setSize(QSizeF(300, 400));
-
     webView()->setUrl(QUrl::fromLocalFile(QLatin1String(TESTS_SOURCE_DIR "/html/direct-image-compositing.html")));
     QVERIFY(waitForLoadSucceeded(webView()));
-
     m_window->show();
     // This should not crash.
     webView()->setVisible(true);
@@ -295,13 +292,11 @@
     QQuickWebView* webView2 = newWebView();
     QScopedPointer<TestWindow> window2(new TestWindow(webView2));
 
-    webView1->setSize(QSizeF(300, 400));
     webView1->setUrl(QUrl::fromLocalFile(QLatin1String(TESTS_SOURCE_DIR "/html/scroll.html")));
     QVERIFY(waitForLoadSucceeded(webView1));
     window1->show();
     webView1->setVisible(true);
 
-    webView2->setSize(QSizeF(300, 400));
     webView2->setUrl(QUrl::fromLocalFile(QLatin1String(TESTS_SOURCE_DIR "/html/basic_page.html")));
     QVERIFY(waitForLoadSucceeded(webView2));
     window2->show();
@@ -334,14 +329,10 @@
 void tst_QQuickWebView::basicRenderingSanity()
 {
     showWebView();
-    webView()->setSize(QSizeF(300, 400));
 
     webView()->setUrl(QUrl(QString::fromUtf8("data:text/html,<html><body bgcolor=\"#00ff00\"></body></html>")));
     QVERIFY(waitForLoadSucceeded(webView()));
 
-    // We have to explicitly move the window into the screen, otherwise it's not rendered.
-    m_window->setGeometry(0, 0, 300, 400);
-    m_window->show();
     // This should not crash.
     webView()->setVisible(true);
     QTest::qWait(200);

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/testwindow.h (133038 => 133039)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/testwindow.h	2012-10-31 16:42:25 UTC (rev 133038)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/testwindow.h	2012-10-31 16:45:44 UTC (rev 133039)
@@ -44,6 +44,7 @@
 {
     Q_ASSERT(webView);
     webView->setParentItem(contentItem());
+    resize(300, 400);
 }
 
 inline void TestWindow::resizeEvent(QResizeEvent* event)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to