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

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

Issue 246027: Reverting 27389. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/in_process_browser_test.h ('k') | chrome_frame/chrome_frame_automation.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_ 5 #ifndef CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_
6 #define CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_ 6 #define CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_
7 7
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return true; 72 return true;
73 } 73 }
74 74
75 // WindowDelegate method. Calls into CreateContentsView to get the actual 75 // WindowDelegate method. Calls into CreateContentsView to get the actual
76 // view. 76 // view.
77 virtual views::View* GetContentsView(); 77 virtual views::View* GetContentsView();
78 78
79 // Overriden to do nothing so that this class can be used in runnable tasks. 79 // Overriden to do nothing so that this class can be used in runnable tasks.
80 void AddRef() {} 80 void AddRef() {}
81 void Release() {} 81 void Release() {}
82 static bool ImplementsThreadSafeReferenceCounting() { return false; }
82 83
83 protected: 84 protected:
84 // Returns the view that is added to the window. 85 // Returns the view that is added to the window.
85 virtual views::View* CreateContentsView() = 0; 86 virtual views::View* CreateContentsView() = 0;
86 87
87 // Called once the message loop is running. 88 // Called once the message loop is running.
88 virtual void DoTestOnMessageLoop() = 0; 89 virtual void DoTestOnMessageLoop() = 0;
89 90
90 // Invoke from test main. Shows the window, starts the message loop and 91 // Invoke from test main. Shows the window, starts the message loop and
91 // schedules a task that invokes DoTestOnMessageLoop. 92 // schedules a task that invokes DoTestOnMessageLoop.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 }; 131 };
131 132
132 // Convenience macro for defining a ViewEventTestBase. See class description 133 // Convenience macro for defining a ViewEventTestBase. See class description
133 // of ViewEventTestBase for details. 134 // of ViewEventTestBase for details.
134 #define VIEW_TEST(test_class, name) \ 135 #define VIEW_TEST(test_class, name) \
135 TEST_F(test_class, name) {\ 136 TEST_F(test_class, name) {\
136 StartMessageLoopAndRunTest();\ 137 StartMessageLoopAndRunTest();\
137 } 138 }
138 139
139 #endif // CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_ 140 #endif // CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome_frame/chrome_frame_automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698