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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_model_unittest.cc

Issue 10949031: Disable ToolbarModelTest.ShouldDisplayURLInstantExtendedAPIEnabled on branch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months 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 | « no previous file | 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) 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 "chrome/browser/ui/toolbar/toolbar_model.h" 5 #include "chrome/browser/ui/toolbar/toolbar_model.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/search_engines/template_url.h" 9 #include "chrome/browser/search_engines/template_url.h"
10 #include "chrome/browser/search_engines/template_url_service.h" 10 #include "chrome/browser/search_engines/template_url_service.h"
11 #include "chrome/browser/search_engines/template_url_service_factory.h" 11 #include "chrome/browser/search_engines/template_url_service_factory.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_tabstrip.h" 13 #include "chrome/browser/ui/browser_tabstrip.h"
14 #include "chrome/browser/ui/search/search.h"
14 #include "chrome/browser/ui/toolbar/toolbar_model.h" 15 #include "chrome/browser/ui/toolbar/toolbar_model.h"
15 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
16 #include "chrome/test/base/browser_with_test_window_test.h" 17 #include "chrome/test/base/browser_with_test_window_test.h"
17 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
18 #include "content/public/common/url_constants.h" 19 #include "content/public/common/url_constants.h"
19 20
20 using content::OpenURLParams; 21 using content::OpenURLParams;
21 using content::Referrer; 22 using content::Referrer;
22 using content::WebContents; 23 using content::WebContents;
23 24
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 false, 182 false,
182 test_item.should_display); 183 test_item.should_display);
183 } 184 }
184 } 185 }
185 186
186 // Test that we don't replace any URLs when the InstantExtended API is enabled. 187 // Test that we don't replace any URLs when the InstantExtended API is enabled.
187 TEST_F(ToolbarModelTest, ShouldDisplayURLInstantExtendedAPIEnabled) { 188 TEST_F(ToolbarModelTest, ShouldDisplayURLInstantExtendedAPIEnabled) {
188 CommandLine::ForCurrentProcess()->AppendSwitch( 189 CommandLine::ForCurrentProcess()->AppendSwitch(
189 switches::kEnableInstantExtendedAPI); 190 switches::kEnableInstantExtendedAPI);
190 191
192 // Avoid tests on branded Chrome where channel is set to CHANNEL_STABLE.
193 if (!chrome::search::IsInstantExtendedAPIEnabled(profile()))
194 return;
195
191 ResetDefaultTemplateURL(); 196 ResetDefaultTemplateURL();
192 AddTab(browser(), GURL(chrome::kAboutBlankURL)); 197 AddTab(browser(), GURL(chrome::kAboutBlankURL));
193 for (size_t i = 0; i < arraysize(test_items); ++i) { 198 for (size_t i = 0; i < arraysize(test_items); ++i) {
194 const TestItem& test_item = test_items[i]; 199 const TestItem& test_item = test_items[i];
195 NavigateAndCheckText(test_item.url, 200 NavigateAndCheckText(test_item.url,
196 test_item.expected_text, 201 test_item.expected_text,
197 test_item.expected_replace_text_active, 202 test_item.expected_replace_text_active,
198 test_item.would_replace, 203 test_item.would_replace,
199 test_item.should_display); 204 test_item.should_display);
200 } 205 }
201 } 206 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698