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

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

Issue 679273002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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/values.h" 9 #include "base/values.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 12 matching lines...) Expand all
23 // global s_test_ which should point to |this| for the duration of the test run 23 // global s_test_ which should point to |this| for the duration of the test run
24 // and be cleared afterward. 24 // and be cleared afterward.
25 class WebUIBrowserExpectFailTest : public WebUIBrowserTest { 25 class WebUIBrowserExpectFailTest : public WebUIBrowserTest {
26 public: 26 public:
27 WebUIBrowserExpectFailTest() { 27 WebUIBrowserExpectFailTest() {
28 EXPECT_FALSE(s_test_); 28 EXPECT_FALSE(s_test_);
29 s_test_ = this; 29 s_test_ = this;
30 } 30 }
31 31
32 protected: 32 protected:
33 virtual ~WebUIBrowserExpectFailTest() { 33 ~WebUIBrowserExpectFailTest() override {
34 EXPECT_TRUE(s_test_); 34 EXPECT_TRUE(s_test_);
35 s_test_ = NULL; 35 s_test_ = NULL;
36 } 36 }
37 37
38 static void RunJavascriptTestNoReturn(const std::string& testname) { 38 static void RunJavascriptTestNoReturn(const std::string& testname) {
39 EXPECT_TRUE(s_test_); 39 EXPECT_TRUE(s_test_);
40 s_test_->RunJavascriptTest(testname); 40 s_test_->RunJavascriptTest(testname);
41 } 41 }
42 42
43 static void RunJavascriptAsyncTestNoReturn(const std::string& testname) { 43 static void RunJavascriptAsyncTestNoReturn(const std::string& testname) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // testDone directly and expect pass result. 236 // testDone directly and expect pass result.
237 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { 237 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) {
238 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); 238 ASSERT_TRUE(RunJavascriptAsyncTest("testDone"));
239 } 239 }
240 240
241 // Test that calling testDone during RunJavascriptTest still completes when 241 // Test that calling testDone during RunJavascriptTest still completes when
242 // waiting for async result. 242 // waiting for async result.
243 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { 243 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) {
244 ASSERT_TRUE(RunJavascriptTest("testDone")); 244 ASSERT_TRUE(RunJavascriptTest("testDone"));
245 } 245 }
OLDNEW
« no previous file with comments | « chrome/test/base/web_ui_browser_test.h ('k') | chrome/test/chromedriver/net/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698