OLD | NEW |
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 "build/build_config.h" | 6 #include "build/build_config.h" |
7 #include "chrome/browser/extensions/api/mdns/mdns_api.h" | 7 #include "chrome/browser/extensions/api/mdns/mdns_api.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/common/extensions/api/mdns.h" | 10 #include "chrome/common/extensions/api/mdns.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 "ddchlicdkolnonkihahngkmmmjnjlkkf"); | 51 "ddchlicdkolnonkihahngkmmmjnjlkkf"); |
52 } | 52 } |
53 | 53 |
54 void SetUpTestDnsSdRegistry() { | 54 void SetUpTestDnsSdRegistry() { |
55 extensions::MDnsAPI* api = extensions::MDnsAPI::Get(profile()); | 55 extensions::MDnsAPI* api = extensions::MDnsAPI::Get(profile()); |
56 dns_sd_registry_ = new MockDnsSdRegistry(api); | 56 dns_sd_registry_ = new MockDnsSdRegistry(api); |
57 EXPECT_CALL(*dns_sd_registry_, AddObserver(api)) | 57 EXPECT_CALL(*dns_sd_registry_, AddObserver(api)) |
58 .Times(1); | 58 .Times(1); |
59 // Transfers ownership of the registry instance. | 59 // Transfers ownership of the registry instance. |
60 api->SetDnsSdRegistryForTesting( | 60 api->SetDnsSdRegistryForTesting( |
61 make_scoped_ptr<DnsSdRegistry>(dns_sd_registry_).Pass()); | 61 make_scoped_ptr<DnsSdRegistry>(dns_sd_registry_)); |
62 } | 62 } |
63 | 63 |
64 protected: | 64 protected: |
65 MockDnsSdRegistry* dns_sd_registry_; | 65 MockDnsSdRegistry* dns_sd_registry_; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 // TODO(justinlin): Win Dbg has a workaround that makes RunExtensionSubtest | 70 // TODO(justinlin): Win Dbg has a workaround that makes RunExtensionSubtest |
71 // always return true without actually running the test. Remove when fixed. | 71 // always return true without actually running the test. Remove when fixed. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 #define MAYBE_MaxServiceInstancesPerEventConst \ | 206 #define MAYBE_MaxServiceInstancesPerEventConst \ |
207 DISABLED_MaxServiceInstancesPerEventConst | 207 DISABLED_MaxServiceInstancesPerEventConst |
208 #else | 208 #else |
209 #define MAYBE_MaxServiceInstancesPerEventConst MaxServiceInstancesPerEventConst | 209 #define MAYBE_MaxServiceInstancesPerEventConst MaxServiceInstancesPerEventConst |
210 #endif | 210 #endif |
211 // Test loading extension and registering multiple listeners. | 211 // Test loading extension and registering multiple listeners. |
212 IN_PROC_BROWSER_TEST_F(MDnsAPITest, MAYBE_MaxServiceInstancesPerEventConst) { | 212 IN_PROC_BROWSER_TEST_F(MDnsAPITest, MAYBE_MaxServiceInstancesPerEventConst) { |
213 EXPECT_TRUE(RunExtensionSubtest("mdns/api", | 213 EXPECT_TRUE(RunExtensionSubtest("mdns/api", |
214 "get_max_service_instances.html")); | 214 "get_max_service_instances.html")); |
215 } | 215 } |
OLD | NEW |