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

Unified Diff: LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html

Issue 600393004: [ServiceWorker] Set FetchRequestMode and handle wasFetchedViaServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add comment Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html
diff --git a/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html b/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html
index ab1cbdc618510a2edb99f712e34b57a9ec1c24d5..1924315326305dfcdb452b1d2be27983ce0ce5b9 100644
--- a/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html
+++ b/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html
@@ -3,12 +3,21 @@
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="resources/test-helpers.js?pipe=sub"></script>
+<body>
yhirano 2014/10/08 09:31:39 [optional] You can omit the tag. http://dev.chromi
horo 2014/10/08 10:02:46 We need <body>. Otherwise document.body.appendChil
<script>
async_test(function(t) {
+ var login1 =
+ test_login(t, 'http://127.0.0.1:8000', 'username1', 'password1');
+ var login2 =
+ test_login(t, 'http://localhost:8000', 'username2', 'password2');
var SCOPE = 'resources/fetch-canvas-tainting-iframe.html';
var SCRIPT = 'resources/fetch-rewrite-worker.js';
var host_info = get_host_info();
- service_worker_unregister_and_register(t, SCRIPT, SCOPE)
+
+ Promise.all([login1, login2])
+ .then(function() {
+ return service_worker_unregister_and_register(t, SCRIPT, SCOPE);
+ })
.then(function(registration) {
return wait_for_update(t, registration);
})
@@ -21,6 +30,7 @@ async_test(function(t) {
var channel = new MessageChannel();
channel.port1.onmessage = t.step_func(function(e) {
assert_equals(e.data.results, 'finish');
+ unload_iframe(frame);
service_worker_unregister_and_done(t, SCOPE);
});
frame.contentWindow.postMessage({},
@@ -31,3 +41,4 @@ async_test(function(t) {
.catch(unreached_rejection(t));
}, 'Verify canvas tainting of fetched image in a Service Worker');
</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698