Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Service Worker: Mime type checking of CSS files fetched via SW.</title> | 2 <title>Service Worker: Mime type checking of CSS files fetched via SW.</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/get-host-info.js?pipe=sub"></script> | 5 <script src="/common/get-host-info.sub.js?pipe=sub"></script> |
|
Marijn Kruisselbrink
2017/05/04 00:28:24
nit: here too no need for the pipe=sub
mike3
2017/05/05 18:56:12
Acknowledged.
| |
| 6 <script src="resources/test-helpers.js"></script> | 6 <script src="resources/test-helpers.sub.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function getElementColorInFrame(frame, id) { | 9 function getElementColorInFrame(frame, id) { |
| 10 var element = frame.contentDocument.getElementById(id); | 10 var element = frame.contentDocument.getElementById(id); |
| 11 var style = frame.contentWindow.getComputedStyle(element, ''); | 11 var style = frame.contentWindow.getComputedStyle(element, ''); |
| 12 return style['color']; | 12 return style['color']; |
| 13 } | 13 } |
| 14 | 14 |
| 15 promise_test(function(t) { | 15 promise_test(function(t) { |
| 16 var SCOPE = | 16 var SCOPE = |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 41 'The color must be overridden by same origin non CSS file.'); | 41 'The color must be overridden by same origin non CSS file.'); |
| 42 assert_equals( | 42 assert_equals( |
| 43 getElementColorInFrame(f, 'synthetic'), | 43 getElementColorInFrame(f, 'synthetic'), |
| 44 EXPECTED_COLOR, | 44 EXPECTED_COLOR, |
| 45 'The color must be overridden by synthetic CSS.'); | 45 'The color must be overridden by synthetic CSS.'); |
| 46 f.remove(); | 46 f.remove(); |
| 47 return service_worker_unregister_and_done(t, SCOPE); | 47 return service_worker_unregister_and_done(t, SCOPE); |
| 48 }); | 48 }); |
| 49 }, 'Mime type checking of CSS files fetched via SW.'); | 49 }, 'Mime type checking of CSS files fetched via SW.'); |
| 50 </script> | 50 </script> |
| OLD | NEW |