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

Side by Side Diff: ash/wm/workspace/workspace_event_handler_unittest.cc

Issue 235933004: 3rd part of porting Chrome Ash to Windows 7 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ash_unittests fixes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/browser_process_platform_part_aurawin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/workspace/workspace_event_handler.h" 5 #include "ash/wm/workspace/workspace_event_handler.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/wm/window_state.h" 10 #include "ash/wm/window_state.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 EXPECT_EQ(work_area.width(), bounds_in_screen.width()); 135 EXPECT_EQ(work_area.width(), bounds_in_screen.width());
136 // Single-axis maximization is not considered real maximization. 136 // Single-axis maximization is not considered real maximization.
137 EXPECT_FALSE(window_state->IsMaximized()); 137 EXPECT_FALSE(window_state->IsMaximized());
138 138
139 // Restore. 139 // Restore.
140 generator.DoubleClickLeftButton(); 140 generator.DoubleClickLeftButton();
141 EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString()); 141 EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString());
142 142
143 #if defined(OS_WIN) 143 #if defined(OS_WIN)
144 // Multi display test does not run on Win8 bot. crbug.com/247427. 144 // Multi display test does not run on Win8 bot. crbug.com/247427.
145 if (base::win::GetVersion() >= base::win::VERSION_WIN8) 145 if (!SupportsMultipleDisplays())
146 return; 146 return;
147 #endif 147 #endif
148 148
149 // Verify the double clicking the resize edge works on 2nd display too. 149 // Verify the double clicking the resize edge works on 2nd display too.
150 UpdateDisplay("200x200,400x300"); 150 UpdateDisplay("200x200,400x300");
151 gfx::Rect work_area2 = ScreenUtil::GetSecondaryDisplay().work_area(); 151 gfx::Rect work_area2 = ScreenUtil::GetSecondaryDisplay().work_area();
152 restored_bounds.SetRect(220, 20, 50, 50); 152 restored_bounds.SetRect(220, 20, 50, 50);
153 window->SetBoundsInScreen(restored_bounds, ScreenUtil::GetSecondaryDisplay()); 153 window->SetBoundsInScreen(restored_bounds, ScreenUtil::GetSecondaryDisplay());
154 aura::Window* second_root = Shell::GetAllRootWindows()[1]; 154 aura::Window* second_root = Shell::GetAllRootWindows()[1];
155 EXPECT_EQ(second_root, window->GetRootWindow()); 155 EXPECT_EQ(second_root, window->GetRootWindow());
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 // Second click will go to the header 542 // Second click will go to the header
543 delegate.set_window_component(HTCAPTION); 543 delegate.set_window_component(HTCAPTION);
544 generator.PressRightButton(); 544 generator.PressRightButton();
545 generator.ReleaseRightButton(); 545 generator.ReleaseRightButton();
546 EXPECT_FALSE(window_state->IsMaximized()); 546 EXPECT_FALSE(window_state->IsMaximized());
547 generator.DoubleClickLeftButton(); 547 generator.DoubleClickLeftButton();
548 EXPECT_FALSE(window_state->IsMaximized()); 548 EXPECT_FALSE(window_state->IsMaximized());
549 } 549 }
550 550
551 } // namespace ash 551 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/browser_process_platform_part_aurawin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698