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

Side by Side Diff: ash/utility/screenshot_controller_unittest.cc

Issue 1997193002: Update selection region style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « ash/utility/screenshot_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/utility/screenshot_controller.h" 5 #include "ash/utility/screenshot_controller.h"
6 6
7 #include "ash/display/cursor_window_controller.h" 7 #include "ash/display/cursor_window_controller.h"
8 #include "ash/display/mouse_cursor_event_filter.h" 8 #include "ash/display/mouse_cursor_event_filter.h"
9 #include "ash/display/window_tree_host_manager.h" 9 #include "ash/display/window_tree_host_manager.h"
10 #include "ash/screenshot_delegate.h" 10 #include "ash/screenshot_delegate.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 GetEventGenerator().PressKey(ui::VKEY_A, 0); 215 GetEventGenerator().PressKey(ui::VKEY_A, 0);
216 GetEventGenerator().ReleaseKey(ui::VKEY_A, 0); 216 GetEventGenerator().ReleaseKey(ui::VKEY_A, 0);
217 217
218 EXPECT_FALSE(client->IsCursorVisible()); 218 EXPECT_FALSE(client->IsCursorVisible());
219 219
220 StartPartialScreenshotSession(); 220 StartPartialScreenshotSession();
221 EXPECT_TRUE(IsActive()); 221 EXPECT_TRUE(IsActive());
222 EXPECT_TRUE(client->IsCursorVisible()); 222 EXPECT_TRUE(client->IsCursorVisible());
223 223
224 // Platform's Cursor should be hidden while dragging.
225 GetEventGenerator().PressLeftButton();
226 EXPECT_TRUE(IsActive());
227 EXPECT_FALSE(client->IsCursorVisible());
228
224 Cancel(); 229 Cancel();
225 EXPECT_TRUE(client->IsCursorVisible()); 230 EXPECT_TRUE(client->IsCursorVisible());
226 } 231 }
227 232
228 // Make sure ScreenshotController doesn't prevent handling of large 233 // Make sure ScreenshotController doesn't prevent handling of large
229 // cursor. See http://crbug.com/459214 234 // cursor. See http://crbug.com/459214
230 TEST_F(PartialScreenshotControllerTest, LargeCursor) { 235 TEST_F(PartialScreenshotControllerTest, LargeCursor) {
231 Shell::GetInstance()->cursor_manager()->SetCursorSet(ui::CURSOR_SET_LARGE); 236 Shell::GetInstance()->cursor_manager()->SetCursorSet(ui::CURSOR_SET_LARGE);
232 Shell::GetInstance() 237 Shell::GetInstance()
233 ->window_tree_host_manager() 238 ->window_tree_host_manager()
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 EXPECT_FALSE(IsActive()); 410 EXPECT_FALSE(IsActive());
406 411
407 StartWindowScreenshotSession(); 412 StartWindowScreenshotSession();
408 EXPECT_TRUE(IsActive()); 413 EXPECT_TRUE(IsActive());
409 UpdateDisplay("400x400"); 414 UpdateDisplay("400x400");
410 RunAllPendingInMessageLoop(); 415 RunAllPendingInMessageLoop();
411 EXPECT_FALSE(IsActive()); 416 EXPECT_FALSE(IsActive());
412 } 417 }
413 418
414 } // namespace ash 419 } // namespace ash
OLDNEW
« no previous file with comments | « ash/utility/screenshot_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698