Index: chrome/browser/policy/policy_browsertest.cc |
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc |
index 5bf43aec385061c0c2232db9de07558d1aed21b1..b40a0ab50d7173873e9c4ed2c0f9ed7433167db6 100644 |
--- a/chrome/browser/policy/policy_browsertest.cc |
+++ b/chrome/browser/policy/policy_browsertest.cc |
@@ -738,13 +738,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ForceSafeSearch) { |
IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) { |
MakeRequestFail("search.example"); |
- CommandLine::ForCurrentProcess()->AppendSwitch( |
- switches::kEnableInstantExtendedAPI); |
- |
- // Adding the kEnableInstantExtendedAPI is not enough since |
- // IsInstantExtendedAPIEnabled does not return true on CHANNEL_DEV. |
- if (!chrome::search::IsInstantExtendedAPIEnabled(browser()->profile())) |
- return; |
+ chrome::search::SetForceInstantExtendedAPIEnabledForTesting(true); |
// Verifies that a default search is made using the provider configured via |
// policy. Also checks that default search can be completely disabled. |
@@ -833,6 +827,8 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) { |
model = location_bar->GetLocationEntry()->model(); |
EXPECT_TRUE(model->CurrentMatch().destination_url.is_valid()); |
EXPECT_EQ(ASCIIToUTF16("foobar"), model->CurrentMatch().contents); |
+ |
+ chrome::search::SetForceInstantExtendedAPIEnabledForTesting(false); |
} |
// The linux and win bots can't create a GL context. http://crbug.com/103379 |