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.
5 #ifndef CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
6 #define CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
8 #include "base/macros.h"
9 #include "ui/gfx/native_widget_types.h"
15 // A helper class owned by tests that performs platform specific initialization.
16 // ViewEventTestPlatformPart behaves a bit like views::ViewsTestHelper, but on
17 // ChromeOS it will create an Ash shell environment, rather than using an
19 class ViewEventTestPlatformPart
{
21 virtual ~ViewEventTestPlatformPart() {}
23 // Set up the platform-specific environment. Teardown is performed in the
25 static ViewEventTestPlatformPart
* Create(ui::ContextFactory
* context_factory
);
27 // The Widget context for creating the test window. This will be the Ash root
28 // window on ChromeOS environments. Otherwise it should return NULL.
29 virtual gfx::NativeWindow
GetContext() = 0;
32 ViewEventTestPlatformPart() {}
35 DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPart
);
38 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_