Title: [152782] trunk
Revision
152782
Author
[email protected]
Date
2013-07-17 08:34:44 -0700 (Wed, 17 Jul 2013)

Log Message

[GTK] Make DRT obbey testRunner's addURLToRedirect
https://bugs.webkit.org/show_bug.cgi?id=118239

Patch by Simon Pena <[email protected]> on 2013-07-17
Reviewed by Gustavo Noronha Silva.

Tools:

Support testRunner's addURLToRedirect in GTK's DRT, so it redirects
to the proper URI when indicated.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(willSendRequestCallback):

LayoutTests:

Unskip http/tests/loading/cross-origin-XHR-willLoadRequest.html now that DRT obbeys
testRunner's addURLToRedirect.

* platform/gtk/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (152781 => 152782)


--- trunk/LayoutTests/ChangeLog	2013-07-17 13:54:36 UTC (rev 152781)
+++ trunk/LayoutTests/ChangeLog	2013-07-17 15:34:44 UTC (rev 152782)
@@ -1,3 +1,15 @@
+2013-07-17  Simon Pena  <[email protected]>
+
+        [GTK] Make DRT obbey testRunner's addURLToRedirect
+        https://bugs.webkit.org/show_bug.cgi?id=118239
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Unskip http/tests/loading/cross-origin-XHR-willLoadRequest.html now that DRT obbeys
+        testRunner's addURLToRedirect.
+
+        * platform/gtk/TestExpectations:
+
 2013-07-17  Gabor Abraham  <[email protected]>
 
         [Qt] Unreviewd gardening. Rebase and skip failing tests.

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (152781 => 152782)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-07-17 13:54:36 UTC (rev 152781)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-07-17 15:34:44 UTC (rev 152782)
@@ -1063,9 +1063,6 @@
 # Rounding color problems inside pixman
 webkit.org/b/49964 fast/canvas/canvas-fillPath-shadow.html [ Failure ]
 
-# DRT does not obey testRunner.addURLToRedirect()
-Bug(GTK) http/tests/loading/cross-origin-XHR-willLoadRequest.html [ Failure ]
-
 # See also https://bugs.webkit.org/show_bug.cgi?id=54926
 webkit.org/b/53707 http/tests/security/xss-DENIED-xsl-document-redirect.xml [ Failure ]
 webkit.org/b/53707 http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml [ Failure ]

Modified: trunk/Tools/ChangeLog (152781 => 152782)


--- trunk/Tools/ChangeLog	2013-07-17 13:54:36 UTC (rev 152781)
+++ trunk/Tools/ChangeLog	2013-07-17 15:34:44 UTC (rev 152782)
@@ -1,3 +1,16 @@
+2013-07-17  Simon Pena  <[email protected]>
+
+        [GTK] Make DRT obbey testRunner's addURLToRedirect
+        https://bugs.webkit.org/show_bug.cgi?id=118239
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Support testRunner's addURLToRedirect in GTK's DRT, so it redirects
+        to the proper URI when indicated.
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (willSendRequestCallback):
+
 2013-07-17  Gabor Abraham  <[email protected]>
 
         Add a new find-resolved-bugs command to webkit-patch.

Modified: trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp (152781 => 152782)


--- trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp	2013-07-17 13:54:36 UTC (rev 152781)
+++ trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp	2013-07-17 15:34:44 UTC (rev 152782)
@@ -1288,11 +1288,12 @@
 
     SoupMessage* soupMessage = webkit_network_request_get_message(request);
     SoupURI* uri = soup_uri_new(webkit_network_request_get_uri(request));
+    GOwnPtr<char> uriString(soup_uri_to_string(uri, FALSE));
 
     if (SOUP_URI_VALID_FOR_HTTP(uri) && g_strcmp0(uri->host, "127.0.0.1")
         && g_strcmp0(uri->host, "255.255.255.255")
         && g_ascii_strncasecmp(uri->host, "localhost", 9)) {
-        printf("Blocked access to external URL %s\n", soup_uri_to_string(uri, FALSE));
+        printf("Blocked access to external URL %s\n", uriString.get());
         // Cancel load of blocked resource to avoid potential
         // network-related timeouts in tests.
         webkit_network_request_set_uri(request, "about:blank");
@@ -1300,6 +1301,10 @@
         return;
     }
 
+    const string& destination = gTestRunner->redirectionDestinationForURL(uriString.get());
+    if (!destination.empty())
+        webkit_network_request_set_uri(request, destination.c_str());
+
     if (uri)
         soup_uri_free(uri);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to