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

Side by Side Diff: chrome/test/data/extensions/api_test/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: fix test 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 chrome.test.getConfig(function(config) {
6 var url = 'http://localhost:' + config.spawnedTestServer.port + '/auth-basic';
7
8 chrome.webRequest.onCompleted.addListener(function(details) {
9 chrome.test.assertEq(-1, details.tabId);
10 chrome.test.assertEq(url, details.url);
11 chrome.test.assertEq("xmlhttprequest", details.type);
12 chrome.test.assertEq(401, details.statusCode);
13
14 chrome.test.notifyPass();
15 }, { urls: [url], types: ["xmlhttprequest"] });
16
17 chrome.runtime.sendMessage({type: 'xhr', method: 'GET', url: url});
18 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698