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

Side by Side Diff: ui/views/widget/native_widget_aura_unittest.cc

Issue 9348006: Revert unnecessary change I checked in by mistake. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert change made by mistake Created 8 years, 10 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 | « 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) 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 aura::RootWindow::DeleteInstance(); 146 aura::RootWindow::DeleteInstance();
147 EXPECT_FALSE(widget->did_size_change_more_than_once()); 147 EXPECT_FALSE(widget->did_size_change_more_than_once());
148 widget->CloseNow(); 148 widget->CloseNow();
149 } 149 }
150 150
151 TEST_F(NativeWidgetAuraTest, GetClientAreaScreenBounds) { 151 TEST_F(NativeWidgetAuraTest, GetClientAreaScreenBounds) {
152 // Create a widget. 152 // Create a widget.
153 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW); 153 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW);
154 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 154 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
155 params.bounds.SetRect(10, 20, 300, 400); 155 params.bounds.SetRect(10, 20, 300, 400);
156 Widget* widget = new Widget(); 156 scoped_ptr<Widget> widget(new Widget());
157 widget->Init(params); 157 widget->Init(params);
158 158
159 // For Aura, client area bounds match window bounds. 159 // For Aura, client area bounds match window bounds.
160 gfx::Rect client_bounds = widget->GetClientAreaScreenBounds(); 160 gfx::Rect client_bounds = widget->GetClientAreaScreenBounds();
161 EXPECT_EQ(10, client_bounds.x()); 161 EXPECT_EQ(10, client_bounds.x());
162 EXPECT_EQ(20, client_bounds.y()); 162 EXPECT_EQ(20, client_bounds.y());
163 EXPECT_EQ(300, client_bounds.width()); 163 EXPECT_EQ(300, client_bounds.width());
164 EXPECT_EQ(400, client_bounds.height()); 164 EXPECT_EQ(400, client_bounds.height());
165 } 165 }
166 166
167 } // namespace 167 } // namespace
168 } // namespace views 168 } // namespace views
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