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

Side by Side Diff: ash/shell_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/shell/keyboard_controller_proxy_stub.cc ('k') | ash/test/ash_test_base.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 (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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // Clean up. 438 // Clean up.
439 widget->Close(); 439 widget->Close();
440 } 440 }
441 441
442 // Various assertions around SetShelfAutoHideBehavior() and 442 // Various assertions around SetShelfAutoHideBehavior() and
443 // GetShelfAutoHideBehavior(). 443 // GetShelfAutoHideBehavior().
444 TEST_F(ShellTest, ToggleAutoHide) { 444 TEST_F(ShellTest, ToggleAutoHide) {
445 scoped_ptr<aura::Window> window(new aura::Window(NULL)); 445 scoped_ptr<aura::Window> window(new aura::Window(NULL));
446 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 446 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
447 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 447 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
448 window->Init(aura::WINDOW_LAYER_TEXTURED); 448 window->Init(ui::LAYER_TEXTURED);
449 ParentWindowInPrimaryRootWindow(window.get()); 449 ParentWindowInPrimaryRootWindow(window.get());
450 window->Show(); 450 window->Show();
451 wm::ActivateWindow(window.get()); 451 wm::ActivateWindow(window.get());
452 452
453 Shell* shell = Shell::GetInstance(); 453 Shell* shell = Shell::GetInstance();
454 aura::Window* root_window = Shell::GetPrimaryRootWindow(); 454 aura::Window* root_window = Shell::GetPrimaryRootWindow();
455 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 455 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
456 root_window); 456 root_window);
457 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 457 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
458 shell->GetShelfAutoHideBehavior(root_window)); 458 shell->GetShelfAutoHideBehavior(root_window));
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 protected: 516 protected:
517 scoped_ptr<aura::Window> window_; 517 scoped_ptr<aura::Window> window_;
518 518
519 private: 519 private:
520 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 520 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
521 }; 521 };
522 522
523 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 523 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
524 window_.reset(new aura::Window(NULL)); 524 window_.reset(new aura::Window(NULL));
525 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 525 window_->Init(ui::LAYER_NOT_DRAWN);
526 } 526 }
527 527
528 } // namespace ash 528 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/keyboard_controller_proxy_stub.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698