Durable Storage: Refactor browser test and test the basic "deny" flow.
[chromium-blink-merge.git] / chrome / test / base / view_event_test_platform_part.h
blob4fe53fcd4ce4201e8fd0826b9452c014d037cb96
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"
11 namespace ui {
12 class ContextFactory;
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
18 // AuraTestHelper.
19 class ViewEventTestPlatformPart {
20 public:
21 virtual ~ViewEventTestPlatformPart() {}
23 // Set up the platform-specific environment. Teardown is performed in the
24 // destructor.
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;
31 protected:
32 ViewEventTestPlatformPart() {}
34 private:
35 DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPart);
38 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_