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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/wm/header_painter.cc ('k') | ash/wm/lock_state_controller.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 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/header_painter.h" 5 #include "ash/wm/header_painter.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/root_window_settings.h" 8 #include "ash/root_window_settings.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 params.delegate = new ResizableWidgetDelegate(widget); 201 params.delegate = new ResizableWidgetDelegate(widget);
202 params.type = Widget::InitParams::TYPE_WINDOW; 202 params.type = Widget::InitParams::TYPE_WINDOW;
203 widget->Init(params); 203 widget->Init(params);
204 return widget; 204 return widget;
205 } 205 }
206 }; 206 };
207 207
208 TEST_F(HeaderPainterTest, CreateAndDeleteSingleWindow) { 208 TEST_F(HeaderPainterTest, CreateAndDeleteSingleWindow) {
209 // Ensure that creating/deleting a window works well and doesn't cause 209 // Ensure that creating/deleting a window works well and doesn't cause
210 // crashes. See crbug.com/155634 210 // crashes. See crbug.com/155634
211 aura::RootWindow* root = Shell::GetTargetRootWindow(); 211 aura::Window* root = Shell::GetTargetRootWindow();
212 212
213 scoped_ptr<Widget> widget(CreateTestWidget()); 213 scoped_ptr<Widget> widget(CreateTestWidget());
214 scoped_ptr<HeaderPainter> painter(CreateTestPainter(widget.get())); 214 scoped_ptr<HeaderPainter> painter(CreateTestPainter(widget.get()));
215 widget->Show(); 215 widget->Show();
216 216
217 // We only have one window, so it should use a solo header. 217 // We only have one window, so it should use a solo header.
218 EXPECT_TRUE(painter->UseSoloWindowHeader()); 218 EXPECT_TRUE(painter->UseSoloWindowHeader());
219 EXPECT_TRUE(internal::GetRootWindowSettings(root)->solo_window_header); 219 EXPECT_TRUE(internal::GetRootWindowSettings(root)->solo_window_header);
220 220
221 // Close the window. 221 // Close the window.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 HeaderPainterOwner* o2 = new HeaderPainterOwner(w2); 657 HeaderPainterOwner* o2 = new HeaderPainterOwner(w2);
658 HeaderPainter* p2 = o2->header_painter(); 658 HeaderPainter* p2 = o2->header_painter();
659 w2->Show(); 659 w2->Show();
660 EXPECT_FALSE(p1->UseSoloWindowHeader()); 660 EXPECT_FALSE(p1->UseSoloWindowHeader());
661 EXPECT_FALSE(p2->UseSoloWindowHeader()); 661 EXPECT_FALSE(p2->UseSoloWindowHeader());
662 662
663 // Exit with no resource release. They'll be released at shutdown. 663 // Exit with no resource release. They'll be released at shutdown.
664 } 664 }
665 665
666 } // namespace ash 666 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/header_painter.cc ('k') | ash/wm/lock_state_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698