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

Side by Side Diff: ui/aura_shell/default_container_layout_manager_unittest.cc

Issue 8431012: aura: Fix default_container_layout_manager_unittest.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura_shell/default_container_layout_manager.h" 5 #include "ui/aura_shell/default_container_layout_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "ui/aura/test/aura_test_base.h" 10 #include "ui/aura/test/aura_test_base.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // A popup window can be resized to the size bigger than draggable area. 131 // A popup window can be resized to the size bigger than draggable area.
132 popup->SetBounds(gfx::Rect(0, 0, 1000, 1000)); 132 popup->SetBounds(gfx::Rect(0, 0, 1000, 1000));
133 EXPECT_EQ("0,0 1000x1000", popup->bounds().ToString()); 133 EXPECT_EQ("0,0 1000x1000", popup->bounds().ToString());
134 } 134 }
135 135
136 // Make sure a window with a transient parent isn't resized by the layout 136 // Make sure a window with a transient parent isn't resized by the layout
137 // manager. 137 // manager.
138 TEST_F(DefaultContainerLayoutManagerTest, IgnoreTransient) { 138 TEST_F(DefaultContainerLayoutManagerTest, IgnoreTransient) {
139 scoped_ptr<aura::Window> window(new aura::Window(NULL)); 139 scoped_ptr<aura::Window> window(new aura::Window(NULL));
140 props_.push_back( 140 window->SetType(aura::WINDOW_TYPE_NORMAL);
141 new ui::ViewProp(
142 window.get(), views::NativeWidgetAura::kWindowTypeKey,
143 reinterpret_cast<void*>(Widget::InitParams::TYPE_WINDOW)));
144 window->SetType(Widget::InitParams::TYPE_WINDOW);
145 window->Init(ui::Layer::LAYER_HAS_NO_TEXTURE); 141 window->Init(ui::Layer::LAYER_HAS_NO_TEXTURE);
146 aura::Desktop::GetInstance()->AddTransientChild(window.get()); 142 aura::Desktop::GetInstance()->AddTransientChild(window.get());
147 window->SetBounds(gfx::Rect(0, 0, 200, 200)); 143 window->SetBounds(gfx::Rect(0, 0, 200, 200));
148 window->Show(); 144 window->Show();
149 window->SetParent(container()); 145 window->SetParent(container());
150 146
151 EXPECT_EQ("0,0 200x200", window->bounds().ToString()); 147 EXPECT_EQ("0,0 200x200", window->bounds().ToString());
152 } 148 }
153 149
154 } // namespace test 150 } // namespace test
155 } // namespace aura_shell 151 } // namespace aura_shell
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698