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

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

Issue 1351013002: Revert of Mandoline UI Process: Update namespaces and file names (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_delegate.h ('k') | components/mus/gles2/command_buffer_driver.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/gesture_manager.h" 5 #include "components/mus/gesture_manager.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "components/mus/gesture_manager_delegate.h" 9 #include "components/mus/gesture_manager_delegate.h"
10 #include "components/mus/public/cpp/keys.h" 10 #include "components/mus/public/cpp/keys.h"
11 #include "components/mus/server_view.h" 11 #include "components/mus/server_view.h"
12 #include "components/mus/test_server_view_delegate.h" 12 #include "components/mus/test_server_view_delegate.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/mojo/events/input_events.mojom.h" 14 #include "ui/mojo/events/input_events.mojom.h"
15 15
16 namespace mus { 16 namespace view_manager {
17 namespace { 17 namespace {
18 18
19 const uint32_t kInvalidGestureId = GestureManager::kInvalidGestureId; 19 const uint32_t kInvalidGestureId = GestureManager::kInvalidGestureId;
20 20
21 void MarkAsRespondsToTouch(ServerView* view) { 21 void MarkAsRespondsToTouch(ServerView* view) {
22 std::vector<uint8_t> empty_vector; 22 std::vector<uint8_t> empty_vector;
23 view->SetProperty(kViewManagerKeyWantsTouchEvents, &empty_vector); 23 view->SetProperty(mojo::kViewManagerKeyWantsTouchEvents, &empty_vector);
24 } 24 }
25 25
26 std::set<uint32_t> SetWith(uint32_t v1) { 26 std::set<uint32_t> SetWith(uint32_t v1) {
27 std::set<uint32_t> result; 27 std::set<uint32_t> result;
28 result.insert(v1); 28 result.insert(v1);
29 return result; 29 return result;
30 } 30 }
31 31
32 std::set<uint32_t> SetWith(uint32_t v1, uint32_t v2) { 32 std::set<uint32_t> SetWith(uint32_t v1, uint32_t v2) {
33 std::set<uint32_t> result; 33 std::set<uint32_t> result;
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 *CreateEvent(mojo::EVENT_TYPE_POINTER_CANCEL, pointer_id, 5, 5)); 458 *CreateEvent(mojo::EVENT_TYPE_POINTER_CANCEL, pointer_id, 5, 5));
459 EXPECT_EQ(std::string(), gesture_delegate_.GetAndClearDescriptions()); 459 EXPECT_EQ(std::string(), gesture_delegate_.GetAndClearDescriptions());
460 460
461 // Respond from the first view, with no gesture, should unblock cancel. 461 // Respond from the first view, with no gesture, should unblock cancel.
462 SetGestures(&root_, pointer_id, kInvalidGestureId, SetWith(5u, 10u), 462 SetGestures(&root_, pointer_id, kInvalidGestureId, SetWith(5u, 10u),
463 std::set<uint32_t>()); 463 std::set<uint32_t>());
464 EXPECT_EQ("cancel pointer=1 connection=1 chosen=false", 464 EXPECT_EQ("cancel pointer=1 connection=1 chosen=false",
465 gesture_delegate_.GetAndClearDescriptions()); 465 gesture_delegate_.GetAndClearDescriptions());
466 } 466 }
467 467
468 } // namespace mus 468 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/mus/gesture_manager_delegate.h ('k') | components/mus/gles2/command_buffer_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698