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

Side by Side Diff: services/ui/ws/window_tree_client_unittest.cc

Issue 2617403003: Mus: Remove CompositorFrameSinkType (Closed)
Patch Set: Fix some unit tests Created 3 years, 11 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
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/mus_context_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 EXPECT_EQ("HierarchyChanged window=" + IdToString(window_2_101_in_ws1) + 2149 EXPECT_EQ("HierarchyChanged window=" + IdToString(window_2_101_in_ws1) +
2150 " old_parent=null new_parent=" + IdToString(window_1_100), 2150 " old_parent=null new_parent=" + IdToString(window_1_100),
2151 SingleChangeToDescription(*changes1())); 2151 SingleChangeToDescription(*changes1()));
2152 changes1()->clear(); 2152 changes1()->clear();
2153 2153
2154 // Submit a CompositorFrame to window_2_101 and make sure server gets it. 2154 // Submit a CompositorFrame to window_2_101 and make sure server gets it.
2155 cc::mojom::MojoCompositorFrameSinkPtr surface_ptr; 2155 cc::mojom::MojoCompositorFrameSinkPtr surface_ptr;
2156 cc::mojom::MojoCompositorFrameSinkClientRequest client_request; 2156 cc::mojom::MojoCompositorFrameSinkClientRequest client_request;
2157 cc::mojom::MojoCompositorFrameSinkClientPtr surface_client_ptr; 2157 cc::mojom::MojoCompositorFrameSinkClientPtr surface_client_ptr;
2158 client_request = mojo::MakeRequest(&surface_client_ptr); 2158 client_request = mojo::MakeRequest(&surface_client_ptr);
2159 wt2()->AttachCompositorFrameSink( 2159 wt2()->AttachCompositorFrameSink(window_2_101,
2160 window_2_101, mojom::CompositorFrameSinkType::DEFAULT, 2160 mojo::MakeRequest(&surface_ptr),
2161 mojo::MakeRequest(&surface_ptr), std::move(surface_client_ptr)); 2161 std::move(surface_client_ptr));
2162 cc::CompositorFrame compositor_frame; 2162 cc::CompositorFrame compositor_frame;
2163 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); 2163 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
2164 gfx::Rect frame_rect(0, 0, 100, 100); 2164 gfx::Rect frame_rect(0, 0, 100, 100);
2165 render_pass->SetNew(1, frame_rect, frame_rect, gfx::Transform()); 2165 render_pass->SetNew(1, frame_rect, frame_rect, gfx::Transform());
2166 compositor_frame.render_pass_list.push_back(std::move(render_pass)); 2166 compositor_frame.render_pass_list.push_back(std::move(render_pass));
2167 compositor_frame.metadata.device_scale_factor = 1.f; 2167 compositor_frame.metadata.device_scale_factor = 1.f;
2168 cc::LocalFrameId local_frame_id(1, base::UnguessableToken::Create()); 2168 cc::LocalFrameId local_frame_id(1, base::UnguessableToken::Create());
2169 surface_ptr->SubmitCompositorFrame(local_frame_id, 2169 surface_ptr->SubmitCompositorFrame(local_frame_id,
2170 std::move(compositor_frame)); 2170 std::move(compositor_frame));
2171 // Make sure the parent connection gets the surface ID. 2171 // Make sure the parent connection gets the surface ID.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2214 2214
2215 // TODO(sky): make sure coverage of what was 2215 // TODO(sky): make sure coverage of what was
2216 // WindowManagerTest.SecondEmbedRoot_InitService and 2216 // WindowManagerTest.SecondEmbedRoot_InitService and
2217 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window 2217 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window
2218 // manager 2218 // manager
2219 // tests. 2219 // tests.
2220 2220
2221 } // namespace test 2221 } // namespace test
2222 } // namespace ws 2222 } // namespace ws
2223 } // namespace ui 2223 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/mus_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698