Commit f3c6fac0 authored by benwells's avatar benwells Committed by Commit bot

Disable material design downloads UI from some tests.

The new material design downloads UI is very slow, and causes some tests
to timeout on memory bots.

BUG=526577

Review URL: https://codereview.chromium.org/1311333005

Cr-Commit-Position: refs/heads/master@{#346785}
parent d47a81ac
......@@ -704,6 +704,13 @@ class BrowserCloseManagerWithDownloadsBrowserTest :
ASSERT_TRUE(scoped_download_directory_.CreateUniqueTempDir());
}
// Disable new downloads UI as it is very very slow. https://crbug.com/526577
// TODO(dbeam): remove this once the downloads UI is not slow.
void SetUpCommandLine(base::CommandLine* command_line) override {
BrowserCloseManagerBrowserTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads);
}
void SetDownloadPathForProfile(Profile* profile) {
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile);
download_prefs->SetDownloadPath(download_path());
......
......@@ -1341,10 +1341,6 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutInvalid) {
ui_test_utils::NavigateToURL(browser(), history_url);
EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
GURL downloads_url(chrome::kChromeUIDownloadsURL);
ui_test_utils::NavigateToURL(browser(), downloads_url);
EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
GURL blank_url(url::kAboutBlankURL);
ui_test_utils::NavigateToURL(browser(), blank_url);
EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
......
......@@ -202,6 +202,10 @@ void BrowserNavigatorTest::SetUpCommandLine(base::CommandLine* command_line) {
// Disable settings-in-a-window so that we can use the settings page and
// sub-pages to test browser navigation.
command_line->AppendSwitch(::switches::kDisableSettingsWindow);
// Disable new downloads UI as it is very very slow. https://crbug.com/526577
// TODO(dbeam): remove this once the downloads UI is not slow.
command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads);
}
void BrowserNavigatorTest::Observe(
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
......@@ -24,6 +25,7 @@
#include "chrome/browser/ui/find_bar/find_notification_details.h"
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/find_in_page_observer.h"
#include "chrome/test/base/in_process_browser_test.h"
......@@ -83,6 +85,13 @@ class FindInPageControllerTest : public InProcessBrowserTest {
chrome::DisableFindBarAnimationsDuringTesting(true);
}
// Disable new downloads UI as it is very very slow. https://crbug.com/526577
// TODO(dbeam): remove this once the downloads UI is not slow.
void SetUpCommandLine(base::CommandLine* command_line) override {
InProcessBrowserTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads);
}
protected:
bool GetFindBarWindowInfoForBrowser(
Browser* browser, gfx::Point* position, bool* fully_visible) {
......
......@@ -6,7 +6,9 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/values.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/web_ui_browser_test.h"
......@@ -29,6 +31,13 @@ class WebUIBrowserExpectFailTest : public WebUIBrowserTest {
s_test_ = this;
}
// Disable new downloads UI as it is very very slow. https://crbug.com/526577
// TODO(dbeam): remove this once the downloads UI is not slow.
void SetUpCommandLine(base::CommandLine* command_line) override {
WebUIBrowserTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads);
}
protected:
~WebUIBrowserExpectFailTest() override {
EXPECT_TRUE(s_test_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment