Bug 1436388 [wpt PR 9353] - [Mojo Blob URLs] Resolve navigation blob URLs in blink., a=testonly
authorMarijn Kruisselbrink <mek@chromium.org>
Mon, 09 Apr 2018 22:01:53 +0000
changeset 467264 c81f9db533919f79d44d3b50f5d0f75a512b5ea9
parent 467263 63bb1c3272ab427351432d732c0204cbbea542ce
child 467265 de76adc0fe8ca86f01ab41ffd61423b26c8b2bfd
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1436388, 899508, 800901, 898009, 547842
milestone61.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 1436388 [wpt PR 9353] - [Mojo Blob URLs] Resolve navigation blob URLs in blink., a=testonly Automatic update from web-platform-tests[Mojo Blob URLs] Resolve navigation blob URLs in blink. This makes sure that no race conditions exist between navigating to a blob URL and revoking it. Currently only implemented for the network service code path. Also add one more navigation-then-revoke WPT test, as the existing tests didn't cover the NavigationScheduler code-path. Design doc: https://docs.google.com/document/d/1DqVcTWE9Qb_3KpIRH2bFV-6hWEr8S92c4ppY67YL1KI/edit#heading=h.n4fzuc6mgziv Further navigation cases are handled in https://chromium-review.googlesource.com/c/chromium/src/+/899508. Bug: 800901 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: Icf9a4725526b4329a2841626977292802ad2fa7a Reviewed-on: https://chromium-review.googlesource.com/898009 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Nasko Oskov <nasko@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#547842} wpt-commits: 992147614f6cdd4fcb8b03e19c9af25cacacd192 wpt-pr: 9353 wpt-commits: 992147614f6cdd4fcb8b03e19c9af25cacacd192 wpt-pr: 9353
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/FileAPI/url/url-in-tags-revoke.window.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -397118,17 +397118,17 @@
    "59efa25d03f8765d4848d4b4e6310c7740763342",
    "testharness"
   ],
   "FileAPI/url/url-format.any.js": [
    "b087f507b342f88240efcee2569da96fee469a5b",
    "testharness"
   ],
   "FileAPI/url/url-in-tags-revoke.window.js": [
-   "b1f54096cb0350066239ec1633be2be6ecb3af00",
+   "4d314e8f231158a8a216ecefd6a3ffa20cf31680",
    "testharness"
   ],
   "FileAPI/url/url-in-tags.window.js": [
    "bf67cd8a24215953b0e68e1d046491c7863b05b6",
    "testharness"
   ],
   "FileAPI/url/url-lifetime.html": [
    "3cbda186b6669c24770013d899e96a71ea49a08d",
--- a/testing/web-platform/tests/FileAPI/url/url-in-tags-revoke.window.js
+++ b/testing/web-platform/tests/FileAPI/url/url-in-tags-revoke.window.js
@@ -12,16 +12,37 @@ async_test(t => {
   URL.revokeObjectURL(url);
 
   frame.onload = t.step_func_done(() => {
     assert_equals(frame.contentWindow.test_result, run_result);
   });
 }, 'Fetching a blob URL immediately before revoking it works in an iframe.');
 
 async_test(t => {
+  const run_result = 'test_frame_OK';
+  const blob_contents = '<!doctype html>\n<meta charset="utf-8">\n' +
+    '<script>window.test_result = "' + run_result + '";</script>';
+  const blob = new Blob([blob_contents], {type: 'text/html'});
+  const url = URL.createObjectURL(blob);
+
+  const frame = document.createElement('iframe');
+  frame.setAttribute('src', '/common/blank.html');
+  frame.setAttribute('style', 'display:none;');
+  document.body.appendChild(frame);
+
+  frame.onload = t.step_func(() => {
+    frame.contentWindow.location = url;
+    URL.revokeObjectURL(url);
+    frame.onload = t.step_func_done(() => {
+      assert_equals(frame.contentWindow.test_result, run_result);
+    });
+  });
+}, 'Fetching a blob URL immediately before revoking it works in an iframe navigation.');
+
+async_test(t => {
   const run_result = 'test_script_OK';
   const blob_contents = 'window.script_test_result = "' + run_result + '";';
   const blob = new Blob([blob_contents]);
   const url = URL.createObjectURL(blob);
 
   const e = document.createElement('script');
   e.setAttribute('src', url);
   e.onload = t.step_func_done(() => {