Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 CHROME_TEST_BASE_CHROME_VIEWS_TEST_HELPER_H_ | |
| 6 #define CHROME_TEST_BASE_CHROME_VIEWS_TEST_HELPER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/gfx/native_widget_types.h" | |
| 10 | |
| 11 namespace ui { | |
| 12 class ContextFactory; | |
| 13 } | |
| 14 | |
| 15 // A helper class owned by tests that performs platform specific initialization. | |
| 16 // ChromeViewsTestHelper behaves like views::ViewsTestHelper, but on ChromeOS it | |
| 17 // will create an Ash shell environment, rather than using an AuraTestHelper. | |
| 18 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
| |
| 19 public: | |
| 20 virtual ~ChromeViewsTestHelper() {} | |
| 21 | |
| 22 // Create a platform specific instance. | |
| 23 static ChromeViewsTestHelper* Create(); | |
| 24 | |
| 25 // Set up the platform-specific environment, returning the Ash root window on | |
| 26 // ash environments. Otherwise NULL. | |
| 27 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
| |
| 28 ui::ContextFactory* context_factory) = 0; | |
| 29 | |
| 30 // Tear down the platform-specific environment. | |
| 31 virtual void PlatformTearDown() = 0; | |
| 32 | |
| 33 protected: | |
| 34 ChromeViewsTestHelper() {} | |
| 35 | |
| 36 private: | |
| 37 DISALLOW_COPY_AND_ASSIGN(ChromeViewsTestHelper); | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_TEST_BASE_CHROME_VIEWS_TEST_HELPER_H_ | |
| OLD | NEW |