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

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

Issue 8581003: views: Move ime and test directories to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux Created 9 years, 1 month 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 | « views/test/test_views_delegate.cc ('k') | 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
(Empty)
1 // Copyright (c) 2011 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 VIEWS_TEST_VIEWS_TEST_BASE_H_
6 #define VIEWS_TEST_VIEWS_TEST_BASE_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "views/test/test_views_delegate.h"
13
14 namespace views {
15
16 class TestViewsDelegate;
17
18 // A base class for views unit test. It creates a message loop necessary
19 // to drive UI events and takes care of OLE initialization for windows.
20 class ViewsTestBase : public testing::Test {
21 public:
22 ViewsTestBase();
23 virtual ~ViewsTestBase();
24
25 // testing::Test:
26 virtual void SetUp() OVERRIDE;
27 virtual void TearDown() OVERRIDE;
28
29 void RunPendingMessages();
30
31 protected:
32 TestViewsDelegate& views_delegate() const { return *views_delegate_.get(); }
33
34 void set_views_delegate(TestViewsDelegate* views_delegate) {
35 views_delegate_.reset(views_delegate);
36 }
37
38 private:
39 MessageLoopForUI message_loop_;
40 scoped_ptr<TestViewsDelegate> views_delegate_;
41 bool setup_called_;
42 bool teardown_called_;
43
44 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase);
45 };
46
47 } // namespace views
48
49 #endif // VIEWS_TEST_VIEWS_TEST_BASE_H_
OLDNEW
« no previous file with comments | « views/test/test_views_delegate.cc ('k') | views/test/views_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698