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

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

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory>
6
5 #include "base/bind.h" 7 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "base/run_loop.h" 8 #include "base/run_loop.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_io_data.h" 11 #include "chrome/browser/profiles/profile_io_data.h"
11 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
12 #include "chrome/test/base/ui_test_utils.h" 13 #include "chrome/test/base/ui_test_utils.h"
13 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
14 #include "extensions/common/extension.h" 15 #include "extensions/common/extension.h"
15 #include "extensions/test/result_catcher.h" 16 #include "extensions/test/result_catcher.h"
16 #include "net/base/escape.h" 17 #include "net/base/escape.h"
17 #include "net/base/url_util.h" 18 #include "net/base/url_util.h"
18 #include "net/ssl/client_cert_store.h" 19 #include "net/ssl/client_cert_store.h"
19 #include "net/ssl/ssl_server_config.h" 20 #include "net/ssl/ssl_server_config.h"
20 #include "net/test/embedded_test_server/embedded_test_server.h" 21 #include "net/test/embedded_test_server/embedded_test_server.h"
21 #include "url/gurl.h" 22 #include "url/gurl.h"
22 23
23 namespace { 24 namespace {
24 25
25 scoped_ptr<net::ClientCertStore> CreateNullCertStore() { 26 std::unique_ptr<net::ClientCertStore> CreateNullCertStore() {
26 return nullptr; 27 return nullptr;
27 } 28 }
28 29
29 void InstallNullCertStoreFactoryOnIOThread( 30 void InstallNullCertStoreFactoryOnIOThread(
30 content::ResourceContext* resource_context) { 31 content::ResourceContext* resource_context) {
31 ProfileIOData::FromResourceContext(resource_context) 32 ProfileIOData::FromResourceContext(resource_context)
32 ->set_client_cert_store_factory_for_testing( 33 ->set_client_cert_store_factory_for_testing(
33 base::Bind(&CreateNullCertStore)); 34 base::Bind(&CreateNullCertStore));
34 } 35 }
35 36
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ASSERT_NO_FATAL_FAILURE( 76 ASSERT_NO_FATAL_FAILURE(
76 RunTest("test_tls_client_auth.html", https_server.GetURL("/"))); 77 RunTest("test_tls_client_auth.html", https_server.GetURL("/")));
77 } 78 }
78 79
79 // Test that fetching a URL using HTTP auth doesn't crash, hang, or prompt. 80 // Test that fetching a URL using HTTP auth doesn't crash, hang, or prompt.
80 IN_PROC_BROWSER_TEST_F(BackgroundXhrTest, HttpAuth) { 81 IN_PROC_BROWSER_TEST_F(BackgroundXhrTest, HttpAuth) {
81 ASSERT_TRUE(embedded_test_server()->Start()); 82 ASSERT_TRUE(embedded_test_server()->Start());
82 ASSERT_NO_FATAL_FAILURE(RunTest( 83 ASSERT_NO_FATAL_FAILURE(RunTest(
83 "test_http_auth.html", embedded_test_server()->GetURL("/auth-basic"))); 84 "test_http_auth.html", embedded_test_server()->GetURL("/auth-basic")));
84 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/background_app_browsertest.cc ('k') | chrome/browser/extensions/blacklist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698