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

Unified Diff: ash/test/ash_test_environment_content.h

Issue 2296973002: Moves ash content specific tests into ash_content_unittests (Closed)
Patch Set: add dep to base test suport Created 4 years, 3 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
« no previous file with comments | « ash/test/ash_test_environment.h ('k') | ash/test/ash_test_environment_content.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_environment_content.h
diff --git a/ash/test/ash_test_environment_content.h b/ash/test/ash_test_environment_content.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb6596fbca1bc2aae977c16146a1856423da5415
--- /dev/null
+++ b/ash/test/ash_test_environment_content.h
@@ -0,0 +1,60 @@
+// 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 ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_
+#define ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_
+
+#include "ash/test/ash_test_environment.h"
+#include "base/macros.h"
+
+namespace content {
+class TestBrowserThreadBundle;
+}
+
+namespace ash {
+
+class ShellContentState;
+
+namespace test {
+
+class TestShellContentState;
+
+// AshTestEnvironment implementation for tests that use content.
+class AshTestEnvironmentContent : public AshTestEnvironment {
+ public:
+ AshTestEnvironmentContent();
+ ~AshTestEnvironmentContent() override;
+
+ TestShellContentState* test_shell_content_state() {
+ return test_shell_content_state_;
+ }
+ void set_content_state(ShellContentState* content_state) {
+ content_state_ = content_state;
+ }
+
+ // AshTestEnvironment:
+ void SetUp() override;
+ void TearDown() override;
+ base::SequencedWorkerPool* GetBlockingPool() override;
+ std::unique_ptr<views::ViewsDelegate> CreateViewsDelegate() override;
+
+ private:
+ std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
+
+ // An implementation of ShellContentState supplied by the user prior to
+ // SetUp().
+ ShellContentState* content_state_ = nullptr;
+
+ // If |content_state_| is not set prior to SetUp(), this value will be
+ // set to an instance of TestShellContentState created by this class. If
+ // |content_state_| is non-null, this will be nullptr.
+ TestShellContentState* test_shell_content_state_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(AshTestEnvironmentContent);
+};
+
+} // namespace test
+} // namespace ash
+
+#endif // ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_
« no previous file with comments | « ash/test/ash_test_environment.h ('k') | ash/test/ash_test_environment_content.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698