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

Side by Side Diff: ash/wm/workspace_controller_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_controller.h" 5 #include "ash/wm/workspace_controller.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 class WorkspaceControllerTest : public test::AshTestBase { 82 class WorkspaceControllerTest : public test::AshTestBase {
83 public: 83 public:
84 WorkspaceControllerTest() {} 84 WorkspaceControllerTest() {}
85 virtual ~WorkspaceControllerTest() {} 85 virtual ~WorkspaceControllerTest() {}
86 86
87 aura::Window* CreateTestWindowUnparented() { 87 aura::Window* CreateTestWindowUnparented() {
88 aura::Window* window = new aura::Window(NULL); 88 aura::Window* window = new aura::Window(NULL);
89 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 89 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
90 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 90 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
91 window->Init(ui::LAYER_TEXTURED); 91 window->Init(aura::WINDOW_LAYER_TEXTURED);
92 return window; 92 return window;
93 } 93 }
94 94
95 aura::Window* CreateTestWindow() { 95 aura::Window* CreateTestWindow() {
96 aura::Window* window = new aura::Window(NULL); 96 aura::Window* window = new aura::Window(NULL);
97 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 97 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
98 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 98 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
99 window->Init(ui::LAYER_TEXTURED); 99 window->Init(aura::WINDOW_LAYER_TEXTURED);
100 ParentWindowInPrimaryRootWindow(window); 100 ParentWindowInPrimaryRootWindow(window);
101 return window; 101 return window;
102 } 102 }
103 103
104 aura::Window* CreateBrowserLikeWindow(const gfx::Rect& bounds) { 104 aura::Window* CreateBrowserLikeWindow(const gfx::Rect& bounds) {
105 aura::Window* window = CreateTestWindow(); 105 aura::Window* window = CreateTestWindow();
106 window->SetBounds(bounds); 106 window->SetBounds(bounds);
107 wm::WindowState* window_state = wm::GetWindowState(window); 107 wm::WindowState* window_state = wm::GetWindowState(window);
108 window_state->set_window_position_managed(true); 108 window_state->set_window_position_managed(true);
109 window->Show(); 109 window->Show();
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 // Apply a transform on |second|. After the transform is applied, the window 1355 // Apply a transform on |second|. After the transform is applied, the window
1356 // should no longer be targetted. 1356 // should no longer be targetted.
1357 gfx::Transform transform; 1357 gfx::Transform transform;
1358 transform.Translate(70, 40); 1358 transform.Translate(70, 40);
1359 second->SetTransform(transform); 1359 second->SetTransform(transform);
1360 } 1360 }
1361 } 1361 }
1362 1362
1363 } // namespace internal 1363 } // namespace internal
1364 } // namespace ash 1364 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698