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

Side by Side Diff: components/mus/ws/window_tree_unittest.cc

Issue 1423133003: Routes calls to WM through WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no braces Created 5 years, 1 month 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/mus/ws/window_tree_impl.cc ('k') | components/web_view/frame_apptest.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/mus/public/cpp/types.h" 9 #include "components/mus/public/cpp/types.h"
10 #include "components/mus/public/cpp/util.h" 10 #include "components/mus/public/cpp/util.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 protected: 311 protected:
312 // testing::Test: 312 // testing::Test:
313 void SetUp() override { 313 void SetUp() override {
314 DisplayManager::set_factory_for_testing(&display_manager_factory_); 314 DisplayManager::set_factory_for_testing(&display_manager_factory_);
315 // TODO(fsamuel): This is probably broken. We need a root. 315 // TODO(fsamuel): This is probably broken. We need a root.
316 connection_manager_.reset( 316 connection_manager_.reset(
317 new ConnectionManager(&delegate_, scoped_refptr<SurfacesState>())); 317 new ConnectionManager(&delegate_, scoped_refptr<SurfacesState>()));
318 WindowTreeHostImpl* host = new WindowTreeHostImpl( 318 WindowTreeHostImpl* host = new WindowTreeHostImpl(
319 mus::mojom::WindowTreeHostClientPtr(), connection_manager_.get(), 319 mus::mojom::WindowTreeHostClientPtr(), connection_manager_.get(),
320 nullptr, scoped_refptr<GpuState>(), 320 nullptr, scoped_refptr<GpuState>(), scoped_refptr<mus::SurfacesState>(),
321 scoped_refptr<mus::SurfacesState>()); 321 nullptr);
322 // TODO(fsamuel): This is way too magical. We need to find a better way to 322 // TODO(fsamuel): This is way too magical. We need to find a better way to
323 // manage lifetime. 323 // manage lifetime.
324 host_connection_ = new TestWindowTreeHostConnection( 324 host_connection_ = new TestWindowTreeHostConnection(
325 make_scoped_ptr(host), connection_manager_.get()); 325 make_scoped_ptr(host), connection_manager_.get());
326 host->Init(host_connection_); 326 host->Init(host_connection_);
327 wm_client_ = delegate_.last_client(); 327 wm_client_ = delegate_.last_client();
328 } 328 }
329 329
330 private: 330 private:
331 // TestWindowTreeClient that is used for the WM connection. 331 // TestWindowTreeClient that is used for the WM connection.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 ASSERT_EQ(2u, embed_connection->tracker()->changes()->size()); 454 ASSERT_EQ(2u, embed_connection->tracker()->changes()->size());
455 EXPECT_EQ("Focused id=2,1", 455 EXPECT_EQ("Focused id=2,1",
456 ChangesToDescription1(*embed_connection->tracker()->changes())[0]); 456 ChangesToDescription1(*embed_connection->tracker()->changes())[0]);
457 EXPECT_EQ("InputEvent window=2,1 event_action=4", 457 EXPECT_EQ("InputEvent window=2,1 event_action=4",
458 ChangesToDescription1(*embed_connection->tracker()->changes())[1]); 458 ChangesToDescription1(*embed_connection->tracker()->changes())[1]);
459 } 459 }
460 460
461 } // namespace ws 461 } // namespace ws
462 462
463 } // namespace mus 463 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_impl.cc ('k') | components/web_view/frame_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698