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

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

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

Powered by Google App Engine
This is Rietveld 408576698