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

Unified Diff: chrome/test/base/chrome_views_test_helper.h

Issue 443553003: MacViews: Split ViewEventTestBase into platform-specific files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: chrome/test/base/chrome_views_test_helper.h
diff --git a/chrome/test/base/chrome_views_test_helper.h b/chrome/test/base/chrome_views_test_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..668991596d1dd6673c8afae56370a7cd364d8eaf
--- /dev/null
+++ b/chrome/test/base/chrome_views_test_helper.h
@@ -0,0 +1,40 @@
+// Copyright 2014 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 CHROME_TEST_BASE_CHROME_VIEWS_TEST_HELPER_H_
+#define CHROME_TEST_BASE_CHROME_VIEWS_TEST_HELPER_H_
+
+#include "base/macros.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui {
+class ContextFactory;
+}
+
+// A helper class owned by tests that performs platform specific initialization.
+// ChromeViewsTestHelper behaves like views::ViewsTestHelper, but on ChromeOS it
+// will create an Ash shell environment, rather than using an AuraTestHelper.
+class ChromeViewsTestHelper {
sky 2014/08/06 17:37:44 Can we name this better to indicate what it is for
tapted 2014/08/11 12:04:17 I ended up with `ViewEventTestPlatFormPart*` - let
+ public:
+ virtual ~ChromeViewsTestHelper() {}
+
+ // Create a platform specific instance.
+ static ChromeViewsTestHelper* Create();
+
+ // Set up the platform-specific environment, returning the Ash root window on
+ // ash environments. Otherwise NULL.
+ virtual gfx::NativeWindow PlatformSetUp(
sky 2014/08/06 17:37:44 Do we really need the two virtual methods? Can't C
tapted 2014/08/11 12:04:17 Done (mostly). There was code in view_event_test_b
+ ui::ContextFactory* context_factory) = 0;
+
+ // Tear down the platform-specific environment.
+ virtual void PlatformTearDown() = 0;
+
+ protected:
+ ChromeViewsTestHelper() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeViewsTestHelper);
+};
+
+#endif // CHROME_TEST_BASE_CHROME_VIEWS_TEST_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698