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

Side by Side Diff: chrome/browser/ui/ash/accelerator_commands_browsertest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 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/accelerators/accelerator_commands.h" 5 #include "ash/accelerators/accelerator_commands.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 EXPECT_TRUE(window_state->IsFullscreen()); 194 EXPECT_TRUE(window_state->IsFullscreen());
195 EXPECT_TRUE(IsInImmersiveFullscreen(window_state)); 195 EXPECT_TRUE(IsInImmersiveFullscreen(window_state));
196 196
197 ash::accelerators::ToggleFullscreen(); 197 ash::accelerators::ToggleFullscreen();
198 EXPECT_TRUE(IsInitialShowState(window_state)); 198 EXPECT_TRUE(IsInitialShowState(window_state));
199 199
200 // 5) Miscellaneous windows (e.g. task manager). 200 // 5) Miscellaneous windows (e.g. task manager).
201 views::Widget::InitParams params; 201 views::Widget::InitParams params;
202 params.delegate = new MaximizableWidgetDelegate(); 202 params.delegate = new MaximizableWidgetDelegate();
203 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 203 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
204 scoped_ptr<views::Widget> widget(new views::Widget); 204 std::unique_ptr<views::Widget> widget(new views::Widget);
205 widget->Init(params); 205 widget->Init(params);
206 widget->Show(); 206 widget->Show();
207 207
208 window_state = ash::wm::GetWindowState(widget->GetNativeWindow()); 208 window_state = ash::wm::GetWindowState(widget->GetNativeWindow());
209 ASSERT_TRUE(window_state->IsActive()); 209 ASSERT_TRUE(window_state->IsActive());
210 SetToInitialShowState(window_state); 210 SetToInitialShowState(window_state);
211 EXPECT_TRUE(IsInitialShowState(window_state)); 211 EXPECT_TRUE(IsInitialShowState(window_state));
212 212
213 ash::accelerators::ToggleFullscreen(); 213 ash::accelerators::ToggleFullscreen();
214 EXPECT_TRUE(window_state->IsFullscreen()); 214 EXPECT_TRUE(window_state->IsFullscreen());
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 CloseAppWindow(app_window); 324 CloseAppWindow(app_window);
325 } 325 }
326 } 326 }
327 327
328 INSTANTIATE_TEST_CASE_P(InitiallyRestored, 328 INSTANTIATE_TEST_CASE_P(InitiallyRestored,
329 AcceleratorCommandsPlatformAppFullscreenBrowserTest, 329 AcceleratorCommandsPlatformAppFullscreenBrowserTest,
330 Values(ui::SHOW_STATE_NORMAL)); 330 Values(ui::SHOW_STATE_NORMAL));
331 INSTANTIATE_TEST_CASE_P(InitiallyMaximized, 331 INSTANTIATE_TEST_CASE_P(InitiallyMaximized,
332 AcceleratorCommandsPlatformAppFullscreenBrowserTest, 332 AcceleratorCommandsPlatformAppFullscreenBrowserTest,
333 Values(ui::SHOW_STATE_MAXIMIZED)); 333 Values(ui::SHOW_STATE_MAXIMIZED));
OLDNEW
« no previous file with comments | « chrome/browser/ui/apps/chrome_app_delegate.cc ('k') | chrome/browser/ui/ash/app_list/app_list_service_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698