Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_TEST_BROWSER_TESTS_BLIMP_BROWSER_TEST_H_ | |
| 6 #define BLIMP_TEST_BROWSER_TESTS_BLIMP_BROWSER_TEST_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include "content/public/test/browser_test_base.h" | |
|
mmenke
2016/05/03 21:21:53
nit: Blank line between standard and chrome heade
haibinlu
2016/05/04 21:55:23
Done.
| |
| 10 | |
| 11 namespace base { | |
| 12 class RunLoop; | |
| 13 } | |
| 14 | |
| 15 namespace content { | |
| 16 class WebContents; | |
| 17 } | |
| 18 | |
| 19 namespace blimp { | |
| 20 | |
| 21 // Base class for tests which require a full instance of the Blimp engine. | |
| 22 class BlimpBrowserTest : public content::BrowserTestBase { | |
| 23 public: | |
| 24 // Notify that an asynchronous test is now complete and the test runner should | |
| 25 // exit. | |
| 26 void QuitRunLoop(); | |
| 27 | |
| 28 protected: | |
| 29 BlimpBrowserTest(); | |
| 30 ~BlimpBrowserTest() override; | |
| 31 | |
| 32 // Run an asynchronous test in a nested run loop. The caller should call | |
| 33 // QuitRunLoop() to notify that the test should finish. | |
| 34 void RunUntilQuit(); | |
| 35 | |
| 36 // testing::Test implementation. | |
| 37 void SetUp() override; | |
| 38 | |
| 39 // content::BrowserTestBase implementation. | |
| 40 void RunTestOnMainThreadLoop() override; | |
| 41 void SetUpOnMainThread() override; | |
| 42 void TearDownOnMainThread() override; | |
| 43 void SetUpCommandLine(base::CommandLine* command_line) override; | |
| 44 | |
| 45 private: | |
| 46 std::unique_ptr<base::RunLoop> run_loop_; | |
| 47 | |
| 48 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserTest); | |
| 49 }; | |
| 50 | |
| 51 } // namespace blimp | |
| 52 | |
| 53 #endif // BLIMP_TEST_BROWSER_TESTS_BLIMP_BROWSER_TEST_H_ | |
| OLD | NEW |