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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/fetch-mixed-content-iframe-inscope-to-inscope.html

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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 <script src="../../resources/get-host-info.js?pipe=sub"></script> 1 <script src="../resources/get-host-info.sub.js"></script>
2 <script src="test-helpers.js"></script> 2 <script src="test-helpers.sub.js?pipe=sub"></script>
3 <script> 3 <script>
4 var image_path = base_path() + 'fetch-access-control.php?PNGIMAGE'; 4 var image_path = base_path() + 'fetch-access-control.py?PNGIMAGE';
5 var host_info = get_host_info(); 5 var host_info = get_host_info();
6 var results = ''; 6 var results = '';
7 7
8 function test1() { 8 function test1() {
9 var img = document.createElement('img'); 9 var img = document.createElement('img');
10 document.body.appendChild(img); 10 document.body.appendChild(img);
11 img.onload = function() { 11 img.onload = function() {
12 test2(); 12 test2();
13 }; 13 };
14 img.onerror = function() { 14 img.onerror = function() {
(...skipping 16 matching lines...) Expand all
31 }; 31 };
32 img.src = './dummy?mode=no-cors&url=' + 32 img.src = './dummy?mode=no-cors&url=' +
33 encodeURIComponent(host_info['HTTPS_REMOTE_ORIGIN'] + image_path); 33 encodeURIComponent(host_info['HTTPS_REMOTE_ORIGIN'] + image_path);
34 } 34 }
35 35
36 function test3() { 36 function test3() {
37 var img = document.createElement('img'); 37 var img = document.createElement('img');
38 document.body.appendChild(img); 38 document.body.appendChild(img);
39 img.onload = function() { 39 img.onload = function() {
40 results += 'FAIL(3)'; 40 results += 'FAIL(3)';
41 test4();
42 };
43 img.onerror = function() {
44 test4();
45 };
46 img.src = './dummy?mode=no-cors&url=' +
47 encodeURIComponent(host_info['HTTP_ORIGIN'] + image_path);
48 }
49
50 function test4() {
51 var img = document.createElement('img');
52 document.body.appendChild(img);
53 img.onload = function() {
54 results += 'FAIL(4)';
41 finish(); 55 finish();
42 }; 56 };
43 img.onerror = function() { 57 img.onerror = function() {
44 finish(); 58 finish();
45 }; 59 };
46 img.src = './dummy?mode=no-cors&url=' + 60 img.src = './dummy?mode=no-cors&url=' +
47 encodeURIComponent(host_info['UNAUTHENTICATED_ORIGIN'] + image_path) ; 61 encodeURIComponent(host_info['HTTP_REMOTE_ORIGIN'] + image_path);
48 } 62 }
49 63
50 function finish() { 64 function finish() {
51 results += 'finish'; 65 results += 'finish';
52 window.parent.postMessage({results: results}, host_info['HTTPS_ORIGIN']); 66 window.parent.postMessage({results: results}, host_info['HTTPS_ORIGIN']);
53 } 67 }
54 </script> 68 </script>
55 69
56 <body onload='test1();'> 70 <body onload='test1();'>
57 </body> 71 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698