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

Side by Side Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 19460014: Do not create workspace for fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/root_window_controller_unittest.cc ('k') | ash/wm/workspace/workspace.h » ('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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // Swipe-up. This should not change anything. 564 // Swipe-up. This should not change anything.
565 end = start - delta; 565 end = start - delta;
566 generator.GestureScrollSequenceWithCallback(below_start, end, 566 generator.GestureScrollSequenceWithCallback(below_start, end,
567 base::TimeDelta::FromMilliseconds(10), kNumScrollSteps, 567 base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
568 base::Bind(&ShelfDragCallback::ProcessScroll, 568 base::Bind(&ShelfDragCallback::ProcessScroll,
569 base::Unretained(&handler))); 569 base::Unretained(&handler)));
570 EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state()); 570 EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
571 EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior()); 571 EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
572 EXPECT_EQ(bounds_fullscreen.ToString(), window->bounds().ToString()); 572 EXPECT_EQ(bounds_fullscreen.ToString(), window->bounds().ToString());
573 573
574 // Close actually, otherwise further event may be affected since widget
575 // is fullscreen status.
574 widget->Close(); 576 widget->Close();
577 RunAllPendingInMessageLoop();
575 } 578 }
576 579
577 // Fails on Mac only. Need to be implemented. http://crbug.com/111279. 580 // Fails on Mac only. Need to be implemented. http://crbug.com/111279.
578 #if defined(OS_MACOSX) || defined(OS_WIN) 581 #if defined(OS_MACOSX) || defined(OS_WIN)
579 #define MAYBE_SetVisible DISABLED_SetVisible 582 #define MAYBE_SetVisible DISABLED_SetVisible
580 #else 583 #else
581 #define MAYBE_SetVisible SetVisible 584 #define MAYBE_SetVisible SetVisible
582 #endif 585 #endif
583 // Makes sure SetVisible updates work area and widget appropriately. 586 // Makes sure SetVisible updates work area and widget appropriately.
584 TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) { 587 TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 1256
1254 #if defined(OS_WIN) 1257 #if defined(OS_WIN)
1255 // RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962 1258 // RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
1256 #define MAYBE_GestureDrag DISABLED_GestureDrag 1259 #define MAYBE_GestureDrag DISABLED_GestureDrag
1257 #else 1260 #else
1258 #define MAYBE_GestureDrag GestureDrag 1261 #define MAYBE_GestureDrag GestureDrag
1259 #endif 1262 #endif
1260 1263
1261 TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) { 1264 TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) {
1262 ShelfLayoutManager* shelf = GetShelfLayoutManager(); 1265 ShelfLayoutManager* shelf = GetShelfLayoutManager();
1263 RunGestureDragTests(gfx::Vector2d(0, 100)); 1266 {
1267 SCOPED_TRACE("BOTTOM");
1268 RunGestureDragTests(gfx::Vector2d(0, 100));
1269 }
1264 1270
1265 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); 1271 {
1266 RunGestureDragTests(gfx::Vector2d(-100, 0)); 1272 SCOPED_TRACE("LEFT");
1273 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
1274 RunGestureDragTests(gfx::Vector2d(-100, 0));
1275 }
1267 1276
1268 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT); 1277 {
1269 RunGestureDragTests(gfx::Vector2d(100, 0)); 1278 SCOPED_TRACE("RIGHT");
1279 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
1280 RunGestureDragTests(gfx::Vector2d(100, 0));
1281 }
1270 } 1282 }
1271 1283
1272 TEST_F(ShelfLayoutManagerTest, WindowVisibilityDisablesAutoHide) { 1284 TEST_F(ShelfLayoutManagerTest, WindowVisibilityDisablesAutoHide) {
1273 if (!SupportsMultipleDisplays()) 1285 if (!SupportsMultipleDisplays())
1274 return; 1286 return;
1275 1287
1276 UpdateDisplay("800x600,800x600"); 1288 UpdateDisplay("800x600,800x600");
1277 ShelfLayoutManager* shelf = GetShelfLayoutManager(); 1289 ShelfLayoutManager* shelf = GetShelfLayoutManager();
1278 shelf->LayoutShelf(); 1290 shelf->LayoutShelf();
1279 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); 1291 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 scoped_ptr<aura::Window> w1(CreateTestWindow()); 1584 scoped_ptr<aura::Window> w1(CreateTestWindow());
1573 w1->Show(); 1585 w1->Show();
1574 wm::ActivateWindow(w1.get()); 1586 wm::ActivateWindow(w1.get());
1575 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); 1587 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType());
1576 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 1588 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
1577 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); 1589 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType());
1578 } 1590 }
1579 1591
1580 } // namespace internal 1592 } // namespace internal
1581 } // namespace ash 1593 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/wm/workspace/workspace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698