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

Side by Side Diff: components/view_manager/view_tree_unittest.cc

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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 | « components/view_manager/view_tree_impl.cc ('k') | mandoline/tab/frame_connection.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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "components/view_manager/client_connection.h" 9 #include "components/view_manager/client_connection.h"
10 #include "components/view_manager/connection_manager.h" 10 #include "components/view_manager/connection_manager.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 TestViewTreeClient* wm_client() { return wm_client_; } 290 TestViewTreeClient* wm_client() { return wm_client_; }
291 291
292 TestViewTreeHostConnection* host_connection() { return host_connection_; } 292 TestViewTreeHostConnection* host_connection() { return host_connection_; }
293 293
294 protected: 294 protected:
295 // testing::Test: 295 // testing::Test:
296 void SetUp() override { 296 void SetUp() override {
297 DisplayManager::set_factory_for_testing(&display_manager_factory_); 297 DisplayManager::set_factory_for_testing(&display_manager_factory_);
298 // TODO(fsamuel): This is probably broken. We need a root. 298 // TODO(fsamuel): This is probably broken. We need a root.
299 connection_manager_.reset(new ConnectionManager(&delegate_)); 299 connection_manager_.reset(
300 new ConnectionManager(&delegate_,
301 scoped_refptr<surfaces::SurfacesState>()));
300 ViewTreeHostImpl* host = new ViewTreeHostImpl( 302 ViewTreeHostImpl* host = new ViewTreeHostImpl(
301 mojo::ViewTreeHostClientPtr(), 303 mojo::ViewTreeHostClientPtr(),
302 connection_manager_.get(), true /* is_headless */, nullptr, 304 connection_manager_.get(), true /* is_headless */, nullptr,
303 scoped_refptr<gles2::GpuState>(), 305 scoped_refptr<gles2::GpuState>(),
304 scoped_refptr<surfaces::SurfacesState>()); 306 scoped_refptr<surfaces::SurfacesState>());
305 // TODO(fsamuel): This is way too magical. We need to find a better way to 307 // TODO(fsamuel): This is way too magical. We need to find a better way to
306 // manage lifetime. 308 // manage lifetime.
307 host_connection_ = new TestViewTreeHostConnection( 309 host_connection_ = new TestViewTreeHostConnection(
308 make_scoped_ptr(host), connection_manager_.get()); 310 make_scoped_ptr(host), connection_manager_.get());
309 host->Init(host_connection_); 311 host->Init(host_connection_);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 CreatePointerDownEvent(61, 22)); 599 CreatePointerDownEvent(61, 22));
598 EXPECT_EQ(host_connection()->view_tree_host()->root_view(), 600 EXPECT_EQ(host_connection()->view_tree_host()->root_view(),
599 connection_manager()->GetFocusedView()); 601 connection_manager()->GetFocusedView());
600 ASSERT_EQ(wm_client()->tracker()->changes()->size(), 1u); 602 ASSERT_EQ(wm_client()->tracker()->changes()->size(), 1u);
601 EXPECT_EQ("InputEvent view=0,2 event_action=4", 603 EXPECT_EQ("InputEvent view=0,2 event_action=4",
602 ChangesToDescription1(*wm_client()->tracker()->changes())[0]); 604 ChangesToDescription1(*wm_client()->tracker()->changes())[0]);
603 EXPECT_TRUE(connection1_client->tracker()->changes()->empty()); 605 EXPECT_TRUE(connection1_client->tracker()->changes()->empty());
604 } 606 }
605 607
606 } // namespace view_manager 608 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/view_manager/view_tree_impl.cc ('k') | mandoline/tab/frame_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698