OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Service Worker: canvas tainting of the fetched image</title> | 2 <title>Service Worker: canvas tainting of the fetched image</title> |
3 <script src="../resources/testharness.js"></script> | 3 <script src="../resources/testharness.js"></script> |
4 <script src="../resources/testharnessreport.js"></script> | 4 <script src="../resources/testharnessreport.js"></script> |
5 <script src="resources/test-helpers.js?pipe=sub"></script> | 5 <script src="resources/test-helpers.js?pipe=sub"></script> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 async_test(function(t) { | 8 async_test(function(t) { |
9 var login1 = | 9 var login1 = |
10 test_login(t, 'http://127.0.0.1:8000', 'username1', 'password1'); | 10 test_login(t, 'http://127.0.0.1:8000', 'username1', 'password1'); |
(...skipping 16 matching lines...) Expand all Loading... |
27 .then(function() { return with_iframe(SCOPE); }) | 27 .then(function() { return with_iframe(SCOPE); }) |
28 .then(function(frame) { | 28 .then(function(frame) { |
29 return new Promise(function(resolve, reject) { | 29 return new Promise(function(resolve, reject) { |
30 var channel = new MessageChannel(); | 30 var channel = new MessageChannel(); |
31 channel.port1.onmessage = t.step_func(function(e) { | 31 channel.port1.onmessage = t.step_func(function(e) { |
32 assert_equals(e.data.results, 'finish'); | 32 assert_equals(e.data.results, 'finish'); |
33 unload_iframe(frame); | 33 unload_iframe(frame); |
34 service_worker_unregister_and_done(t, SCOPE); | 34 service_worker_unregister_and_done(t, SCOPE); |
35 }); | 35 }); |
36 frame.contentWindow.postMessage({}, | 36 frame.contentWindow.postMessage({}, |
37 [channel.port2], | 37 host_info['HTTP_ORIGIN'], |
38 host_info['HTTP_ORIGIN']); | 38 [channel.port2]); |
39 }); | 39 }); |
40 }) | 40 }) |
41 .catch(unreached_rejection(t)); | 41 .catch(unreached_rejection(t)); |
42 }, 'Verify canvas tainting of fetched image in a Service Worker'); | 42 }, 'Verify canvas tainting of fetched image in a Service Worker'); |
43 </script> | 43 </script> |
44 </body> | 44 </body> |
OLD | NEW |