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

Side by Side Diff: chrome/browser/extensions/xhr_apitest.cc

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: extension test Created 5 years, 10 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 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "net/test/spawned_test_server/spawned_test_server.h"
7
8 // Test that fetching a URL using TLS client auth doesn't crash, hang, or
9 // prompt.
10 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, XhrTlsClientAuth) {
11 // Launch HTTPS server.
12 net::SpawnedTestServer::SSLOptions ssl_options;
13 ssl_options.request_client_certificate = true;
14 net::SpawnedTestServer https_server(
15 net::SpawnedTestServer::TYPE_HTTPS, ssl_options,
16 base::FilePath(FILE_PATH_LITERAL("content/test/data")));
17 ASSERT_TRUE(https_server.Start());
18
19 std::string url = https_server.GetURL("").spec();
20 ASSERT_TRUE(RunExtensionTestWithArg("xhr", url.c_str())) << message_;
davidben 2015/02/06 22:39:38 It's a bit of a nuisance that this test (and the o
mmenke 2015/02/10 17:19:10 Can we check if the displayed page has ERR_SSL_CLI
davidben 2015/02/10 20:28:49 It's an XHR made by the background page of an exte
mmenke 2015/02/10 20:39:20 Oh...Erm...right, was forgetting this wasn't a nav
davidben 2015/02/10 22:20:52 Mmm. I'm a little worried about these tests swappi
21 }
22
23 // Test that fetching a URL using HTTP auth doesn't crash, hang, or prompt.
24 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, XhrHttpAuth) {
25 ASSERT_TRUE(StartSpawnedTestServer());
26
27 std::string url = test_server()->GetURL("/auth-basic").spec();
28 ASSERT_TRUE(RunExtensionTestWithArg("xhr", url.c_str())) << message_;
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698