Title: [131590] trunk
Revision
131590
Author
[email protected]
Date
2012-10-17 05:23:07 -0700 (Wed, 17 Oct 2012)

Log Message

[WK2][WTR] InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs
https://bugs.webkit.org/show_bug.cgi?id=99581

Patch by Mikhail Pozdnyakov <[email protected]> on 2012-10-17
Reviewed by Kenneth Rohde Christiansen.

Tools:

Now InjectedBundlePage::decidePolicyForNavigationAction() prints only filename part of local URLs (URLs where scheme
equals to 'file').

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForNavigationAction):

LayoutTests:

Unskipped fast/loader/reload-policy-delegate.html for WK2.

* platform/wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (131589 => 131590)


--- trunk/LayoutTests/ChangeLog	2012-10-17 12:06:44 UTC (rev 131589)
+++ trunk/LayoutTests/ChangeLog	2012-10-17 12:23:07 UTC (rev 131590)
@@ -1,3 +1,14 @@
+2012-10-17  Mikhail Pozdnyakov  <[email protected]>
+
+        [WK2][WTR] InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs
+        https://bugs.webkit.org/show_bug.cgi?id=99581
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskipped fast/loader/reload-policy-delegate.html for WK2.
+
+        * platform/wk2/TestExpectations:
+
 2012-10-17  Harald Alvestrand  <[email protected]>
 
         Implement the Selector argument to RTCPeerConnection.getStats

Modified: trunk/LayoutTests/platform/wk2/TestExpectations (131589 => 131590)


--- trunk/LayoutTests/platform/wk2/TestExpectations	2012-10-17 12:06:44 UTC (rev 131589)
+++ trunk/LayoutTests/platform/wk2/TestExpectations	2012-10-17 12:23:07 UTC (rev 131590)
@@ -292,10 +292,6 @@
 svg/custom/manually-parsed-svg-allowed-in-dashboard.html
 svg/custom/svg-allowed-in-dashboard-object.html
 
-# InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs.
-# <https://bugs.webkit.org/show_bug.cgi?id=99581>
-fast/loader/reload-policy-delegate.html
-
 # WebKitTestRunner needs testRunner.queueNonLoadingScript
 # <https://bugs.webkit.org/show_bug.cgi?id=98141>
 http/tests/navigation/anchor-goback.html

Modified: trunk/Tools/ChangeLog (131589 => 131590)


--- trunk/Tools/ChangeLog	2012-10-17 12:06:44 UTC (rev 131589)
+++ trunk/Tools/ChangeLog	2012-10-17 12:23:07 UTC (rev 131590)
@@ -1,3 +1,16 @@
+2012-10-17  Mikhail Pozdnyakov  <[email protected]>
+
+        [WK2][WTR] InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs
+        https://bugs.webkit.org/show_bug.cgi?id=99581
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Now InjectedBundlePage::decidePolicyForNavigationAction() prints only filename part of local URLs (URLs where scheme
+        equals to 'file').
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
+
 2012-10-17  Harald Alvestrand  <[email protected]>
 
         Implement the Selector argument to RTCPeerConnection.getStats

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (131589 => 131590)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2012-10-17 12:06:44 UTC (rev 131589)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2012-10-17 12:23:07 UTC (rev 131590)
@@ -1286,9 +1286,17 @@
     if (!InjectedBundle::shared().testRunner()->isPolicyDelegateEnabled())
         return WKBundlePagePolicyActionUse;
 
-    WKRetainPtr<WKStringRef> url = ""
+    WKRetainPtr<WKURLRef> url = ""
+    WKRetainPtr<WKStringRef> urlScheme = adoptWK(WKURLCopyScheme(url.get()));
+
     InjectedBundle::shared().stringBuilder()->appendLiteral("Policy delegate: attempt to load ");
-    InjectedBundle::shared().stringBuilder()->append(toWTFString(url));
+    if (isLocalFileScheme(urlScheme.get())) {
+        WKRetainPtr<WKStringRef> filename = adoptWK(WKURLCopyLastPathComponent(url.get()));
+        InjectedBundle::shared().stringBuilder()->append(toWTFString(filename));
+    } else {
+        WKRetainPtr<WKStringRef> urlString = adoptWK(WKURLCopyString(url.get()));
+        InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString));
+    }
     InjectedBundle::shared().stringBuilder()->appendLiteral(" with navigation type \'");
     InjectedBundle::shared().stringBuilder()->append(toWTFString(NavigationTypeToString(WKBundleNavigationActionGetNavigationType(navigationAction))));
     InjectedBundle::shared().stringBuilder()->appendLiteral("\'");
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to