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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2160 client_request = mojo::GetProxy(&surface_client_ptr); | 2160 client_request = mojo::GetProxy(&surface_client_ptr); |
2161 wt2()->AttachCompositorFrameSink( | 2161 wt2()->AttachCompositorFrameSink( |
2162 window_2_101, mojom::CompositorFrameSinkType::DEFAULT, | 2162 window_2_101, mojom::CompositorFrameSinkType::DEFAULT, |
2163 mojo::GetProxy(&surface_ptr), std::move(surface_client_ptr)); | 2163 mojo::GetProxy(&surface_ptr), std::move(surface_client_ptr)); |
2164 cc::CompositorFrame compositor_frame; | 2164 cc::CompositorFrame compositor_frame; |
2165 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); | 2165 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); |
2166 gfx::Rect frame_rect(0, 0, 100, 100); | 2166 gfx::Rect frame_rect(0, 0, 100, 100); |
2167 render_pass->SetNew(cc::RenderPassId(1, 1), frame_rect, frame_rect, | 2167 render_pass->SetNew(cc::RenderPassId(1, 1), frame_rect, frame_rect, |
2168 gfx::Transform()); | 2168 gfx::Transform()); |
2169 compositor_frame.render_pass_list.push_back(std::move(render_pass)); | 2169 compositor_frame.render_pass_list.push_back(std::move(render_pass)); |
2170 surface_ptr->SubmitCompositorFrame(std::move(compositor_frame)); | 2170 cc::LocalFrameId local_frame_id(1, base::UnguessableToken::Create()); |
| 2171 surface_ptr->SubmitCompositorFrame(local_frame_id, |
| 2172 std::move(compositor_frame)); |
2171 // Make sure the parent connection gets the surface ID. | 2173 // Make sure the parent connection gets the surface ID. |
2172 wt_client1()->WaitForChangeCount(1); | 2174 wt_client1()->WaitForChangeCount(1); |
2173 // Verify that the submitted frame is for |window_2_101|. | 2175 // Verify that the submitted frame is for |window_2_101|. |
2174 EXPECT_EQ(window_2_101_in_ws1, | 2176 EXPECT_EQ(window_2_101_in_ws1, |
2175 changes1()->back().surface_id.frame_sink_id().client_id()); | 2177 changes1()->back().surface_id.frame_sink_id().client_id()); |
2176 } | 2178 } |
2177 | 2179 |
2178 // Verifies when an unknown window with a known child is added to a hierarchy | 2180 // Verifies when an unknown window with a known child is added to a hierarchy |
2179 // the known child is identified in the WindowData. | 2181 // the known child is identified in the WindowData. |
2180 TEST_F(WindowTreeClientTest, AddUnknownWindowKnownParent) { | 2182 TEST_F(WindowTreeClientTest, AddUnknownWindowKnownParent) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 | 2216 |
2215 // TODO(sky): make sure coverage of what was | 2217 // TODO(sky): make sure coverage of what was |
2216 // WindowManagerTest.SecondEmbedRoot_InitService and | 2218 // WindowManagerTest.SecondEmbedRoot_InitService and |
2217 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2219 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
2218 // manager | 2220 // manager |
2219 // tests. | 2221 // tests. |
2220 | 2222 |
2221 } // namespace test | 2223 } // namespace test |
2222 } // namespace ws | 2224 } // namespace ws |
2223 } // namespace ui | 2225 } // namespace ui |
OLD | NEW |