| 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 "base/strings/string_util.h" | 6 #include "base/strings/string_util.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 std::string host; | 27 std::string host; |
| 28 GURL test_url; | 28 GURL test_url; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 } | 31 } |
| 32 | 32 |
| 33 class SearchProviderTest : public InProcessBrowserTest { | 33 class SearchProviderTest : public InProcessBrowserTest { |
| 34 protected: | 34 protected: |
| 35 SearchProviderTest() {} | 35 SearchProviderTest() {} |
| 36 | 36 |
| 37 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 37 virtual void SetUpCommandLine(CommandLine* command_line) override { |
| 38 ASSERT_TRUE(test_server()->Start()); | 38 ASSERT_TRUE(test_server()->Start()); |
| 39 | 39 |
| 40 // Map all hosts to our local server. | 40 // Map all hosts to our local server. |
| 41 std::string host_rule( | 41 std::string host_rule( |
| 42 "MAP * " + test_server()->host_port_pair().ToString()); | 42 "MAP * " + test_server()->host_port_pair().ToString()); |
| 43 command_line->AppendSwitchASCII(switches::kHostRules, host_rule); | 43 command_line->AppendSwitchASCII(switches::kHostRules, host_rule); |
| 44 // Use no proxy or otherwise this test will fail on a machine that has a | 44 // Use no proxy or otherwise this test will fail on a machine that has a |
| 45 // proxy configured. | 45 // proxy configured. |
| 46 command_line->AppendSwitch(switches::kNoProxyServer); | 46 command_line->AppendSwitch(switches::kNoProxyServer); |
| 47 | 47 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 IN_PROC_BROWSER_TEST_F(SearchProviderTest, | 141 IN_PROC_BROWSER_TEST_F(SearchProviderTest, |
| 142 TestIsSearchProviderInstalledWithException) { | 142 TestIsSearchProviderInstalledWithException) { |
| 143 // Change the url for the test page to one that throws an exception when | 143 // Change the url for the test page to one that throws an exception when |
| 144 // toString is called on the argument given to isSearchProviderInstalled. | 144 // toString is called on the argument given to isSearchProviderInstalled. |
| 145 search_provider_test_url_ = test_server()->GetURL( | 145 search_provider_test_url_ = test_server()->GetURL( |
| 146 "files/is_search_provider_installed_with_exception.html"); | 146 "files/is_search_provider_installed_with_exception.html"); |
| 147 | 147 |
| 148 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest( | 148 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest( |
| 149 browser(), "www.google.com", "")); | 149 browser(), "www.google.com", "")); |
| 150 } | 150 } |
| OLD | NEW |