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

Unified Diff: ui/aura/window_unittest.cc

Issue 8273040: Minimum size for aura window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/window_unittest.cc
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 7d9ac97d288d6830a56b6e7805e273dda8fd2bbd..6c12b9859dc7c4886a2375ae60d20e52d8e6b429 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -729,6 +729,14 @@ TEST_F(WindowTest, Fullscreen) {
w->Restore();
EXPECT_EQ(ui::SHOW_STATE_NORMAL, w->show_state());
EXPECT_EQ(original_bounds, w->bounds());
+
+ // SetBounds in fullscreen mode
Ben Goodger (Google) 2011/10/14 15:40:05 Same here. // Calling SetBounds() while in full s
oshima 2011/10/15 02:10:50 Done.
+ gfx::Rect new_bounds(50, 50, 50, 50);
+ w->Fullscreen();
+ w->SetBounds(new_bounds);
+ EXPECT_EQ(desktop_bounds, w->bounds());
+ w->Restore();
+ EXPECT_EQ(new_bounds, w->bounds());
}
TEST_F(WindowTest, Maximized) {
@@ -770,6 +778,14 @@ TEST_F(WindowTest, Maximized) {
w->Restore();
EXPECT_EQ(ui::SHOW_STATE_NORMAL, w->show_state());
EXPECT_EQ(original_bounds, w->bounds());
+
+ // SetBounds in maximized mode
Ben Goodger (Google) 2011/10/14 15:40:05 Same as above.
oshima 2011/10/15 02:10:50 Done.
+ gfx::Rect new_bounds(50, 50, 50, 50);
+ w->Maximize();
+ w->SetBounds(new_bounds);
+ EXPECT_EQ(max_bounds, w->bounds());
+ w->Restore();
+ EXPECT_EQ(new_bounds, w->bounds());
}
// Various assertions for activating/deactivating.
@@ -804,7 +820,7 @@ TEST_F(WindowTest, Deactivate) {
}
class WindowObserverTest : public WindowTest,
- public WindowObserver {
+ public WindowObserver {
public:
WindowObserverTest() : added_count_(0), removed_count_(0) {}

Powered by Google App Engine
This is Rietveld 408576698