Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-no-xorigin-caching.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-no-xorigin-caching.html b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-no-xorigin-caching.html |
index 0905c0d4d7e433a629da82b38ad74adba6ee216a..913e9f297e3a7adc933f479259c93cf140dc4aef 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-no-xorigin-caching.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-no-xorigin-caching.html |
@@ -1,43 +1,47 @@ |
<!DOCTYPE html> |
<html> |
<head> |
-<title>Service Worker responses aren't cached to suborigins</title> |
+<meta charset="utf-8"> |
+<title>Service worker responses aren't cached to suborigins</title> |
<script src="/resources/testharness.js"></script> |
<script src="/resources/testharnessreport.js"></script> |
</head> |
- |
<body> |
<script> |
-var t_is_mem_cached = async_test('Service worker responses aren\'t cached for suborigins'); |
+var t_is_mem_cached = async_test( |
+ 'Service worker responses aren\'t cached for suborigins'); |
window.addEventListener('message', function(e) { |
if (e.data.id == 'suborigin') { |
- t_is_mem_cached.step(function() { |
- assert_false(e.data.is_mem_cached); |
- t_is_mem_cached.done(); |
+ t_is_mem_cached.step(function() { |
+ assert_false(e.data.is_mem_cached); |
+ t_is_mem_cached.done(); |
}); |
} else if (e.data.id == 'nonsuborigin') { |
- var iframe = document.createElement('iframe'); |
- iframe.src = 'resources/fetch-resource.php?suborigin=foobar&resource=/resources/dummy.txt?bypass&id=suborigin&bypass'; |
- document.body.appendChild(iframe); |
+ var iframe = document.createElement('iframe'); |
+ iframe.src = 'resources/fetch-resource.php?suborigin=foobar&' + |
+ 'resource=/resources/dummy.txt?bypass&id=suborigin&bypass'; |
+ document.body.appendChild(iframe); |
} else { |
- assert_unreached('id must be one of \'suborigin\' or \'nonsuborigin\''); |
+ assert_unreached('id must be one of \'suborigin\' or \'nonsuborigin\''); |
} |
-}); |
- |
-navigator.serviceWorker.register('/security/suborigins/resources/sw-reject-all-with-error.js') |
-.then(function(swr) { |
- var tests_started = false; |
+ }); |
- swr.installing.onstatechange = function() { |
- if (tests_started) |
+navigator.serviceWorker.register( |
+ '/security/suborigins/resources/sw-reject-all-with-error.js') |
+ .then(function(swr) { |
+ var tests_started = false; |
+ swr.installing.onstatechange = function() { |
+ if (tests_started) |
return; |
- tests_started = true; |
+ tests_started = true; |
- var iframe = document.createElement('iframe'); |
- iframe.src = 'resources/fetch-resource.php?resource=/resources/dummy.txt?bypass&id=nonsuborigin&bypass'; |
- document.body.appendChild(iframe); |
- } |
-}); |
+ var iframe = document.createElement('iframe'); |
+ iframe.src = 'resources/fetch-resource.php?' + |
+ 'resource=/resources/dummy.txt?bypass&' + |
+ 'id=nonsuborigin&bypass'; |
+ document.body.appendChild(iframe); |
+ } |
+ }); |
</script> |
</body> |