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

Side by Side Diff: athena/common/fill_layout_manager_unittest.cc

Issue 488093004: athena: Add a test for FillLayoutManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « athena/athena.gyp ('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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "athena/common/fill_layout_manager.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/aura/window.h"
9
10 namespace athena {
11
12 TEST(FillLayoutManagerTest, ChildWindowSizedCorrectly) {
13 scoped_ptr<aura::Window> parent(new aura::Window(NULL));
14 parent->SetBounds(gfx::Rect(10, 20, 30, 40));
15 parent->SetLayoutManager(new FillLayoutManager(parent.get()));
16
17 scoped_ptr<aura::Window> child(new aura::Window(NULL));
18 child->SetBounds(gfx::Rect(0, 0, 5, 10));
19
20 EXPECT_NE(child->bounds().size().ToString(),
21 parent->bounds().size().ToString());
22
23 parent->AddChild(child.get());
24 EXPECT_EQ(child->bounds().size().ToString(),
25 parent->bounds().size().ToString());
26
27 parent->SetBounds(gfx::Rect(0, 0, 100, 200));
28 EXPECT_EQ(child->bounds().size().ToString(),
29 parent->bounds().size().ToString());
30 }
31
32 } // namespace athena
OLDNEW
« no previous file with comments | « athena/athena.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698