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

Side by Side Diff: ash/shell_unittest.cc

Issue 36473003: Rename StackingClient -> WindowTreeClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done. Created 7 years, 2 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
« no previous file with comments | « ash/shell/content_client/shell_browser_main_parts.cc ('k') | ash/test/ash_test_base.h » ('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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 } // namespace 471 } // namespace
472 472
473 // Various assertions around SetShelfAutoHideBehavior() and 473 // Various assertions around SetShelfAutoHideBehavior() and
474 // GetShelfAutoHideBehavior(). 474 // GetShelfAutoHideBehavior().
475 TEST_F(ShellTest, ToggleAutoHide) { 475 TEST_F(ShellTest, ToggleAutoHide) {
476 scoped_ptr<aura::Window> window(new aura::Window(NULL)); 476 scoped_ptr<aura::Window> window(new aura::Window(NULL));
477 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 477 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
478 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 478 window->SetType(aura::client::WINDOW_TYPE_NORMAL);
479 window->Init(ui::LAYER_TEXTURED); 479 window->Init(ui::LAYER_TEXTURED);
480 SetDefaultParentByPrimaryRootWindow(window.get()); 480 ParentWindowInPrimaryRootWindow(window.get());
481 window->Show(); 481 window->Show();
482 wm::ActivateWindow(window.get()); 482 wm::ActivateWindow(window.get());
483 483
484 Shell* shell = Shell::GetInstance(); 484 Shell* shell = Shell::GetInstance();
485 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow(); 485 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
486 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 486 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
487 root_window); 487 root_window);
488 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 488 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
489 shell->GetShelfAutoHideBehavior(root_window)); 489 shell->GetShelfAutoHideBehavior(root_window));
490 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 490 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 private: 532 private:
533 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 533 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
534 }; 534 };
535 535
536 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 536 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
537 window_.reset(new aura::Window(NULL)); 537 window_.reset(new aura::Window(NULL));
538 window_->Init(ui::LAYER_NOT_DRAWN); 538 window_->Init(ui::LAYER_NOT_DRAWN);
539 } 539 }
540 540
541 } // namespace ash 541 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/content_client/shell_browser_main_parts.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698