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

Side by Side Diff: chrome/test/base/web_ui_browser_test_browsertest.cc

Issue 1710083005: Remove old downloads UI; Material Design version is now the default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove testing/ Created 4 years, 10 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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | third_party/closure_compiler/compiled_resources.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 // the statement must be statically available. Therefore, we make a static 25 // the statement must be statically available. Therefore, we make a static
26 // global s_test_ which should point to |this| for the duration of the test run 26 // global s_test_ which should point to |this| for the duration of the test run
27 // and be cleared afterward. 27 // and be cleared afterward.
28 class WebUIBrowserExpectFailTest : public WebUIBrowserTest { 28 class WebUIBrowserExpectFailTest : public WebUIBrowserTest {
29 public: 29 public:
30 WebUIBrowserExpectFailTest() { 30 WebUIBrowserExpectFailTest() {
31 EXPECT_FALSE(s_test_); 31 EXPECT_FALSE(s_test_);
32 s_test_ = this; 32 s_test_ = this;
33 } 33 }
34 34
35 // Disable new downloads UI as it is very very slow. https://crbug.com/526577
36 // TODO(dbeam): remove this once the downloads UI is not slow.
37 void SetUpCommandLine(base::CommandLine* command_line) override {
38 WebUIBrowserTest::SetUpCommandLine(command_line);
39 command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads);
40 }
41
42 protected: 35 protected:
43 ~WebUIBrowserExpectFailTest() override { 36 ~WebUIBrowserExpectFailTest() override {
44 EXPECT_TRUE(s_test_); 37 EXPECT_TRUE(s_test_);
45 s_test_ = NULL; 38 s_test_ = NULL;
46 } 39 }
47 40
48 static void RunJavascriptTestNoReturn(const std::string& testname) { 41 static void RunJavascriptTestNoReturn(const std::string& testname) {
49 EXPECT_TRUE(s_test_); 42 EXPECT_TRUE(s_test_);
50 s_test_->RunJavascriptTest(testname); 43 s_test_->RunJavascriptTest(testname);
51 } 44 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // testDone directly and expect pass result. 239 // testDone directly and expect pass result.
247 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { 240 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) {
248 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); 241 ASSERT_TRUE(RunJavascriptAsyncTest("testDone"));
249 } 242 }
250 243
251 // Test that calling testDone during RunJavascriptTest still completes when 244 // Test that calling testDone during RunJavascriptTest still completes when
252 // waiting for async result. 245 // waiting for async result.
253 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { 246 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) {
254 ASSERT_TRUE(RunJavascriptTest("testDone")); 247 ASSERT_TRUE(RunJavascriptTest("testDone"));
255 } 248 }
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | third_party/closure_compiler/compiled_resources.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698