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

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

Issue 121773003: Makes Window::Init take a WindowLayerType instead of LayerType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to master Created 6 years, 11 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
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_layout_manager.h" 5 #include "ash/wm/workspace/workspace_layout_manager.h"
6 6
7 #include "ash/display/display_layout.h" 7 #include "ash/display/display_layout.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 DISALLOW_COPY_AND_ASSIGN(DontClobberRestoreBoundsWindowObserver); 310 DISALLOW_COPY_AND_ASSIGN(DontClobberRestoreBoundsWindowObserver);
311 }; 311 };
312 312
313 // Creates a window, maximized the window and from within the maximized 313 // Creates a window, maximized the window and from within the maximized
314 // notification sets the bounds of a window to overlap the shelf. Verifies this 314 // notification sets the bounds of a window to overlap the shelf. Verifies this
315 // doesn't effect the restore bounds. 315 // doesn't effect the restore bounds.
316 TEST_F(WorkspaceLayoutManagerTest, DontClobberRestoreBounds) { 316 TEST_F(WorkspaceLayoutManagerTest, DontClobberRestoreBounds) {
317 DontClobberRestoreBoundsWindowObserver window_observer; 317 DontClobberRestoreBoundsWindowObserver window_observer;
318 scoped_ptr<aura::Window> window(new aura::Window(NULL)); 318 scoped_ptr<aura::Window> window(new aura::Window(NULL));
319 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 319 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
320 window->Init(ui::LAYER_TEXTURED); 320 window->Init(aura::WINDOW_LAYER_TEXTURED);
321 window->SetBounds(gfx::Rect(10, 20, 30, 40)); 321 window->SetBounds(gfx::Rect(10, 20, 30, 40));
322 // NOTE: for this test to exercise the failure the observer needs to be added 322 // NOTE: for this test to exercise the failure the observer needs to be added
323 // before the parent set. This mimics what BrowserFrameAsh does. 323 // before the parent set. This mimics what BrowserFrameAsh does.
324 window->AddObserver(&window_observer); 324 window->AddObserver(&window_observer);
325 ParentWindowInPrimaryRootWindow(window.get()); 325 ParentWindowInPrimaryRootWindow(window.get());
326 window->Show(); 326 window->Show();
327 327
328 wm::WindowState* window_state = wm::GetWindowState(window.get()); 328 wm::WindowState* window_state = wm::GetWindowState(window.get());
329 window_state->Activate(); 329 window_state->Activate();
330 330
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 EXPECT_EQ(5, observer.call_count()); 473 EXPECT_EQ(5, observer.call_count());
474 EXPECT_TRUE(observer.is_fullscreen()); 474 EXPECT_TRUE(observer.is_fullscreen());
475 475
476 // Closing the window should change the fullscreen state. 476 // Closing the window should change the fullscreen state.
477 window2.reset(); 477 window2.reset();
478 EXPECT_EQ(6, observer.call_count()); 478 EXPECT_EQ(6, observer.call_count());
479 EXPECT_FALSE(observer.is_fullscreen()); 479 EXPECT_FALSE(observer.is_fullscreen());
480 } 480 }
481 481
482 } // namespace ash 482 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698