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

Side by Side Diff: chrome/browser/extensions/api/mdns/mdns_apitest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ptr_util.h"
6 #include "build/build_config.h" 7 #include "build/build_config.h"
7 #include "chrome/browser/extensions/api/mdns/mdns_api.h" 8 #include "chrome/browser/extensions/api/mdns/mdns_api.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/common/extensions/api/mdns.h" 11 #include "chrome/common/extensions/api/mdns.h"
11 #include "extensions/common/switches.h" 12 #include "extensions/common/switches.h"
12 #include "extensions/test/result_catcher.h" 13 #include "extensions/test/result_catcher.h"
13 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
14 15
15 using extensions::DnsSdRegistry; 16 using extensions::DnsSdRegistry;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 "ddchlicdkolnonkihahngkmmmjnjlkkf"); 52 "ddchlicdkolnonkihahngkmmmjnjlkkf");
52 } 53 }
53 54
54 void SetUpTestDnsSdRegistry() { 55 void SetUpTestDnsSdRegistry() {
55 extensions::MDnsAPI* api = extensions::MDnsAPI::Get(profile()); 56 extensions::MDnsAPI* api = extensions::MDnsAPI::Get(profile());
56 dns_sd_registry_ = new MockDnsSdRegistry(api); 57 dns_sd_registry_ = new MockDnsSdRegistry(api);
57 EXPECT_CALL(*dns_sd_registry_, AddObserver(api)) 58 EXPECT_CALL(*dns_sd_registry_, AddObserver(api))
58 .Times(1); 59 .Times(1);
59 // Transfers ownership of the registry instance. 60 // Transfers ownership of the registry instance.
60 api->SetDnsSdRegistryForTesting( 61 api->SetDnsSdRegistryForTesting(
61 make_scoped_ptr<DnsSdRegistry>(dns_sd_registry_)); 62 base::WrapUnique<DnsSdRegistry>(dns_sd_registry_));
62 } 63 }
63 64
64 protected: 65 protected:
65 MockDnsSdRegistry* dns_sd_registry_; 66 MockDnsSdRegistry* dns_sd_registry_;
66 }; 67 };
67 68
68 } // namespace 69 } // namespace
69 70
70 // TODO(justinlin): Win Dbg has a workaround that makes RunExtensionSubtest 71 // TODO(justinlin): Win Dbg has a workaround that makes RunExtensionSubtest
71 // always return true without actually running the test. Remove when fixed. 72 // always return true without actually running the test. Remove when fixed.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 #define MAYBE_MaxServiceInstancesPerEventConst \ 207 #define MAYBE_MaxServiceInstancesPerEventConst \
207 DISABLED_MaxServiceInstancesPerEventConst 208 DISABLED_MaxServiceInstancesPerEventConst
208 #else 209 #else
209 #define MAYBE_MaxServiceInstancesPerEventConst MaxServiceInstancesPerEventConst 210 #define MAYBE_MaxServiceInstancesPerEventConst MaxServiceInstancesPerEventConst
210 #endif 211 #endif
211 // Test loading extension and registering multiple listeners. 212 // Test loading extension and registering multiple listeners.
212 IN_PROC_BROWSER_TEST_F(MDnsAPITest, MAYBE_MaxServiceInstancesPerEventConst) { 213 IN_PROC_BROWSER_TEST_F(MDnsAPITest, MAYBE_MaxServiceInstancesPerEventConst) {
213 EXPECT_TRUE(RunExtensionSubtest("mdns/api", 214 EXPECT_TRUE(RunExtensionSubtest("mdns/api",
214 "get_max_service_instances.html")); 215 "get_max_service_instances.html"));
215 } 216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698