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

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

Issue 12226045: Linux/ChromeOS Chromium style checker cleanup, chrome/ edition part 1. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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/ui_test_utils.cc ('k') | chrome/test/base/web_ui_browsertest.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 #include "chrome/test/base/view_event_test_base.h" 5 #include "chrome/test/base/view_event_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 24 matching lines...) Expand all
35 // View subclass that allows you to specify the preferred size. 35 // View subclass that allows you to specify the preferred size.
36 class TestView : public views::View { 36 class TestView : public views::View {
37 public: 37 public:
38 TestView() {} 38 TestView() {}
39 39
40 void SetPreferredSize(const gfx::Size& size) { 40 void SetPreferredSize(const gfx::Size& size) {
41 preferred_size_ = size; 41 preferred_size_ = size;
42 PreferredSizeChanged(); 42 PreferredSizeChanged();
43 } 43 }
44 44
45 gfx::Size GetPreferredSize() { 45 virtual gfx::Size GetPreferredSize() OVERRIDE {
46 if (!preferred_size_.IsEmpty()) 46 if (!preferred_size_.IsEmpty())
47 return preferred_size_; 47 return preferred_size_;
48 return View::GetPreferredSize(); 48 return View::GetPreferredSize();
49 } 49 }
50 50
51 virtual void Layout() { 51 virtual void Layout() OVERRIDE {
52 View* child_view = child_at(0); 52 View* child_view = child_at(0);
53 child_view->SetBounds(0, 0, width(), height()); 53 child_view->SetBounds(0, 0, width(), height());
54 } 54 }
55 55
56 private: 56 private:
57 gfx::Size preferred_size_; 57 gfx::Size preferred_size_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(TestView); 59 DISALLOW_COPY_AND_ASSIGN(TestView);
60 }; 60 };
61 61
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 dnd_thread_.reset(NULL); 197 dnd_thread_.reset(NULL);
198 } 198 }
199 199
200 void ViewEventTestBase::RunTestMethod(const base::Closure& task) { 200 void ViewEventTestBase::RunTestMethod(const base::Closure& task) {
201 StopBackgroundThread(); 201 StopBackgroundThread();
202 202
203 task.Run(); 203 task.Run();
204 if (HasFatalFailure()) 204 if (HasFatalFailure())
205 Done(); 205 Done();
206 } 206 }
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils.cc ('k') | chrome/test/base/web_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698