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

Side by Side Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 1311333005: Disable material design downloads UI from some tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 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
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/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 EXPECT_EQ(browser, params.browser); 195 EXPECT_EQ(browser, params.browser);
196 EXPECT_EQ(1, browser->tab_strip_model()->count()); 196 EXPECT_EQ(1, browser->tab_strip_model()->count());
197 EXPECT_EQ(GURL(url::kAboutBlankURL), 197 EXPECT_EQ(GURL(url::kAboutBlankURL),
198 browser->tab_strip_model()->GetActiveWebContents()->GetURL()); 198 browser->tab_strip_model()->GetActiveWebContents()->GetURL());
199 } 199 }
200 200
201 void BrowserNavigatorTest::SetUpCommandLine(base::CommandLine* command_line) { 201 void BrowserNavigatorTest::SetUpCommandLine(base::CommandLine* command_line) {
202 // Disable settings-in-a-window so that we can use the settings page and 202 // Disable settings-in-a-window so that we can use the settings page and
203 // sub-pages to test browser navigation. 203 // sub-pages to test browser navigation.
204 command_line->AppendSwitch(::switches::kDisableSettingsWindow); 204 command_line->AppendSwitch(::switches::kDisableSettingsWindow);
205
206 // Disable new downloads UI as it is very very slow. https://crbug.com/526577
207 // TODO(dbeam): remove this once the downloads UI is not slow.
208 command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads);
205 } 209 }
206 210
207 void BrowserNavigatorTest::Observe( 211 void BrowserNavigatorTest::Observe(
208 int type, 212 int type,
209 const content::NotificationSource& source, 213 const content::NotificationSource& source,
210 const content::NotificationDetails& details) { 214 const content::NotificationDetails& details) {
211 switch (type) { 215 switch (type) {
212 case content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED: { 216 case content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED: {
213 ++this->created_tab_contents_count_; 217 ++this->created_tab_contents_count_;
214 break; 218 break;
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 EXPECT_EQ(expected_title, params.target_contents->GetTitle()); 1410 EXPECT_EQ(expected_title, params.target_contents->GetTitle());
1407 // GURL always keeps non-ASCII characters escaped, but check them anyways. 1411 // GURL always keeps non-ASCII characters escaped, but check them anyways.
1408 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec()); 1412 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec());
1409 // Check the omnibox text. It should have escaped RTL with unescaped text. 1413 // Check the omnibox text. It should have escaped RTL with unescaped text.
1410 LocationBar* location_bar = browser()->window()->GetLocationBar(); 1414 LocationBar* location_bar = browser()->window()->GetLocationBar();
1411 OmniboxView* omnibox_view = location_bar->GetOmniboxView(); 1415 OmniboxView* omnibox_view = location_bar->GetOmniboxView();
1412 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText()); 1416 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText());
1413 } 1417 }
1414 1418
1415 } // namespace 1419 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698