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

Side by Side Diff: chrome/test/base/view_event_test_base.h

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 years, 9 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 | « chrome/test/base/interactive_ui_tests_main.cc ('k') | chrome/test/base/view_event_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 CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ 5 #ifndef CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
6 #define CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ 6 #define CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
7 7
8 // We only want to use ViewEventTestBase in test targets which properly 8 // We only want to use ViewEventTestBase in test targets which properly
9 // isolate each test case by running each test in a separate process. 9 // isolate each test case by running each test in a separate process.
10 // This way if a test hangs the test launcher can reliably terminate it. 10 // This way if a test hangs the test launcher can reliably terminate it.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 class ViewEventTestBase : public views::WidgetDelegate, 78 class ViewEventTestBase : public views::WidgetDelegate,
79 public testing::Test { 79 public testing::Test {
80 public: 80 public:
81 ViewEventTestBase(); 81 ViewEventTestBase();
82 82
83 // Invoke when done either because of failure or success. Quits the message 83 // Invoke when done either because of failure or success. Quits the message
84 // loop. 84 // loop.
85 void Done(); 85 void Done();
86 86
87 static void SetUpTestCase();
88
87 // Creates a window. 89 // Creates a window.
88 virtual void SetUp() OVERRIDE; 90 virtual void SetUp() OVERRIDE;
89 91
90 // Destroys the window. 92 // Destroys the window.
91 virtual void TearDown() OVERRIDE; 93 virtual void TearDown() OVERRIDE;
92 94
93 // Overridden from views::WidgetDelegate: 95 // Overridden from views::WidgetDelegate:
94 virtual bool CanResize() const OVERRIDE; 96 virtual bool CanResize() const OVERRIDE;
95 virtual views::View* GetContentsView() OVERRIDE; 97 virtual views::View* GetContentsView() OVERRIDE;
96 virtual const views::Widget* GetWidget() const OVERRIDE; 98 virtual const views::Widget* GetWidget() const OVERRIDE;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Convenience macro for defining a ViewEventTestBase. See class description 167 // Convenience macro for defining a ViewEventTestBase. See class description
166 // of ViewEventTestBase for details. 168 // of ViewEventTestBase for details.
167 #define VIEW_TEST(test_class, name) \ 169 #define VIEW_TEST(test_class, name) \
168 TEST_F(test_class, name) {\ 170 TEST_F(test_class, name) {\
169 StartMessageLoopAndRunTest();\ 171 StartMessageLoopAndRunTest();\
170 } 172 }
171 173
172 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) 174 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER)
173 175
174 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_ 176 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/test/base/interactive_ui_tests_main.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698