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

Side by Side Diff: ui/views/test/views_test_base.h

Issue 11801027: More work to make ash_unittests pass when we require context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TableViewTest by making it a ViewsTestBase. Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/table/table_view_unittest.cc ('k') | ui/views/test/views_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 30 matching lines...) Expand all
41 void set_views_delegate(TestViewsDelegate* views_delegate) { 41 void set_views_delegate(TestViewsDelegate* views_delegate) {
42 views_delegate_.reset(views_delegate); 42 views_delegate_.reset(views_delegate);
43 } 43 }
44 44
45 MessageLoop* message_loop() { return &message_loop_; } 45 MessageLoop* message_loop() { return &message_loop_; }
46 46
47 // Creates a widget of |type| with any platform specific data for use in 47 // Creates a widget of |type| with any platform specific data for use in
48 // cross-platform tests. 48 // cross-platform tests.
49 Widget::InitParams CreateParams(Widget::InitParams::Type type); 49 Widget::InitParams CreateParams(Widget::InitParams::Type type);
50 50
51 // Returns a context view. In aura builds, this will be the
52 // RootWindow. Everywhere else, NULL.
53 gfx::NativeView GetContext();
54
51 private: 55 private:
52 MessageLoopForUI message_loop_; 56 MessageLoopForUI message_loop_;
53 scoped_ptr<TestViewsDelegate> views_delegate_; 57 scoped_ptr<TestViewsDelegate> views_delegate_;
54 #if defined(USE_AURA) 58 #if defined(USE_AURA)
55 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; 59 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
56 #endif 60 #endif
57 bool setup_called_; 61 bool setup_called_;
58 bool teardown_called_; 62 bool teardown_called_;
59 63
60 #if defined(OS_WIN) 64 #if defined(OS_WIN)
61 ui::ScopedOleInitializer ole_initializer_; 65 ui::ScopedOleInitializer ole_initializer_;
62 #endif 66 #endif
63 67
64 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); 68 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase);
65 }; 69 };
66 70
67 } // namespace views 71 } // namespace views
68 72
69 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 73 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/table/table_view_unittest.cc ('k') | ui/views/test/views_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698