| Index: chrome/test/data/extensions/api_test/background_xhr/test_http_auth.js
|
| diff --git a/chrome/test/data/extensions/api_test/background_xhr/test_http_auth.js b/chrome/test/data/extensions/api_test/background_xhr/test_http_auth.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..85999339f76366a4882891c944c1f1394da6521a
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/background_xhr/test_http_auth.js
|
| @@ -0,0 +1,18 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +chrome.test.getConfig(function(config) {
|
| + var url = 'http://localhost:' + config.spawnedTestServer.port + '/auth-basic';
|
| +
|
| + chrome.webRequest.onCompleted.addListener(function(details) {
|
| + chrome.test.assertEq(-1, details.tabId);
|
| + chrome.test.assertEq(url, details.url);
|
| + chrome.test.assertEq("xmlhttprequest", details.type);
|
| + chrome.test.assertEq(401, details.statusCode);
|
| +
|
| + chrome.test.notifyPass();
|
| + }, { urls: [url], types: ["xmlhttprequest"] });
|
| +
|
| + chrome.runtime.sendMessage({type: 'xhr', method: 'GET', url: url});
|
| +});
|
|
|