OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/external_protocol/external_protocol_handler.h" | 5 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
6 | 6 |
7 #include "content/test/test_browser_thread.h" | 7 #include "content/test/test_browser_thread.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
| 10 using content::BrowserThread; |
| 11 |
10 class FakeExternalProtocolHandlerWorker | 12 class FakeExternalProtocolHandlerWorker |
11 : public ShellIntegration::DefaultProtocolClientWorker { | 13 : public ShellIntegration::DefaultProtocolClientWorker { |
12 public: | 14 public: |
13 FakeExternalProtocolHandlerWorker( | 15 FakeExternalProtocolHandlerWorker( |
14 ShellIntegration::DefaultWebClientObserver* observer, | 16 ShellIntegration::DefaultWebClientObserver* observer, |
15 const std::string& protocol, | 17 const std::string& protocol, |
16 ShellIntegration::DefaultWebClientState os_state) | 18 ShellIntegration::DefaultWebClientState os_state) |
17 : ShellIntegration::DefaultProtocolClientWorker(observer, protocol), | 19 : ShellIntegration::DefaultProtocolClientWorker(observer, protocol), |
18 os_state_(os_state) {} | 20 os_state_(os_state) {} |
19 | 21 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 DoTest(ExternalProtocolHandler::UNKNOWN, | 176 DoTest(ExternalProtocolHandler::UNKNOWN, |
175 ShellIntegration::NOT_DEFAULT_WEB_CLIENT, | 177 ShellIntegration::NOT_DEFAULT_WEB_CLIENT, |
176 true, false, false); | 178 true, false, false); |
177 } | 179 } |
178 | 180 |
179 TEST_F(ExternalProtocolHandlerTest, TestLaunchSchemeUnknownChromeUnknown) { | 181 TEST_F(ExternalProtocolHandlerTest, TestLaunchSchemeUnknownChromeUnknown) { |
180 DoTest(ExternalProtocolHandler::UNKNOWN, | 182 DoTest(ExternalProtocolHandler::UNKNOWN, |
181 ShellIntegration::UNKNOWN_DEFAULT_WEB_CLIENT, | 183 ShellIntegration::UNKNOWN_DEFAULT_WEB_CLIENT, |
182 true, false, false); | 184 true, false, false); |
183 } | 185 } |
OLD | NEW |