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 "ui/views/view.h" | 5 #include "ui/views/view.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/compositor/layer.h" | 10 #include "ui/compositor/layer.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // +-- v4 | 56 // +-- v4 |
57 // +-- w2 | 57 // +-- w2 |
58 // +-- v5 | 58 // +-- v5 |
59 // +-- v6 | 59 // +-- v6 |
60 // +-- v7 | 60 // +-- v7 |
61 // +-- v8 | 61 // +-- v8 |
62 // +-- v9 | 62 // +-- v9 |
63 TEST_F(ViewAuraTest, RecreateLayersWithWindows) { | 63 TEST_F(ViewAuraTest, RecreateLayersWithWindows) { |
64 // TODO: test uses GetContext(), which is not applicable to aura-mus. | 64 // TODO: test uses GetContext(), which is not applicable to aura-mus. |
65 // http://crbug.com/663809. | 65 // http://crbug.com/663809. |
66 if (IsAuraMusClient()) | 66 if (IsMus()) |
67 return; | 67 return; |
68 | 68 |
69 Widget* w1 = CreateControlWidget(GetContext(), gfx::Rect(0, 0, 100, 100)); | 69 Widget* w1 = CreateControlWidget(GetContext(), gfx::Rect(0, 0, 100, 100)); |
70 w1->GetNativeView()->layer()->set_name("w1"); | 70 w1->GetNativeView()->layer()->set_name("w1"); |
71 | 71 |
72 View* v2 = new View(); | 72 View* v2 = new View(); |
73 v2->SetBounds(0, 1, 100, 101); | 73 v2->SetBounds(0, 1, 100, 101); |
74 View* v3 = new View(); | 74 View* v3 = new View(); |
75 v3->SetBounds(0, 2, 100, 102); | 75 v3->SetBounds(0, 2, 100, 102); |
76 View* w2_host_view = new View(); | 76 View* w2_host_view = new View(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 std::vector<ui::Layer*> new_w1_root_sublayers = w1->GetRootLayers(); | 178 std::vector<ui::Layer*> new_w1_root_sublayers = w1->GetRootLayers(); |
179 ASSERT_EQ(3u, new_w1_root_sublayers.size()); | 179 ASSERT_EQ(3u, new_w1_root_sublayers.size()); |
180 EXPECT_EQ(v1_new_layer, new_w1_root_sublayers[0]); | 180 EXPECT_EQ(v1_new_layer, new_w1_root_sublayers[0]); |
181 EXPECT_EQ(v4_new_layer, new_w1_root_sublayers[1]); | 181 EXPECT_EQ(v4_new_layer, new_w1_root_sublayers[1]); |
182 EXPECT_EQ(v7_new_layer, new_w1_root_sublayers[2]); | 182 EXPECT_EQ(v7_new_layer, new_w1_root_sublayers[2]); |
183 } | 183 } |
184 w1->CloseNow(); | 184 w1->CloseNow(); |
185 } | 185 } |
186 | 186 |
187 } // namespace views | 187 } // namespace views |
OLD | NEW |