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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/window/sandboxed-iframes.https.html

Issue 2547023002: Import wpt@3c8896ae408c8fd594979da7c99970029e7856a7 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 4 years 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://w3c.github.io/ServiceWorker/#cache-storage"> 3 <link rel="help" href="https://w3c.github.io/ServiceWorker/#cache-storage">
4 <meta name="timeout" content="long"> 4 <meta name="timeout" content="long">
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 <script src="../resources/testharness-helpers.js"></script>
8 <script> 7 <script>
9 8
10 function load_iframe(src, sandbox) { 9 function load_iframe(src, sandbox) {
11 return new Promise(function(resolve, reject) { 10 return new Promise(function(resolve, reject) {
12 var iframe = document.createElement('iframe'); 11 var iframe = document.createElement('iframe');
13 iframe.onload = function() { resolve(iframe); }; 12 iframe.onload = function() { resolve(iframe); };
14 13
15 iframe.sandbox = sandbox; 14 iframe.sandbox = sandbox;
16 iframe.src = src; 15 iframe.src = src;
17 16
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 .then(function(message) { 57 .then(function(message) {
59 assert_equals( 58 assert_equals(
60 message.result, 'denied', 59 message.result, 'denied',
61 'Access should be denied if sandbox lacks allow-same-origin'); 60 'Access should be denied if sandbox lacks allow-same-origin');
62 assert_equals(message.name, 'SecurityError', 61 assert_equals(message.name, 'SecurityError',
63 'Failure should be a SecurityError'); 62 'Failure should be a SecurityError');
64 }); 63 });
65 }, 'Sandboxed iframe without allow-same-origin is denied access'); 64 }, 'Sandboxed iframe without allow-same-origin is denied access');
66 65
67 </script> 66 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698