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

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

Issue 637933002: Replace FINAL and OVERRIDE with their C++11 counterparts in chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/test/base/chrome_unit_test_suite.h" 9 #include "chrome/test/base/chrome_unit_test_suite.h"
10 #include "chrome/test/base/interactive_test_utils.h" 10 #include "chrome/test/base/interactive_test_utils.h"
(...skipping 10 matching lines...) Expand all
21 // View subclass that allows you to specify the preferred size. 21 // View subclass that allows you to specify the preferred size.
22 class TestView : public views::View { 22 class TestView : public views::View {
23 public: 23 public:
24 TestView() {} 24 TestView() {}
25 25
26 void SetPreferredSize(const gfx::Size& size) { 26 void SetPreferredSize(const gfx::Size& size) {
27 preferred_size_ = size; 27 preferred_size_ = size;
28 PreferredSizeChanged(); 28 PreferredSizeChanged();
29 } 29 }
30 30
31 virtual gfx::Size GetPreferredSize() const OVERRIDE { 31 virtual gfx::Size GetPreferredSize() const override {
32 if (!preferred_size_.IsEmpty()) 32 if (!preferred_size_.IsEmpty())
33 return preferred_size_; 33 return preferred_size_;
34 return View::GetPreferredSize(); 34 return View::GetPreferredSize();
35 } 35 }
36 36
37 virtual void Layout() OVERRIDE { 37 virtual void Layout() override {
38 View* child_view = child_at(0); 38 View* child_view = child_at(0);
39 child_view->SetBounds(0, 0, width(), height()); 39 child_view->SetBounds(0, 0, width(), height());
40 } 40 }
41 41
42 private: 42 private:
43 gfx::Size preferred_size_; 43 gfx::Size preferred_size_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(TestView); 45 DISALLOW_COPY_AND_ASSIGN(TestView);
46 }; 46 };
47 47
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 dnd_thread_.reset(NULL); 166 dnd_thread_.reset(NULL);
167 } 167 }
168 168
169 void ViewEventTestBase::RunTestMethod(const base::Closure& task) { 169 void ViewEventTestBase::RunTestMethod(const base::Closure& task) {
170 StopBackgroundThread(); 170 StopBackgroundThread();
171 171
172 task.Run(); 172 task.Run();
173 if (HasFatalFailure()) 173 if (HasFatalFailure())
174 Done(); 174 Done();
175 } 175 }
OLDNEW
« no previous file with comments | « chrome/test/base/view_event_test_base.h ('k') | chrome/test/base/view_event_test_platform_part_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698