Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <title>Service Worker: Mime type of cross-origin CSS fetched via SW must be chec ked.</title> | |
| 3 <script src="../resources/testharness.js"></script> | |
| 4 <script src="../resources/testharnessreport.js"></script> | |
| 5 <script src="../resources/get-host-info.js?pipe=sub"></script> | |
| 6 <script src="resources/test-helpers.js"></script> | |
| 7 <script> | |
| 8 promise_test(function(t) { | |
| 9 var SCOPE = | |
| 10 'resources/fetch-request-css-cross-origin-mime-check-iframe.html'; | |
| 11 var SCRIPT = | |
| 12 'resources/fetch-request-css-cross-origin-mime-check-worker.js'; | |
| 13 | |
| 14 return service_worker_unregister_and_register(t, SCRIPT, SCOPE) | |
| 15 .then(function(registration) { | |
| 16 return wait_for_state(t, registration.installing, 'activated'); | |
| 17 }) | |
|
Mike West
2016/04/06 06:54:16
Nit: These are prettier as arrow functions (e.g. `
horo
2016/04/06 08:13:50
Done.
| |
| 18 .then(function() { return with_iframe(SCOPE); }) | |
| 19 .then(function(f) { | |
| 20 var style = | |
| 21 f.contentWindow.getComputedStyle(f.contentDocument.body, ''); | |
| 22 assert_equals(style['background-color'], 'rgb(255, 255, 255)', | |
| 23 'The background color must not be overridden.'); | |
| 24 f.remove(); | |
| 25 return service_worker_unregister_and_done(t, SCOPE); | |
| 26 }); | |
| 27 }, 'Mime type of cross-origin CSS fetched via SW must be checked.'); | |
| 28 </script> | |
| OLD | NEW |