OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/dial/dial_api.h" | 6 #include "chrome/browser/extensions/api/dial/dial_api.h" |
7 #include "chrome/browser/extensions/api/dial/dial_api_factory.h" | 7 #include "chrome/browser/extensions/api/dial/dial_api_factory.h" |
8 #include "chrome/browser/extensions/api/dial/dial_registry.h" | 8 #include "chrome/browser/extensions/api/dial/dial_registry.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_test_message_listener.h" | 11 #include "chrome/browser/extensions/extension_test_message_listener.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "extensions/common/switches.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 using extensions::DialDeviceData; | 16 using extensions::DialDeviceData; |
17 using extensions::Extension; | 17 using extensions::Extension; |
18 | 18 |
19 namespace api = extensions::api; | 19 namespace api = extensions::api; |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 class DialAPITest : public ExtensionApiTest { | 23 class DialAPITest : public ExtensionApiTest { |
24 public: | 24 public: |
25 DialAPITest() {} | 25 DialAPITest() {} |
26 | 26 |
27 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 27 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
28 ExtensionApiTest::SetUpCommandLine(command_line); | 28 ExtensionApiTest::SetUpCommandLine(command_line); |
29 command_line->AppendSwitchASCII( | 29 command_line->AppendSwitchASCII( |
30 switches::kWhitelistedExtensionID, "ddchlicdkolnonkihahngkmmmjnjlkkf"); | 30 extensions::switches::kWhitelistedExtensionID, |
| 31 "ddchlicdkolnonkihahngkmmmjnjlkkf"); |
31 } | 32 } |
32 }; | 33 }; |
33 | 34 |
34 } // namespace | 35 } // namespace |
35 | 36 |
36 // http://crbug.com/177163 | 37 // http://crbug.com/177163 |
37 #if defined(OS_WIN) && !defined(NDEBUG) | 38 #if defined(OS_WIN) && !defined(NDEBUG) |
38 #define MAYBE_DeviceListEvents DISABLED_DeviceListEvents | 39 #define MAYBE_DeviceListEvents DISABLED_DeviceListEvents |
39 #else | 40 #else |
40 #define MAYBE_DeviceListEvents DeviceListEvents | 41 #define MAYBE_DeviceListEvents DeviceListEvents |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 EXPECT_TRUE(listener.WaitUntilSatisfied()); | 103 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
103 | 104 |
104 listener.Reply("go"); | 105 listener.Reply("go"); |
105 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 106 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
106 } | 107 } |
107 | 108 |
108 IN_PROC_BROWSER_TEST_F(DialAPITest, OnError) { | 109 IN_PROC_BROWSER_TEST_F(DialAPITest, OnError) { |
109 ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "on_error.html")); | 110 ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "on_error.html")); |
110 } | 111 } |
OLD | NEW |