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

Unified Diff: LayoutTests/http/tests/serviceworker/fetch-access-control.html

Issue 600393004: [ServiceWorker] Set FetchRequestMode and handle wasFetchedViaServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: delete fetch-cors-xhr-expected.txt 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/fetch-access-control.html
diff --git a/LayoutTests/http/tests/serviceworker/fetch-access-control.html b/LayoutTests/http/tests/serviceworker/fetch-access-control.html
index cc2399c2db4dfb702e8a39d3dc42aa7f1ca1df31..cff2ffc79c570ce95051bf039efb7e8c779463ef 100644
--- a/LayoutTests/http/tests/serviceworker/fetch-access-control.html
+++ b/LayoutTests/http/tests/serviceworker/fetch-access-control.html
@@ -488,28 +488,13 @@ var TEST_TARGETS = [
[REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL),
[fetchRejected]]
];
-
-function login(test, origin, username, password) {
- return new Promise(function(resolve, reject) {
- with_iframe(
- origin +
- '/serviceworker/resources/fetch-access-control-login.html')
- .then(test.step_func(function(frame) {
- var channel = new MessageChannel();
- channel.port1.onmessage = test.step_func(function() {
- resolve();
- });
- frame.contentWindow.postMessage(
- {username: username, password: password},
- [channel.port2], origin);
- }));
- });
-}
var test = async_test('Verify access control of fetch() in a Service Worker');
test.step(function() {
- var login1 = login(test, 'http://127.0.0.1:8000', 'username1', 'password1');
- var login2 = login(test, 'http://localhost:8000', 'username2', 'password2');
+ var login1 =
+ test_login(test, 'http://127.0.0.1:8000', 'username1', 'password1');
+ var login2 =
+ test_login(test, 'http://localhost:8000', 'username2', 'password2');
var workerScript = 'resources/fetch-access-control-worker.js';
var worker = undefined;
var frameWindow = {};
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698