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

Unified Diff: ash/rotator/screen_rotation_animator_unittest.cc

Issue 2815043002: Removes ShellPort::IsRunningInMash() (Closed)
Patch Set: dont set instance_ in constructor Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/screen_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animator_unittest.cc
diff --git a/ash/rotator/screen_rotation_animator_unittest.cc b/ash/rotator/screen_rotation_animator_unittest.cc
index daefa2eea968359251d54c7bdf65aef1f7aa33a2..09e64d3a7457df980bb18b3d9e67ff3f3168b45f 100644
--- a/ash/rotator/screen_rotation_animator_unittest.cc
+++ b/ash/rotator/screen_rotation_animator_unittest.cc
@@ -5,6 +5,7 @@
#include "ash/rotator/screen_rotation_animator.h"
#include "ash/ash_switches.h"
+#include "ash/public/cpp/config.h"
#include "ash/rotator/screen_rotation_animator_observer.h"
#include "ash/rotator/test/screen_rotation_animator_test_api.h"
#include "ash/shell.h"
@@ -165,7 +166,7 @@ void ScreenRotationAnimatorTest::WaitForCopyCallback() {
TEST_F(ScreenRotationAnimatorTest, ShouldNotifyObserver) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
@@ -188,7 +189,7 @@ TEST_F(ScreenRotationAnimatorTest, ShouldNotifyObserver) {
TEST_F(ScreenRotationAnimatorTest, ShouldNotifyObserverOnce) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
@@ -215,7 +216,7 @@ TEST_F(ScreenRotationAnimatorTest, ShouldNotifyObserverOnce) {
TEST_F(ScreenRotationAnimatorTest, RotatesToDifferentRotation) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
@@ -232,7 +233,7 @@ TEST_F(ScreenRotationAnimatorTest, RotatesToDifferentRotation) {
TEST_F(ScreenRotationAnimatorTest, ShouldNotRotateTheSameRotation) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
@@ -249,7 +250,7 @@ TEST_F(ScreenRotationAnimatorTest, ShouldNotRotateTheSameRotation) {
// request to the |last_pending_request_|.
TEST_F(ScreenRotationAnimatorTest, RotatesDuringRotation) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
@@ -271,7 +272,7 @@ TEST_F(ScreenRotationAnimatorTest, RotatesDuringRotation) {
// last request and finish the rotation animation.
TEST_F(ScreenRotationAnimatorTest, ShouldCompleteAnimations) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
@@ -298,7 +299,7 @@ TEST_F(ScreenRotationAnimatorTest, ShouldCompleteAnimations) {
// Test enable smooth screen rotation code path.
TEST_F(ScreenRotationAnimatorTest, RotatesToDifferentRotationWithCopyCallback) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
@@ -319,7 +320,7 @@ TEST_F(ScreenRotationAnimatorTest, RotatesToDifferentRotationWithCopyCallback) {
// If the external display is removed, it should not crash.
TEST_F(ScreenRotationAnimatorTest, RemoveSecondaryDisplayAfterCopyCallback) {
// TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
display_id());
return;
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/screen_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698