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

Unified Diff: ui/aura/window_unittest.cc

Issue 8565015: Avoid trying to layout the desktop when its size is set to 0x0 when minimized on Windows. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/desktop_host_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_unittest.cc
===================================================================
--- ui/aura/window_unittest.cc (revision 110097)
+++ ui/aura/window_unittest.cc (working copy)
@@ -504,6 +504,8 @@
scoped_ptr<Window> w1(
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50), NULL));
d1.set_window(w1.get());
+ scoped_ptr<Window> w2(
+ CreateTestWindowWithDelegate(NULL, 1, gfx::Rect(10, 10, 50, 50), NULL));
// Activate w1.
desktop->SetActiveWindow(w1.get(), NULL);
@@ -512,10 +514,13 @@
// Should not have gotten a OnLostActive yet.
EXPECT_EQ(0, d1.hit_count());
- // Change the active window to NULL.
+ // SetActiveWindow(NULL) should not change the active window.
desktop->SetActiveWindow(NULL, NULL);
- EXPECT_TRUE(desktop->active_window() == NULL);
+ EXPECT_TRUE(desktop->active_window() == w1.get());
+ // Now activate another window.
+ desktop->SetActiveWindow(w2.get(), NULL);
+
// Should have gotten OnLostActive and w1 should not have been active at that
// time.
EXPECT_EQ(1, d1.hit_count());
« no previous file with comments | « ui/aura/desktop_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698