Title: [90181] trunk/Source/WebKit/qt
Revision
90181
Author
[email protected]
Date
2011-06-30 16:30:18 -0700 (Thu, 30 Jun 2011)

Log Message

2011-06-30  Rafael Brandao  <[email protected]>

        Reviewed by Benjamin Poulain.

        [Qt] Fix tst_QWebFrame::renderGeometry() API test
        https://bugs.webkit.org/show_bug.cgi?id=63236

        This test required a security origin with granted permission to request local resources.
        By default, only local files can load local resources. So modified baseUrl to be a local file.

        * tests/qwebframe/tst_qwebframe.cpp:
        (tst_QWebFrame::renderGeometry):

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (90180 => 90181)


--- trunk/Source/WebKit/qt/ChangeLog	2011-06-30 23:24:26 UTC (rev 90180)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-06-30 23:30:18 UTC (rev 90181)
@@ -1,3 +1,16 @@
+2011-06-30  Rafael Brandao  <[email protected]>
+
+        Reviewed by Benjamin Poulain.
+
+        [Qt] Fix tst_QWebFrame::renderGeometry() API test
+        https://bugs.webkit.org/show_bug.cgi?id=63236
+        
+        This test required a security origin with granted permission to request local resources.
+        By default, only local files can load local resources. So modified baseUrl to be a local file.
+
+        * tests/qwebframe/tst_qwebframe.cpp:
+        (tst_QWebFrame::renderGeometry):
+
 2011-06-27  Diego Gonzalez  <[email protected]>
 
         Reviewed by Antonio Gomes.

Modified: trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp (90180 => 90181)


--- trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp	2011-06-30 23:24:26 UTC (rev 90180)
+++ trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp	2011-06-30 23:30:18 UTC (rev 90181)
@@ -2898,7 +2898,10 @@
     QList<QWebFrame*> frames = page.mainFrame()->childFrames();
     QWebFrame *frame = frames.at(0);
     QString innerHtml("<body style='margin: 0px;'><img src=''/></body>");
-    frame->setHtml(innerHtml);
+
+    // By default, only security origins of local files can load local resources.
+    // So we should specify baseUrl to be a local file in order to get a proper origin.
+    frame->setHtml(innerHtml, QUrl("file:///path/to/file"));
     waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
 
     QPicture picture;
@@ -2911,9 +2914,7 @@
     frame->render(&painter1, QWebFrame::ContentsLayer);
     painter1.end();
 
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue);
     QCOMPARE(size.width(), picture.boundingRect().width() + frame->scrollBarGeometry(Qt::Vertical).width());
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue);
     QCOMPARE(size.height(), picture.boundingRect().height() + frame->scrollBarGeometry(Qt::Horizontal).height());
 
     // render everything, should be the size of the iframe
@@ -2921,9 +2922,7 @@
     frame->render(&painter2, QWebFrame::AllLayers);
     painter2.end();
 
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue);
     QCOMPARE(size.width(), picture.boundingRect().width());   // width: 100px
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue);
     QCOMPARE(size.height(), picture.boundingRect().height()); // height: 100px
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to