Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cachestorage/window/sandboxed-iframes.html

Issue 1926813004: Replace assert_promise_rejects with upstream promise_rejects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove all testharness-helpers.js references Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Cache Storage: Verify access in sandboxed iframes</title> 2 <title>Cache Storage: Verify access in sandboxed iframes</title>
3 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_ worker/#cache-storage"> 3 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_ worker/#cache-storage">
4 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <script src="/resources/testharness-helpers.js"></script>
7 <script> 6 <script>
8 7
9 function load_iframe(src, sandbox) { 8 function load_iframe(src, sandbox) {
10 return new Promise(function(resolve, reject) { 9 return new Promise(function(resolve, reject) {
11 var iframe = document.createElement('iframe'); 10 var iframe = document.createElement('iframe');
12 iframe.onload = function() { resolve(iframe); }; 11 iframe.onload = function() { resolve(iframe); };
13 12
14 iframe.sandbox = sandbox; 13 iframe.sandbox = sandbox;
15 iframe.src = src; 14 iframe.src = src;
16 15
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 .then(function(message) { 56 .then(function(message) {
58 assert_equals( 57 assert_equals(
59 message.result, 'denied', 58 message.result, 'denied',
60 'Access should be denied if sandbox lacks allow-same-origin'); 59 'Access should be denied if sandbox lacks allow-same-origin');
61 assert_equals(message.name, 'SecurityError', 60 assert_equals(message.name, 'SecurityError',
62 'Failure should be a SecurityError'); 61 'Failure should be a SecurityError');
63 }); 62 });
64 }, 'Sandboxed iframe without allow-same-origin is denied access'); 63 }, 'Sandboxed iframe without allow-same-origin is denied access');
65 64
66 </script> 65 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698