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

Side by Side Diff: blimp/test/blimp_browser_test.h

Issue 1929723002: [Blimp] Adds blimp engine browser test framework and LoadUrl test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addresses comments and rebases Created 4 years, 7 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
(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_BLIMP_BROWSER_TEST_H_
6 #define BLIMP_TEST_BLIMP_BROWSER_TEST_H_
7
8 #include <memory>
9 #include "content/public/test/browser_test_base.h"
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.
Kevin M 2016/05/02 21:32:40 Capitalize Blimp
haibinlu 2016/05/03 19:32:43 Done.
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 FinishAsynchronousTest();
Kevin M 2016/05/02 21:32:40 Make this protected? Call it "QuitRunLoop"? This
haibinlu 2016/05/03 19:32:43 Done.
27
28 protected:
29 BlimpBrowserTest();
30 ~BlimpBrowserTest() override;
31
32 // testing::Test implementation.
33 void SetUp() override;
34
35 // content::BrowserTestBase implementation.
36 void RunTestOnMainThreadLoop() override;
37 void SetUpOnMainThread() override;
38 void TearDownOnMainThread() override;
39 void SetUpCommandLine(base::CommandLine* command_line) override;
40
41 // Run an asynchronous test in a nested run loop. The caller should call
Kevin M 2016/05/02 21:32:40 Put this before the overrides
haibinlu 2016/05/03 19:32:43 Done.
42 // FinishAsynchronousTest() to notify that the test should finish.
43 void RunAsynchronousTest();
Kevin M 2016/05/02 21:32:40 This isn't running the test - it's running the pro
haibinlu 2016/05/03 19:32:43 Done.
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_BLIMP_BROWSER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698