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

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

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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
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/view_manager/gesture_manager.h" 5 #include "components/view_manager/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/view_manager/gesture_manager_delegate.h" 9 #include "components/view_manager/gesture_manager_delegate.h"
10 #include "components/view_manager/public/cpp/keys.h" 10 #include "components/view_manager/public/cpp/keys.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 } // namespace 103 } // namespace
104 104
105 class TestGestureManagerDelegate : public GestureManagerDelegate { 105 class TestGestureManagerDelegate : public GestureManagerDelegate {
106 public: 106 public:
107 TestGestureManagerDelegate() {} 107 TestGestureManagerDelegate() {}
108 ~TestGestureManagerDelegate() override {} 108 ~TestGestureManagerDelegate() override {}
109 109
110 std::string GetAndClearDescriptions() { 110 std::string GetAndClearDescriptions() {
111 const std::string result(JoinString(descriptions_, '\n')); 111 const std::string result(base::JoinString(descriptions_, "\n"));
112 descriptions_.clear(); 112 descriptions_.clear();
113 return result; 113 return result;
114 } 114 }
115 115
116 std::vector<std::string>& descriptions() { return descriptions_; } 116 std::vector<std::string>& descriptions() { return descriptions_; }
117 117
118 void AppendDescriptionsFromResults(const ChangeMap& change_map) { 118 void AppendDescriptionsFromResults(const ChangeMap& change_map) {
119 std::set<const ServerView*, CompareViewByConnectionId> views_by_id; 119 std::set<const ServerView*, CompareViewByConnectionId> views_by_id;
120 for (const auto& pair : change_map) 120 for (const auto& pair : change_map)
121 views_by_id.insert(pair.first); 121 views_by_id.insert(pair.first);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 view_manager 468 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_prefs.cc ('k') | components/view_manager/test_change_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698