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

Side by Side Diff: chrome/test/data/extensions/background_xhr/test_http_auth.js

Issue 859213006: Cancel client auth requests when not promptable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client-auth-cancel-1
Patch Set: worker_common.js was missing a license header (also a rebase) Created 5 years, 9 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 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // TODO(davidben): When URLSearchParams is stable and implemented, switch this
6 // (and a lot of other test code) to it. https://crbug.com/303152
7 var url = decodeURIComponent(/url=([^&]*)/.exec(location.search)[1]);
8 var filter = {urls: [url], types: ["xmlhttprequest"]};
9
10 chrome.webRequest.onCompleted.addListener(function(details) {
11 chrome.test.assertEq(-1, details.tabId);
12 chrome.test.assertEq(url, details.url);
13 chrome.test.assertEq("xmlhttprequest", details.type);
14 chrome.test.assertEq(401, details.statusCode);
15
16 chrome.test.notifyPass();
17 }, filter);
18
19 chrome.webRequest.onErrorOccurred.addListener(function(details) {
20 chrome.test.notifyFail("Request failed");
21 }, filter);
22
23 chrome.runtime.sendMessage({type: "xhr", method: "GET", url: url});
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698