| 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 "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/extensions/api/dial/dial_api.h" | 7 #include "chrome/browser/extensions/api/dial/dial_api.h" |
| 8 #include "chrome/browser/extensions/api/dial/dial_api_factory.h" | 8 #include "chrome/browser/extensions/api/dial/dial_api_factory.h" |
| 9 #include "chrome/browser/extensions/api/dial/dial_registry.h" | |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 11 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/media/router/discovery/dial/dial_registry.h" |
| 12 #include "extensions/common/switches.h" | 12 #include "extensions/common/switches.h" |
| 13 #include "extensions/test/extension_test_message_listener.h" | 13 #include "extensions/test/extension_test_message_listener.h" |
| 14 #include "extensions/test/result_catcher.h" | 14 #include "extensions/test/result_catcher.h" |
| 15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 using extensions::Extension; | 18 using extensions::Extension; |
| 19 using extensions::ResultCatcher; | 19 using extensions::ResultCatcher; |
| 20 using extensions::api::dial::DialDeviceData; | 20 using media_router::DialDeviceData; |
| 21 using extensions::api::dial::DialDeviceDescriptionData; | 21 using media_router::DialDeviceDescriptionData; |
| 22 using extensions::api::dial::DialRegistry; | 22 using media_router::DialRegistry; |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 class DialAPITest : public ExtensionApiTest { | 26 class DialAPITest : public ExtensionApiTest { |
| 27 public: | 27 public: |
| 28 DialAPITest() {} | 28 DialAPITest() {} |
| 29 | 29 |
| 30 void SetUpCommandLine(base::CommandLine* command_line) override { | 30 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 31 ExtensionApiTest::SetUpCommandLine(command_line); | 31 ExtensionApiTest::SetUpCommandLine(command_line); |
| 32 command_line->AppendSwitchASCII( | 32 command_line->AppendSwitchASCII( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 base::Time::Now()); | 128 base::Time::Now()); |
| 129 test_device.set_label("testDevice"); | 129 test_device.set_label("testDevice"); |
| 130 | 130 |
| 131 DialDeviceDescriptionData test_description("<xml>testDescription</xml>", | 131 DialDeviceDescriptionData test_description("<xml>testDescription</xml>", |
| 132 GURL("http://127.0.0.1/apps")); | 132 GURL("http://127.0.0.1/apps")); |
| 133 api->SetDeviceForTest(test_device, test_description); | 133 api->SetDeviceForTest(test_device, test_description); |
| 134 | 134 |
| 135 ASSERT_TRUE(RunExtensionSubtest("dial/experimental", | 135 ASSERT_TRUE(RunExtensionSubtest("dial/experimental", |
| 136 "fetch_device_description.html")); | 136 "fetch_device_description.html")); |
| 137 } | 137 } |
| OLD | NEW |