Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: chrome/renderer/external_extension_uitest.cc

Issue 8486025: Remove the ability to set the default search engine from JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/external_extension.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/string_util.h" 5 #include "base/string_util.h"
6 #include "base/test/test_timeouts.h" 6 #include "base/test/test_timeouts.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/test/automation/automation_proxy.h" 10 #include "chrome/test/automation/automation_proxy.h"
(...skipping 27 matching lines...) Expand all
38 SearchProviderTest::SearchProviderTest() 38 SearchProviderTest::SearchProviderTest()
39 : test_server_(net::TestServer::TYPE_HTTP, 39 : test_server_(net::TestServer::TYPE_HTTP,
40 FilePath(FILE_PATH_LITERAL("chrome/test/data"))), 40 FilePath(FILE_PATH_LITERAL("chrome/test/data"))),
41 test_server_started_(false) { 41 test_server_started_(false) {
42 // The test_server is started in the constructor (rather than the test body) 42 // The test_server is started in the constructor (rather than the test body)
43 // so the mapping rules below can include the ephemeral port number. 43 // so the mapping rules below can include the ephemeral port number.
44 test_server_started_ = test_server_.Start(); 44 test_server_started_ = test_server_.Start();
45 if (!test_server_started_) 45 if (!test_server_started_)
46 return; 46 return;
47 47
48 // Enable the search provider additions.
49 launch_arguments_.AppendSwitch(switches::kEnableSearchProviderApiV2);
50
51 // Map all hosts to our local server. 48 // Map all hosts to our local server.
52 std::string host_rule("MAP * " + test_server_.host_port_pair().ToString()); 49 std::string host_rule("MAP * " + test_server_.host_port_pair().ToString());
53 launch_arguments_.AppendSwitchASCII(switches::kHostRules, host_rule); 50 launch_arguments_.AppendSwitchASCII(switches::kHostRules, host_rule);
54 51
55 // Get the url for the test page. 52 // Get the url for the test page.
56 search_provider_test_url_ = 53 search_provider_test_url_ =
57 test_server_.GetURL("files/is_search_provider_installed.html"); 54 test_server_.GetURL("files/is_search_provider_installed.html");
58 } 55 }
59 56
60 struct IsSearchProviderTestData { 57 struct IsSearchProviderTestData {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 TEST_F(SearchProviderTest, TestIsSearchProviderInstalledWithException) { 183 TEST_F(SearchProviderTest, TestIsSearchProviderInstalledWithException) {
187 // Change the url for the test page to one that throws an exception when 184 // Change the url for the test page to one that throws an exception when
188 // toString is called on the argument given to isSearchProviderInstalled. 185 // toString is called on the argument given to isSearchProviderInstalled.
189 search_provider_test_url_ = test_server_.GetURL( 186 search_provider_test_url_ = test_server_.GetURL(
190 "files/is_search_provider_installed_with_exception.html"); 187 "files/is_search_provider_installed_with_exception.html");
191 188
192 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 189 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
193 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest( 190 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest(
194 browser, "www.google.com", "")); 191 browser, "www.google.com", ""));
195 } 192 }
OLDNEW
« no previous file with comments | « chrome/renderer/external_extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698