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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-request-css-cross-origin-mime-check.html

Issue 1861243002: Check the mime type of cross-origin CSS fetched via the Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698