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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc

Issue 681823004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/shelf/shelf.h" 5 #include "ash/shelf/shelf.h"
6 #include "ash/shelf/shelf_view.h" 6 #include "ash/shelf/shelf_view.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/shelf_test_api.h" 8 #include "ash/test/shelf_test_api.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "chrome/browser/lifetime/application_lifetime.h" 11 #include "chrome/browser/lifetime/application_lifetime.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_list.h"
14 #include "chrome/browser/ui/browser_window.h" 14 #include "chrome/browser/ui/browser_window.h"
15 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
16 #include "ui/aura/window_event_dispatcher.h" 16 #include "ui/aura/window_event_dispatcher.h"
17 #include "ui/base/test/ui_controls.h" 17 #include "ui/base/test/ui_controls.h"
18 #include "ui/events/test/event_generator.h" 18 #include "ui/events/test/event_generator.h"
19 #include "ui/views/controls/menu/menu_controller.h" 19 #include "ui/views/controls/menu/menu_controller.h"
20 #include "ui/views/view.h" 20 #include "ui/views/view.h"
21 #include "ui/views/view_model.h" 21 #include "ui/views/view_model.h"
22 22
23 namespace { 23 namespace {
24 24
25 class WindowSizerTest : public InProcessBrowserTest { 25 class WindowSizerTest : public InProcessBrowserTest {
26 public: 26 public:
27 WindowSizerTest() {} 27 WindowSizerTest() {}
28 virtual ~WindowSizerTest() {} 28 ~WindowSizerTest() override {}
29 29
30 virtual void SetUpCommandLine(CommandLine* command_line) override { 30 void SetUpCommandLine(CommandLine* command_line) override {
31 InProcessBrowserTest::SetUpCommandLine(command_line); 31 InProcessBrowserTest::SetUpCommandLine(command_line);
32 // Make screens sufficiently wide to host 2 browsers side by side. 32 // Make screens sufficiently wide to host 2 browsers side by side.
33 command_line->AppendSwitchASCII("ash-host-window-bounds", 33 command_line->AppendSwitchASCII("ash-host-window-bounds",
34 "600x600,601+0-600x600"); 34 "600x600,601+0-600x600");
35 } 35 }
36 36
37 private: 37 private:
38 DISALLOW_COPY_AND_ASSIGN(WindowSizerTest); 38 DISALLOW_COPY_AND_ASSIGN(WindowSizerTest);
39 }; 39 };
40 40
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // Balanced with the chrome::IncrementKeepAliveCount above. 114 // Balanced with the chrome::IncrementKeepAliveCount above.
115 chrome::DecrementKeepAliveCount(); 115 chrome::DecrementKeepAliveCount();
116 } 116 }
117 117
118 namespace { 118 namespace {
119 119
120 class WindowSizerContextMenuTest : public WindowSizerTest { 120 class WindowSizerContextMenuTest : public WindowSizerTest {
121 public: 121 public:
122 WindowSizerContextMenuTest() {} 122 WindowSizerContextMenuTest() {}
123 virtual ~WindowSizerContextMenuTest() {} 123 ~WindowSizerContextMenuTest() override {}
124 124
125 static void Step1(gfx::Point release_point) { 125 static void Step1(gfx::Point release_point) {
126 ui_controls::SendMouseEventsNotifyWhenDone( 126 ui_controls::SendMouseEventsNotifyWhenDone(
127 ui_controls::RIGHT, ui_controls::DOWN, 127 ui_controls::RIGHT, ui_controls::DOWN,
128 base::Bind(&WindowSizerContextMenuTest::Step2, release_point)); 128 base::Bind(&WindowSizerContextMenuTest::Step2, release_point));
129 } 129 }
130 130
131 static void Step2(gfx::Point release_point) { 131 static void Step2(gfx::Point release_point) {
132 ui_controls::SendMouseMoveNotifyWhenDone( 132 ui_controls::SendMouseMoveNotifyWhenDone(
133 release_point.x(), release_point.y(), 133 release_point.x(), release_point.y(),
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 // Next new browser must be created on 1st display. 192 // Next new browser must be created on 1st display.
193 ASSERT_EQ(2u, browser_list->size()); 193 ASSERT_EQ(2u, browser_list->size());
194 EXPECT_EQ(root_windows[0], 194 EXPECT_EQ(root_windows[0],
195 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow()); 195 browser_list->get(1)->window()->GetNativeWindow()->GetRootWindow());
196 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow()); 196 EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow());
197 197
198 // Balanced with the chrome::IncrementKeepAliveCount above. 198 // Balanced with the chrome::IncrementKeepAliveCount above.
199 chrome::DecrementKeepAliveCount(); 199 chrome::DecrementKeepAliveCount();
200 } 200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698