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

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

Issue 127453002: Enable the DesktopAuraTopLevelOwnedPopupResizeTest test for Linux AURA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc ('k') | 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 ViewsDelegate::views_delegate = NULL; 1210 ViewsDelegate::views_delegate = NULL;
1211 DesktopAuraTopLevelWindowTest popup_window; 1211 DesktopAuraTopLevelWindowTest popup_window;
1212 ASSERT_NO_FATAL_FAILURE(popup_window.CreateTopLevelWindow( 1212 ASSERT_NO_FATAL_FAILURE(popup_window.CreateTopLevelWindow(
1213 gfx::Rect(0, 0, 200, 200), false)); 1213 gfx::Rect(0, 0, 200, 200), false));
1214 1214
1215 RunPendingMessages(); 1215 RunPendingMessages();
1216 ASSERT_NO_FATAL_FAILURE(popup_window.DestroyOwnedWindow()); 1216 ASSERT_NO_FATAL_FAILURE(popup_window.DestroyOwnedWindow());
1217 RunPendingMessages(); 1217 RunPendingMessages();
1218 } 1218 }
1219 1219
1220 #if defined(OS_WIN)
1221 // TODO(ananta)
1222 // Fix this test to work on Linux Aura. Need to implement the 1220 // Fix this test to work on Linux Aura. Need to implement the
1223 // views::DesktopRootWindowHostX11::SetSize function 1221 // views::DesktopRootWindowHostX11::SetSize function
Elliot Glaysher 2014/01/08 02:09:20 Should you delete more of this comment?
ananta 2014/01/08 02:12:34 Done.
1224 // This test validates that when a top level owned popup Aura window is 1222 // This test validates that when a top level owned popup Aura window is
1225 // resized, the widget is resized as well. 1223 // resized, the widget is resized as well.
1226 TEST_F(WidgetTest, DesktopAuraTopLevelOwnedPopupResizeTest) { 1224 TEST_F(WidgetTest, DesktopAuraTopLevelOwnedPopupResizeTest) {
1227 ViewsDelegate::views_delegate = NULL; 1225 ViewsDelegate::views_delegate = NULL;
1228 DesktopAuraTopLevelWindowTest popup_window; 1226 DesktopAuraTopLevelWindowTest popup_window;
1229 ASSERT_NO_FATAL_FAILURE(popup_window.CreateTopLevelWindow( 1227 ASSERT_NO_FATAL_FAILURE(popup_window.CreateTopLevelWindow(
1230 gfx::Rect(0, 0, 200, 200), false)); 1228 gfx::Rect(0, 0, 200, 200), false));
1231 1229
1232 gfx::Rect new_size(0, 0, 400, 400); 1230 gfx::Rect new_size(0, 0, 400, 400);
1233 popup_window.owned_window()->SetBounds(new_size); 1231 popup_window.owned_window()->SetBounds(new_size);
1234 1232
1235 EXPECT_EQ(popup_window.top_level_widget()->GetNativeView()->bounds().size(), 1233 EXPECT_EQ(popup_window.top_level_widget()->GetNativeView()->bounds().size(),
1236 new_size.size()); 1234 new_size.size());
1237 RunPendingMessages(); 1235 RunPendingMessages();
1238 ASSERT_NO_FATAL_FAILURE(popup_window.DestroyOwnedWindow()); 1236 ASSERT_NO_FATAL_FAILURE(popup_window.DestroyOwnedWindow());
1239 RunPendingMessages(); 1237 RunPendingMessages();
1240 } 1238 }
1241 #endif
1242 1239
1243 // Test to ensure that the aura Window's visiblity state is set to visible if 1240 // Test to ensure that the aura Window's visiblity state is set to visible if
1244 // the underlying widget is hidden and then shown. 1241 // the underlying widget is hidden and then shown.
1245 TEST_F(WidgetTest, TestWindowVisibilityAfterHide) { 1242 TEST_F(WidgetTest, TestWindowVisibilityAfterHide) {
1246 // Create a widget. 1243 // Create a widget.
1247 Widget widget; 1244 Widget widget;
1248 Widget::InitParams init_params = 1245 Widget::InitParams init_params =
1249 CreateParams(Widget::InitParams::TYPE_WINDOW); 1246 CreateParams(Widget::InitParams::TYPE_WINDOW);
1250 init_params.show_state = ui::SHOW_STATE_NORMAL; 1247 init_params.show_state = ui::SHOW_STATE_NORMAL;
1251 gfx::Rect initial_bounds(0, 0, 300, 400); 1248 gfx::Rect initial_bounds(0, 0, 300, 400);
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 EXPECT_EQ(activate_result, MA_ACTIVATE); 2251 EXPECT_EQ(activate_result, MA_ACTIVATE);
2255 2252
2256 modal_dialog_widget->CloseNow(); 2253 modal_dialog_widget->CloseNow();
2257 top_level_widget.CloseNow(); 2254 top_level_widget.CloseNow();
2258 } 2255 }
2259 #endif 2256 #endif
2260 #endif 2257 #endif
2261 2258
2262 } // namespace test 2259 } // namespace test
2263 } // namespace views 2260 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698