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

Unified 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, 8 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 side-by-side diff with in-line comments
Download patch
Index: blimp/test/blimp_browser_test.h
diff --git a/blimp/test/blimp_browser_test.h b/blimp/test/blimp_browser_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..6fba55a5329da7a6489d32bbf8d959d19be3bd3b
--- /dev/null
+++ b/blimp/test/blimp_browser_test.h
@@ -0,0 +1,53 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_TEST_BLIMP_BROWSER_TEST_H_
+#define BLIMP_TEST_BLIMP_BROWSER_TEST_H_
+
+#include <memory>
+#include "content/public/test/browser_test_base.h"
+
+namespace base {
+class RunLoop;
+}
+
+namespace content {
+class WebContents;
+}
+
+namespace blimp {
+
+// 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.
+class BlimpBrowserTest : public content::BrowserTestBase {
+ public:
+ // Notify that an asynchronous test is now complete and the test runner should
+ // exit.
+ 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.
+
+ protected:
+ BlimpBrowserTest();
+ ~BlimpBrowserTest() override;
+
+ // testing::Test implementation.
+ void SetUp() override;
+
+ // content::BrowserTestBase implementation.
+ void RunTestOnMainThreadLoop() override;
+ void SetUpOnMainThread() override;
+ void TearDownOnMainThread() override;
+ void SetUpCommandLine(base::CommandLine* command_line) override;
+
+ // 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.
+ // FinishAsynchronousTest() to notify that the test should finish.
+ 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.
+
+ private:
+ std::unique_ptr<base::RunLoop> run_loop_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlimpBrowserTest);
+};
+
+} // namespace blimp
+
+#endif // BLIMP_TEST_BLIMP_BROWSER_TEST_H_

Powered by Google App Engine
This is Rietveld 408576698