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

Side by Side Diff: views/widget/widget_win_unittest.cc

Issue 6331006: Make the code for unmaximizing the window during SetBounds much simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « views/widget/widget_win.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) 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 "views/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Create another window, so that it will be active. 67 // Create another window, so that it will be active.
68 scoped_ptr<WidgetWin> window2(CreateWidgetWin()); 68 scoped_ptr<WidgetWin> window2(CreateWidgetWin());
69 window2->ShowWindow(SW_MAXIMIZE); 69 window2->ShowWindow(SW_MAXIMIZE);
70 EXPECT_TRUE(window2->IsActive()); 70 EXPECT_TRUE(window2->IsActive());
71 EXPECT_FALSE(window->IsActive()); 71 EXPECT_FALSE(window->IsActive());
72 72
73 // Verify that setting the bounds of a zoomed window will unzoom it and not 73 // Verify that setting the bounds of a zoomed window will unzoom it and not
74 // cause it to be activated. 74 // cause it to be activated.
75 window->SetBounds(gfx::Rect(50, 50, 650, 650)); 75 window->SetBounds(gfx::Rect(50, 50, 650, 650));
76 EXPECT_FALSE(window->IsZoomed()); 76 EXPECT_FALSE(window->IsZoomed());
77 // Re-enable the check below: http://crbug.com/69724 77 EXPECT_FALSE(window->IsActive());
78 // EXPECT_FALSE(window->IsActive());
79 78
80 // Cleanup. 79 // Cleanup.
81 window->CloseNow(); 80 window->CloseNow();
82 window2->CloseNow(); 81 window2->CloseNow();
83 } 82 }
OLDNEW
« no previous file with comments | « views/widget/widget_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698