Bug 1462026 [wpt PR 11032] - Update LayoutTests to use '%23' instead of '#' in data URIs, a=testonly
authorStephen McGruer <smcgruer@chromium.org>
Sat, 19 May 2018 20:39:25 +0000
changeset 419087 e63d00cb2e5d0f003ab590db7b5e6979dec68ce6
parent 419086 3f948b66292b54df4972b90ca78c5cc30e25b03a
child 419088 17fc1d0673b422ab1ce66b802f30581390ce27f2
push id34026
push userapavel@mozilla.com
push dateMon, 21 May 2018 09:47:33 +0000
treeherdermozilla-central@dc1868d255be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1462026, 11032, 738395, 123004, 1048287, 559130
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1462026 [wpt PR 11032] - Update LayoutTests to use '%23' instead of '#' in data URIs, a=testonly Automatic update from web-platform-testsUpdate LayoutTests to use '%23' instead of '#' in data URIs This is a (very) partial reland of https://chromium-review.googlesource.com/c/chromium/src/+/738395, restoring only the changes to LayoutTests. This should be safe since '%23' always has been a correct encoding of '#' and so should work with the data URI code as it is today. It will also make any future re-land of the core original CL easier. Bug: 123004 Change-Id: I87126ea0e3fd39756e571a8e6cf966107e7f7209 Reviewed-on: https://chromium-review.googlesource.com/1048287 Reviewed-by: David Benjamin <davidben@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#559130} -- wpt-commits: 053e59f6d2b10c58fc1440ca1a7e6383313a4a77 wpt-pr: 11032
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/077.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -562462,17 +562462,17 @@
    "32dd5cdbc638ac7c141036633e136137854c3bb4",
    "testharness"
   ],
   "fetch/nosniff/worker.html": [
    "a9e0f5b9b70917aabbff3ad5dd03a5d5dccfa9f0",
    "testharness"
   ],
   "fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html": [
-   "92c4633c3d684de4b1d959dbff4f2bab1eaf15a0",
+   "1059b1c0907444bd416889f99d766a566ba9bde3",
    "testharness"
   ],
   "fetch/security/dangling-markup-mitigation.tentative.html": [
    "f7eb7151eb44f6b879beb325e923507f9430a3a5",
    "testharness"
   ],
   "fetch/security/embedded-credentials.tentative.sub.html": [
    "678e1f80a090021a240933034d1a9206cddde8a4",
@@ -579394,17 +579394,17 @@
    "01089de4c049a4b35e675f8ac6c5c82f0770201e",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/execution-timing/076.html": [
    "c410028036e51ae5529acce711ea3dc1cbc83728",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/execution-timing/077.html": [
-   "2bfe280f0ae7b745f2217055e66579ab6fb06769",
+   "077bf7437a9ef4f6d51d0fa26b45ae7c765feb9f",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/execution-timing/078.html": [
    "71244598c4d1c581fb0b8c9a9eb1b19f642428f7",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/execution-timing/079.html": [
    "c8ad7d7bd5cdfbd52d4250b43df2abd4f06320e5",
--- a/testing/web-platform/tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html
+++ b/testing/web-platform/tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html
@@ -11,17 +11,18 @@
   // as a `srcdoc` attribute. Because we're injecting markup via `srcdoc`, we need to entity-escape
   // the content we'd like to treat as "raw" (e.g. `\n` => `&#10;`, `<` => `&lt;`), and
   // double-escape the "escaped" content.
   var rawBrace = "&lt;";
   var escapedBrace = "&amp;lt;";
   var doubleEscapedBrace = "&amp;amp;lt;";
   var rawNewline = "&#10;";
   var escapedNewline = "&amp;#10;";
-  var doubleEscapedNewline = "&amp;amp;#10;";
+  // doubleEscapedNewline is used inside a data URI, and so must have its '#' escaped.
+  var doubleEscapedNewline = "&amp;amp;%2310;";
 
   function appendFrameAndGetElement(test, frame) {
     return new Promise((resolve, reject) => {
       frame.onload = test.step_func(_ => {
         frame.onload = null;
         resolve(frame.contentDocument.querySelector('#dangling'));
       });
       document.body.appendChild(frame);
--- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/077.html
+++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/077.html
@@ -12,22 +12,22 @@
                                 if (url) {
                                     props.src = url;
                                 }
                                 return testlib.addScript(contents, props, head, false);
                         }
                         var t = async_test()
 
                         function test() {
-                                var script = createScript('data:text\/javascript,log("Script #1 ran")');
+                                var script = createScript('data:text\/javascript,log("Script %231 ran")');
                                 var script2 = createScript('','log("Script #2 ran")');
                                 if(script2) {
                                     head.removeChild(script2);
                                 }
-                                var script3 = createScript('data:text\/javascript, log("Script #3 ran"); createScript(\'\', \'log("Script #4 ran")\')');
+                                var script3 = createScript('data:text\/javascript, log("Script %233 ran"); createScript(\'\', \'log("Script #4 ran")\')');
                                 if(script3) {
                                     head.removeChild(script3);
                                 }
                                 setTimeout(t.step_func(function(){
                                                assert_array_equals(eventOrder, ['Script #2 ran', 'Script #1 ran', 'Script #3 ran','Script #4 ran']);
                                                t.done();
                                            }), 400);