| 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', |
| 11 'username1', 'password1', 'cookie1'); |
| 11 var login2 = | 12 var login2 = |
| 12 test_login(t, 'http://localhost:8000', 'username2', 'password2'); | 13 test_login(t, 'http://localhost:8000', |
| 14 'username2', 'password2', 'cookie2'); |
| 13 var SCOPE = 'resources/fetch-canvas-tainting-iframe.html'; | 15 var SCOPE = 'resources/fetch-canvas-tainting-iframe.html'; |
| 14 var SCRIPT = 'resources/fetch-rewrite-worker.js'; | 16 var SCRIPT = 'resources/fetch-rewrite-worker.js'; |
| 15 var host_info = get_host_info(); | 17 var host_info = get_host_info(); |
| 16 | 18 |
| 17 Promise.all([login1, login2]) | 19 Promise.all([login1, login2]) |
| 18 .then(function() { | 20 .then(function() { |
| 19 return service_worker_unregister_and_register(t, SCRIPT, SCOPE); | 21 return service_worker_unregister_and_register(t, SCRIPT, SCOPE); |
| 20 }) | 22 }) |
| 21 .then(function(registration) { | 23 .then(function(registration) { |
| 22 return wait_for_update(t, registration); | 24 return wait_for_update(t, registration); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 }); | 37 }); |
| 36 frame.contentWindow.postMessage({}, | 38 frame.contentWindow.postMessage({}, |
| 37 host_info['HTTP_ORIGIN'], | 39 host_info['HTTP_ORIGIN'], |
| 38 [channel.port2]); | 40 [channel.port2]); |
| 39 }); | 41 }); |
| 40 }) | 42 }) |
| 41 .catch(unreached_rejection(t)); | 43 .catch(unreached_rejection(t)); |
| 42 }, 'Verify canvas tainting of fetched image in a Service Worker'); | 44 }, 'Verify canvas tainting of fetched image in a Service Worker'); |
| 43 </script> | 45 </script> |
| 44 </body> | 46 </body> |
| OLD | NEW |