| 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/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/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" |
| 11 #include "chrome/test/base/in_process_browser_test.h" | 11 #include "chrome/test/base/in_process_browser_test.h" |
| 12 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "content/public/common/url_constants.h" | 14 #include "content/public/common/url_constants.h" |
| 15 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
| 16 #include "net/test/spawned_test_server.h" | 16 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 struct IsSearchProviderTestData { | 20 struct IsSearchProviderTestData { |
| 21 IsSearchProviderTestData() : tab(NULL) {} | 21 IsSearchProviderTestData() : tab(NULL) {} |
| 22 IsSearchProviderTestData(content::WebContents* t, std::string h, GURL url) | 22 IsSearchProviderTestData(content::WebContents* t, std::string h, GURL url) |
| 23 : tab(t), host(h), test_url(url) { | 23 : tab(t), host(h), test_url(url) { |
| 24 } | 24 } |
| 25 | 25 |
| 26 content::WebContents* tab; | 26 content::WebContents* tab; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 IN_PROC_BROWSER_TEST_F(SearchProviderTest, | 137 IN_PROC_BROWSER_TEST_F(SearchProviderTest, |
| 138 TestIsSearchProviderInstalledWithException) { | 138 TestIsSearchProviderInstalledWithException) { |
| 139 // Change the url for the test page to one that throws an exception when | 139 // Change the url for the test page to one that throws an exception when |
| 140 // toString is called on the argument given to isSearchProviderInstalled. | 140 // toString is called on the argument given to isSearchProviderInstalled. |
| 141 search_provider_test_url_ = test_server()->GetURL( | 141 search_provider_test_url_ = test_server()->GetURL( |
| 142 "files/is_search_provider_installed_with_exception.html"); | 142 "files/is_search_provider_installed_with_exception.html"); |
| 143 | 143 |
| 144 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest( | 144 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest( |
| 145 browser(), "www.google.com", "")); | 145 browser(), "www.google.com", "")); |
| 146 } | 146 } |
| OLD | NEW |