| Index: chrome/browser/ui/toolbar/toolbar_model_unittest.cc
|
| diff --git a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
|
| index 56f24e616dbc4044694325b7a9b361e3de986dc9..244638ded35b4c06ecc625a4326ef15b641a9bb9 100644
|
| --- a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
|
| +++ b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
|
| @@ -176,8 +176,7 @@ class ToolbarModelTest : public BrowserWithTestWindowTest {
|
|
|
| // Test that we don't replace any URLs when the InstantExtended API is disabled.
|
| TEST_F(ToolbarModelTest, ShouldDisplayURLInstantExtendedAPIDisabled) {
|
| - ASSERT_FALSE(CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableInstantExtendedAPI))
|
| + ASSERT_FALSE(chrome::search::IsInstantExtendedAPIEnabled(profile()))
|
| << "This test expects Extended Instant to be disabled.";
|
|
|
| ResetDefaultTemplateURL();
|
| @@ -194,12 +193,7 @@ TEST_F(ToolbarModelTest, ShouldDisplayURLInstantExtendedAPIDisabled) {
|
|
|
| // Test that we replace URLs when the InstantExtended API is enabled.
|
| TEST_F(ToolbarModelTest, ShouldDisplayURLInstantExtendedAPIEnabled) {
|
| - CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - switches::kEnableInstantExtendedAPI);
|
| -
|
| - // Avoid tests on branded Chrome where channel is set to CHANNEL_STABLE.
|
| - if (!chrome::search::IsInstantExtendedAPIEnabled(profile()))
|
| - return;
|
| + chrome::search::SetForceInstantExtendedAPIEnabledForTesting(true);
|
|
|
| ResetDefaultTemplateURL();
|
| AddTab(browser(), GURL(chrome::kAboutBlankURL));
|
| @@ -211,4 +205,6 @@ TEST_F(ToolbarModelTest, ShouldDisplayURLInstantExtendedAPIEnabled) {
|
| test_item.would_replace,
|
| test_item.should_display);
|
| }
|
| +
|
| + chrome::search::SetForceInstantExtendedAPIEnabledForTesting(false);
|
| }
|
|
|