Title: [150496] trunk
Revision
150496
Author
[email protected]
Date
2013-05-21 19:13:58 -0700 (Tue, 21 May 2013)

Log Message

Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
https://bugs.webkit.org/show_bug.cgi?id=116569

Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb

Patch by Joseph Pecoraro <[email protected]> on 2013-05-21
Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector/load-resource-synchronously-utf8.html

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):

LayoutTests:

* inspector/load-resource-synchronously-utf8-expected.txt: Added.
* inspector/load-resource-synchronously-utf8.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (150495 => 150496)


--- trunk/LayoutTests/ChangeLog	2013-05-22 02:13:14 UTC (rev 150495)
+++ trunk/LayoutTests/ChangeLog	2013-05-22 02:13:58 UTC (rev 150496)
@@ -1,3 +1,15 @@
+2013-05-21  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
+        https://bugs.webkit.org/show_bug.cgi?id=116569
+
+        Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/load-resource-synchronously-utf8-expected.txt: Added.
+        * inspector/load-resource-synchronously-utf8.html: Added.
+
 2013-05-21  Andy Estes  <[email protected]>
 
         Check in the test and result I forgot to 'git add' before committing r150490.

Added: trunk/LayoutTests/inspector/load-resource-synchronously-utf8-expected.txt (0 => 150496)


--- trunk/LayoutTests/inspector/load-resource-synchronously-utf8-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/inspector/load-resource-synchronously-utf8-expected.txt	2013-05-22 02:13:58 UTC (rev 150496)
@@ -0,0 +1,5 @@
+Tests that InspectorFrontendHost.loadResourceSynchronously() correctly loads non-ASCII resources.
+
+'ASCII - Test' (12)
+'UTF8 - Тест' (11)
+

Added: trunk/LayoutTests/inspector/load-resource-synchronously-utf8.html (0 => 150496)


--- trunk/LayoutTests/inspector/load-resource-synchronously-utf8.html	                        (rev 0)
+++ trunk/LayoutTests/inspector/load-resource-synchronously-utf8.html	2013-05-22 02:13:58 UTC (rev 150496)
@@ -0,0 +1,18 @@
+<html>
+<head>
+<script src=""
+<script>
+function test()
+{
+    var asciiText = InspectorFrontendHost.loadResourceSynchronously("data:text/plain;,ASCII - Test");
+    InspectorTest.addResult("'" + asciiText + "' (" + asciiText.length + ")");
+    var utf8Text = InspectorFrontendHost.loadResourceSynchronously("data:text/plain;," + encodeURIComponent("UTF8 - \u0422\u0435\u0441\u0442"));
+    InspectorTest.addResult("'" + utf8Text + "' (" + utf8Text.length + ")");
+    InspectorTest.completeTest();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<p>Tests that InspectorFrontendHost.loadResourceSynchronously() correctly loads non-ASCII resources.</p>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (150495 => 150496)


--- trunk/Source/WebCore/ChangeLog	2013-05-22 02:13:14 UTC (rev 150495)
+++ trunk/Source/WebCore/ChangeLog	2013-05-22 02:13:58 UTC (rev 150496)
@@ -1,3 +1,17 @@
+2013-05-21  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
+        https://bugs.webkit.org/show_bug.cgi?id=116569
+
+        Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
+
+        Reviewed by Timothy Hatcher.
+
+        Test: inspector/load-resource-synchronously-utf8.html
+
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::InspectorFrontendHost::loadResourceSynchronously):
+
 2013-05-21  Andy Estes  <[email protected]>
 
         Allow session storage for third-party origins even if third-party data access is blocked.

Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (150495 => 150496)


--- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2013-05-22 02:13:14 UTC (rev 150495)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2013-05-22 02:13:58 UTC (rev 150496)
@@ -293,7 +293,7 @@
     ResourceError error;
     ResourceResponse response;
     m_frontendPage->mainFrame()->loader()->loadResourceSynchronously(request, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, error, response, data);
-    return String(data.data(), data.size());
+    return String::fromUTF8(data.data(), data.size());
 }
 
 bool InspectorFrontendHost::supportsFileSystems()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to