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

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

Issue 3032024: Add undeclared virtual destructors part 2... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/service/cloud_print/job_status_updater.h ('k') | chrome_frame/np_event_listener.h » ('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/task.h" 9 #include "base/task.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // WindowDelegate method. Calls into CreateContentsView to get the actual 76 // WindowDelegate method. Calls into CreateContentsView to get the actual
77 // view. 77 // view.
78 virtual views::View* GetContentsView(); 78 virtual views::View* GetContentsView();
79 79
80 // Overriden to do nothing so that this class can be used in runnable tasks. 80 // Overriden to do nothing so that this class can be used in runnable tasks.
81 void AddRef() {} 81 void AddRef() {}
82 void Release() {} 82 void Release() {}
83 static bool ImplementsThreadSafeReferenceCounting() { return false; } 83 static bool ImplementsThreadSafeReferenceCounting() { return false; }
84 84
85 protected: 85 protected:
86 virtual ~ViewEventTestBase() {}
87
86 // Returns the view that is added to the window. 88 // Returns the view that is added to the window.
87 virtual views::View* CreateContentsView() = 0; 89 virtual views::View* CreateContentsView() = 0;
88 90
89 // Called once the message loop is running. 91 // Called once the message loop is running.
90 virtual void DoTestOnMessageLoop() = 0; 92 virtual void DoTestOnMessageLoop() = 0;
91 93
92 // Invoke from test main. Shows the window, starts the message loop and 94 // Invoke from test main. Shows the window, starts the message loop and
93 // schedules a task that invokes DoTestOnMessageLoop. 95 // schedules a task that invokes DoTestOnMessageLoop.
94 void StartMessageLoopAndRunTest(); 96 void StartMessageLoopAndRunTest();
95 97
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 }; 140 };
139 141
140 // Convenience macro for defining a ViewEventTestBase. See class description 142 // Convenience macro for defining a ViewEventTestBase. See class description
141 // of ViewEventTestBase for details. 143 // of ViewEventTestBase for details.
142 #define VIEW_TEST(test_class, name) \ 144 #define VIEW_TEST(test_class, name) \
143 TEST_F(test_class, name) {\ 145 TEST_F(test_class, name) {\
144 StartMessageLoopAndRunTest();\ 146 StartMessageLoopAndRunTest();\
145 } 147 }
146 148
147 #endif // CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_ 149 #endif // CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/job_status_updater.h ('k') | chrome_frame/np_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698