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

Side by Side Diff: ash/content/display/screen_orientation_controller_chromeos_unittest.cc

Issue 2217713002: Remove the system menu display settings row (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates unittests Created 4 years, 4 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 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/display/screen_orientation_controller_chromeos.h" 5 #include "ash/display/screen_orientation_controller_chromeos.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 -cos(degrees * kDegreesToRadians) * kMeanGravity, 402 -cos(degrees * kDegreesToRadians) * kMeanGravity,
403 0.0f); 403 0.0f);
404 TriggerLidUpdate(gravity); 404 TriggerLidUpdate(gravity);
405 EXPECT_EQ(display::Display::ROTATE_0, GetCurrentInternalDisplayRotation()); 405 EXPECT_EQ(display::Display::ROTATE_0, GetCurrentInternalDisplayRotation());
406 406
407 SetRotationLocked(false); 407 SetRotationLocked(false);
408 TriggerLidUpdate(gravity); 408 TriggerLidUpdate(gravity);
409 EXPECT_EQ(display::Display::ROTATE_90, GetCurrentInternalDisplayRotation()); 409 EXPECT_EQ(display::Display::ROTATE_90, GetCurrentInternalDisplayRotation());
410 } 410 }
411 411
412 // The TrayDisplay class that is responsible for adding/updating MessageCenter 412 // The ScreenLayoutObserver class that is responsible for adding/updating
413 // notifications is only added to the SystemTray on ChromeOS. 413 // MessageCenter notifications is only added to the SystemTray on ChromeOS.
414 // Tests that the screen rotation notifications are suppressed when 414 // Tests that the screen rotation notifications are suppressed when
415 // triggered by the accelerometer. 415 // triggered by the accelerometer.
416 TEST_F(ScreenOrientationControllerTest, BlockRotationNotifications) { 416 TEST_F(ScreenOrientationControllerTest, BlockRotationNotifications) {
417 EnableMaximizeMode(true); 417 EnableMaximizeMode(true);
418 test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate(); 418 test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
419 tray_delegate->set_should_show_display_notification(true); 419 tray_delegate->set_should_show_display_notification(true);
420 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay(); 420 test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay();
421 421
422 message_center::MessageCenter* message_center = 422 message_center::MessageCenter* message_center =
423 message_center::MessageCenter::Get(); 423 message_center::MessageCenter::Get();
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation( 651 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation(
652 kNewRotation, display::Display::ROTATION_SOURCE_ACTIVE); 652 kNewRotation, display::Display::ROTATION_SOURCE_ACTIVE);
653 653
654 EXPECT_EQ( 654 EXPECT_EQ(
655 kNewRotation, 655 kNewRotation,
656 display_manager->GetDisplayInfo(kInternalDisplayId).GetActiveRotation()); 656 display_manager->GetDisplayInfo(kInternalDisplayId).GetActiveRotation());
657 } 657 }
658 658
659 } // namespace ash 659 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698