| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "components/mus/public/cpp/window.h" | 5 #include "components/mus/public/cpp/window.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 EXPECT_EQ(&w111, w1.GetChildById(w111.id())); | 109 EXPECT_EQ(&w111, w1.GetChildById(w111.id())); |
| 110 } | 110 } |
| 111 | 111 |
| 112 TEST_F(WindowTest, DrawnAndVisible) { | 112 TEST_F(WindowTest, DrawnAndVisible) { |
| 113 TestWindow w1; | 113 TestWindow w1; |
| 114 EXPECT_FALSE(w1.visible()); | 114 EXPECT_FALSE(w1.visible()); |
| 115 w1.SetVisible(true); | 115 w1.SetVisible(true); |
| 116 EXPECT_TRUE(w1.visible()); | 116 EXPECT_TRUE(w1.visible()); |
| 117 EXPECT_FALSE(w1.IsDrawn()); | 117 EXPECT_FALSE(w1.IsDrawn()); |
| 118 | 118 |
| 119 WindowPrivate(&w1).set_drawn(true); | 119 WindowPrivate(&w1).set_parent_drawn(true); |
| 120 | 120 |
| 121 TestWindow w11; | 121 TestWindow w11; |
| 122 w11.SetVisible(true); | 122 w11.SetVisible(true); |
| 123 w1.AddChild(&w11); | 123 w1.AddChild(&w11); |
| 124 EXPECT_TRUE(w11.visible()); | 124 EXPECT_TRUE(w11.visible()); |
| 125 EXPECT_TRUE(w11.IsDrawn()); | 125 EXPECT_TRUE(w11.IsDrawn()); |
| 126 | 126 |
| 127 w1.RemoveChild(&w11); | 127 w1.RemoveChild(&w11); |
| 128 EXPECT_TRUE(w11.visible()); | 128 EXPECT_TRUE(w11.visible()); |
| 129 EXPECT_FALSE(w11.IsDrawn()); | 129 EXPECT_FALSE(w11.IsDrawn()); |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 scoped_ptr<TestWindow> window0(CreateTestWindow(1, parent.get())); | 1124 scoped_ptr<TestWindow> window0(CreateTestWindow(1, parent.get())); |
| 1125 scoped_ptr<TestWindow> window1(CreateTestWindow(2, parent.get())); | 1125 scoped_ptr<TestWindow> window1(CreateTestWindow(2, parent.get())); |
| 1126 | 1126 |
| 1127 TestWindow* window2 = CreateTestWindow(3, parent.get()); | 1127 TestWindow* window2 = CreateTestWindow(3, parent.get()); |
| 1128 | 1128 |
| 1129 window0->AddTransientWindow(window2); | 1129 window0->AddTransientWindow(window2); |
| 1130 EXPECT_EQ("1 3 2", ChildWindowIDsAsString(parent.get())); | 1130 EXPECT_EQ("1 3 2", ChildWindowIDsAsString(parent.get())); |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 } // namespace mus | 1133 } // namespace mus |
| OLD | NEW |