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

Side by Side Diff: ash/wm/ash_focus_rules_unittest.cc

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 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
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/session/session_state_delegate.h" 5 #include "ash/session/session_state_delegate.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/test/ash_test_helper.h" 9 #include "ash/test/ash_test_helper.h"
10 #include "ash/test/test_session_state_delegate.h" 10 #include "ash/test/test_session_state_delegate.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 Shell* shell() const { return Shell::GetInstance(); } 119 Shell* shell() const { return Shell::GetInstance(); }
120 120
121 private: 121 private:
122 aura::Window* CreateWindowInContainer(int container_id) { 122 aura::Window* CreateWindowInContainer(int container_id) {
123 aura::Window* root_window = Shell::GetPrimaryRootWindow(); 123 aura::Window* root_window = Shell::GetPrimaryRootWindow();
124 aura::Window* container = Shell::GetContainer(root_window, container_id); 124 aura::Window* container = Shell::GetContainer(root_window, container_id);
125 aura::Window* window = new aura::Window(nullptr); 125 aura::Window* window = new aura::Window(nullptr);
126 window->set_id(0); 126 window->set_id(0);
127 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 127 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
128 window->Init(aura::WINDOW_LAYER_TEXTURED); 128 window->Init(ui::LAYER_TEXTURED);
129 window->Show(); 129 window->Show();
130 130
131 aura::client::ParentWindowWithContext(window, container, 131 aura::client::ParentWindowWithContext(window, container,
132 gfx::Rect(0, 0, 400, 400)); 132 gfx::Rect(0, 0, 400, 400));
133 133
134 window->SetProperty(aura::client::kCanMaximizeKey, true); 134 window->SetProperty(aura::client::kCanMaximizeKey, true);
135 window->SetProperty(aura::client::kCanMinimizeKey, true); 135 window->SetProperty(aura::client::kCanMinimizeKey, true);
136 return window; 136 return window;
137 } 137 }
138 138
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 EXPECT_FALSE(normal_window_state->IsMinimized()); 181 EXPECT_FALSE(normal_window_state->IsMinimized());
182 EXPECT_FALSE(always_on_top_window_state->IsMinimized()); 182 EXPECT_FALSE(always_on_top_window_state->IsMinimized());
183 EXPECT_TRUE(normal_window_state->CanActivate()); 183 EXPECT_TRUE(normal_window_state->CanActivate());
184 EXPECT_TRUE(always_on_top_window_state->CanActivate()); 184 EXPECT_TRUE(always_on_top_window_state->CanActivate());
185 EXPECT_FALSE(always_on_top_window->HasFocus()); 185 EXPECT_FALSE(always_on_top_window->HasFocus());
186 EXPECT_TRUE(normal_window->HasFocus()); 186 EXPECT_TRUE(normal_window->HasFocus());
187 } 187 }
188 188
189 } // namespace test 189 } // namespace test
190 } // namespace ash 190 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698