OLD | NEW |
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/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 // EXPECT_FALSE(background->layer()); | 293 // EXPECT_FALSE(background->layer()); |
294 | 294 |
295 // Create a normal window. It is not maximized. | 295 // Create a normal window. It is not maximized. |
296 views::Widget::InitParams widget_params( | 296 views::Widget::InitParams widget_params( |
297 views::Widget::InitParams::TYPE_WINDOW); | 297 views::Widget::InitParams::TYPE_WINDOW); |
298 widget_params.bounds.SetRect(11, 22, 300, 400); | 298 widget_params.bounds.SetRect(11, 22, 300, 400); |
299 views::Widget* widget = CreateTestWindow(widget_params); | 299 views::Widget* widget = CreateTestWindow(widget_params); |
300 widget->Show(); | 300 widget->Show(); |
301 EXPECT_FALSE(widget->IsMaximized()); | 301 EXPECT_FALSE(widget->IsMaximized()); |
302 | 302 |
303 // We have a default container event filter (for window drags). | |
304 EXPECT_TRUE(widget->GetNativeWindow()->parent()->event_filter()); | |
305 | |
306 // Clean up. | 303 // Clean up. |
307 widget->Close(); | 304 widget->Close(); |
308 } | 305 } |
309 | 306 |
310 TEST_F(ShellTest, FullscreenWindowHidesShelf) { | 307 TEST_F(ShellTest, FullscreenWindowHidesShelf) { |
311 ExpectAllContainers(); | 308 ExpectAllContainers(); |
312 | 309 |
313 // Create a normal window. It is not maximized. | 310 // Create a normal window. It is not maximized. |
314 views::Widget::InitParams widget_params( | 311 views::Widget::InitParams widget_params( |
315 views::Widget::InitParams::TYPE_WINDOW); | 312 views::Widget::InitParams::TYPE_WINDOW); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 private: | 405 private: |
409 DISALLOW_COPY_AND_ASSIGN(ShellTest2); | 406 DISALLOW_COPY_AND_ASSIGN(ShellTest2); |
410 }; | 407 }; |
411 | 408 |
412 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { | 409 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { |
413 window_.reset(new aura::Window(NULL)); | 410 window_.reset(new aura::Window(NULL)); |
414 window_->Init(ui::LAYER_NOT_DRAWN); | 411 window_->Init(ui::LAYER_NOT_DRAWN); |
415 } | 412 } |
416 | 413 |
417 } // namespace ash | 414 } // namespace ash |
OLD | NEW |