| 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 "extensions/common/switches.h" | 11 #include "extensions/common/switches.h" |
| 12 #include "extensions/test/extension_test_message_listener.h" | 12 #include "extensions/test/extension_test_message_listener.h" |
| 13 #include "extensions/test/result_catcher.h" | 13 #include "extensions/test/result_catcher.h" |
| 14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 using extensions::DialDeviceData; | 17 using extensions::DialDeviceData; |
| 18 using extensions::Extension; | 18 using extensions::Extension; |
| 19 | 19 |
| 20 namespace api = extensions::api; | 20 namespace api = extensions::api; |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 class DialAPITest : public ExtensionApiTest { | 24 class DialAPITest : public ExtensionApiTest { |
| 25 public: | 25 public: |
| 26 DialAPITest() {} | 26 DialAPITest() {} |
| 27 | 27 |
| 28 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 28 virtual void SetUpCommandLine(CommandLine* command_line) override { |
| 29 ExtensionApiTest::SetUpCommandLine(command_line); | 29 ExtensionApiTest::SetUpCommandLine(command_line); |
| 30 command_line->AppendSwitchASCII( | 30 command_line->AppendSwitchASCII( |
| 31 extensions::switches::kWhitelistedExtensionID, | 31 extensions::switches::kWhitelistedExtensionID, |
| 32 "ddchlicdkolnonkihahngkmmmjnjlkkf"); | 32 "ddchlicdkolnonkihahngkmmmjnjlkkf"); |
| 33 } | 33 } |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace | 36 } // namespace |
| 37 | 37 |
| 38 // http://crbug.com/177163 | 38 // http://crbug.com/177163 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 EXPECT_TRUE(listener.WaitUntilSatisfied()); | 108 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
| 109 | 109 |
| 110 listener.Reply("go"); | 110 listener.Reply("go"); |
| 111 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 111 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 IN_PROC_BROWSER_TEST_F(DialAPITest, OnError) { | 114 IN_PROC_BROWSER_TEST_F(DialAPITest, OnError) { |
| 115 ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "on_error.html")); | 115 ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "on_error.html")); |
| 116 } | 116 } |
| OLD | NEW |