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

Unified Diff: ash/wm/window_state_unittest.cc

Issue 2739703003: Last sets of tests that can move to common_unittests (Closed)
Patch Set: comments Created 3 years, 9 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/wm/window_modality_controller_unittest.cc ('k') | ash/wm/window_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state_unittest.cc
diff --git a/ash/wm/window_state_unittest.cc b/ash/wm/window_state_unittest.cc
index b04883c4c92eef6d4c1c2ff1c9493ad59bd323e7..d238f3688c4a9cb141496817415ddad9a5c099d0 100644
--- a/ash/wm/window_state_unittest.cc
+++ b/ash/wm/window_state_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/window_state_util.h"
#include "ash/common/wm/wm_event.h"
+#include "ash/common/wm_shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
@@ -16,7 +17,6 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
-#include "ui/display/manager/display_manager.h"
#include "ui/display/screen.h"
namespace ash {
@@ -61,7 +61,7 @@ TEST_F(WindowStateTest, SnapWindowBasic) {
const gfx::Rect kPrimaryDisplayWorkAreaBounds =
display::Screen::GetScreen()->GetPrimaryDisplay().work_area();
const gfx::Rect kSecondaryDisplayWorkAreaBounds =
- display_manager()->GetSecondaryDisplay().work_area();
+ GetSecondaryDisplay().work_area();
std::unique_ptr<aura::Window> window(
CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
@@ -80,8 +80,7 @@ TEST_F(WindowStateTest, SnapWindowBasic) {
EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
// Move the window to the secondary display.
- window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100),
- display_manager()->GetSecondaryDisplay());
+ window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100), GetSecondaryDisplay());
window_state->OnWMEvent(&snap_right);
expected = gfx::Rect(kSecondaryDisplayWorkAreaBounds.x() +
@@ -321,6 +320,10 @@ TEST_F(WindowStateTest, RestoredWindowBoundsShrink) {
}
TEST_F(WindowStateTest, DoNotResizeMaximizedWindowInFullscreen) {
+ // TODO: investigate failure. http://crbug.com/698914.
+ if (WmShell::Get()->IsRunningInMash())
+ return;
+
std::unique_ptr<aura::Window> maximized(CreateTestWindowInShellWithId(0));
std::unique_ptr<aura::Window> fullscreen(CreateTestWindowInShellWithId(1));
WindowState* maximized_state = GetWindowState(maximized.get());
@@ -350,6 +353,10 @@ TEST_F(WindowStateTest, DoNotResizeMaximizedWindowInFullscreen) {
}
TEST_F(WindowStateTest, TrustedPinned) {
+ // TODO: investigate failure. http://crbug.com/698914.
+ if (WmShell::Get()->IsRunningInMash())
+ return;
+
std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
WindowState* window_state = GetWindowState(window.get());
EXPECT_FALSE(window_state->IsTrustedPinned());
« no previous file with comments | « ash/wm/window_modality_controller_unittest.cc ('k') | ash/wm/window_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698