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

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

Issue 1344223002: Revert of Overhaul Mandoline event transport code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/mus/gesture_manager_unittest.cc ('k') | components/pdf_viewer/pdf_viewer.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/client_connection.h" 9 #include "components/mus/client_connection.h"
10 #include "components/mus/connection_manager.h" 10 #include "components/mus/connection_manager.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 private: 243 private:
244 DISALLOW_COPY_AND_ASSIGN(TestDisplayManagerFactory); 244 DISALLOW_COPY_AND_ASSIGN(TestDisplayManagerFactory);
245 }; 245 };
246 246
247 mojo::EventPtr CreatePointerDownEvent(int x, int y) { 247 mojo::EventPtr CreatePointerDownEvent(int x, int y) {
248 mojo::EventPtr event(mojo::Event::New()); 248 mojo::EventPtr event(mojo::Event::New());
249 event->action = mojo::EVENT_TYPE_POINTER_DOWN; 249 event->action = mojo::EVENT_TYPE_POINTER_DOWN;
250 event->pointer_data = mojo::PointerData::New(); 250 event->pointer_data = mojo::PointerData::New();
251 event->pointer_data->pointer_id = 1u; 251 event->pointer_data->pointer_id = 1u;
252 event->pointer_data->location->x = x; 252 event->pointer_data->x = x;
253 event->pointer_data->location->y = y; 253 event->pointer_data->y = y;
254 return event.Pass(); 254 return event.Pass();
255 } 255 }
256 256
257 mojo::EventPtr CreatePointerUpEvent(int x, int y) { 257 mojo::EventPtr CreatePointerUpEvent(int x, int y) {
258 mojo::EventPtr event(mojo::Event::New()); 258 mojo::EventPtr event(mojo::Event::New());
259 event->action = mojo::EVENT_TYPE_POINTER_UP; 259 event->action = mojo::EVENT_TYPE_POINTER_UP;
260 event->pointer_data = mojo::PointerData::New(); 260 event->pointer_data = mojo::PointerData::New();
261 event->pointer_data->pointer_id = 1u; 261 event->pointer_data->pointer_id = 1u;
262 event->pointer_data->location->x = x; 262 event->pointer_data->x = x;
263 event->pointer_data->location->y = y; 263 event->pointer_data->y = y;
264 return event.Pass(); 264 return event.Pass();
265 } 265 }
266 266
267 } // namespace 267 } // namespace
268 268
269 // ----------------------------------------------------------------------------- 269 // -----------------------------------------------------------------------------
270 270
271 class ViewTreeTest : public testing::Test { 271 class ViewTreeTest : public testing::Test {
272 public: 272 public:
273 ViewTreeTest() : wm_client_(nullptr) {} 273 ViewTreeTest() : wm_client_(nullptr) {}
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 EXPECT_EQ("Focused id=2,1", 439 EXPECT_EQ("Focused id=2,1",
440 ChangesToDescription1(*wm_client()->tracker()->changes())[0]); 440 ChangesToDescription1(*wm_client()->tracker()->changes())[0]);
441 ASSERT_EQ(2u, embed_connection->tracker()->changes()->size()); 441 ASSERT_EQ(2u, embed_connection->tracker()->changes()->size());
442 EXPECT_EQ("Focused id=2,1", 442 EXPECT_EQ("Focused id=2,1",
443 ChangesToDescription1(*embed_connection->tracker()->changes())[0]); 443 ChangesToDescription1(*embed_connection->tracker()->changes())[0]);
444 EXPECT_EQ("InputEvent view=2,1 event_action=4", 444 EXPECT_EQ("InputEvent view=2,1 event_action=4",
445 ChangesToDescription1(*embed_connection->tracker()->changes())[1]); 445 ChangesToDescription1(*embed_connection->tracker()->changes())[1]);
446 } 446 }
447 447
448 } // namespace view_manager 448 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/mus/gesture_manager_unittest.cc ('k') | components/pdf_viewer/pdf_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698