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

Side by Side Diff: athena/wm/window_list_provider_impl_unittest.cc

Issue 795423002: Convert usage of banned std::to_string() to base::IntToString(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whoops Created 6 years 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 | « no previous file | no next file » | 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 "athena/wm/window_list_provider_impl.h" 5 #include "athena/wm/window_list_provider_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "athena/screen/public/screen_manager.h" 9 #include "athena/screen/public/screen_manager.h"
10 #include "athena/test/base/athena_test_base.h" 10 #include "athena/test/base/athena_test_base.h"
11 #include "athena/test/base/test_windows.h" 11 #include "athena/test/base/test_windows.h"
12 #include "athena/wm/public/window_list_provider_observer.h" 12 #include "athena/wm/public/window_list_provider_observer.h"
13 #include "athena/wm/public/window_manager.h" 13 #include "athena/wm/public/window_manager.h"
14 #include "base/strings/string_number_conversions.h"
14 #include "ui/aura/client/window_tree_client.h" 15 #include "ui/aura/client/window_tree_client.h"
15 #include "ui/aura/test/test_window_delegate.h" 16 #include "ui/aura/test/test_window_delegate.h"
16 #include "ui/aura/window.h" 17 #include "ui/aura/window.h"
17 #include "ui/wm/core/window_util.h" 18 #include "ui/wm/core/window_util.h"
18 19
19 namespace athena { 20 namespace athena {
20 21
21 namespace { 22 namespace {
22 23
23 bool AreWindowListsEqual(const aura::Window::Windows& one, 24 bool AreWindowListsEqual(const aura::Window::Windows& one,
(...skipping 19 matching lines...) Expand all
43 std::string GetWindowOrder(const aura::Window::Windows& original, 44 std::string GetWindowOrder(const aura::Window::Windows& original,
44 const aura::Window::Windows& now) { 45 const aura::Window::Windows& now) {
45 if (original.size() != now.size()) 46 if (original.size() != now.size())
46 return "size has changed."; 47 return "size has changed.";
47 std::string output; 48 std::string output;
48 for (aura::Window::Windows::const_iterator it = now.begin(); 49 for (aura::Window::Windows::const_iterator it = now.begin();
49 it != now.end(); ++it) { 50 it != now.end(); ++it) {
50 for (size_t i = 0; i < original.size(); i++) { 51 for (size_t i = 0; i < original.size(); i++) {
51 if ((*it) == original[i]) { 52 if ((*it) == original[i]) {
52 output += (output.size() ? " " : std::string()) + 53 output += (output.size() ? " " : std::string()) +
53 std::to_string(i + 1); 54 base::IntToString(i + 1);
54 break; 55 break;
55 } 56 }
56 } 57 }
57 } 58 }
58 return output; 59 return output;
59 } 60 }
60 61
61 class WindowListObserver : public WindowListProviderObserver { 62 class WindowListObserver : public WindowListProviderObserver {
62 public: 63 public:
63 explicit WindowListObserver(WindowListProvider* provider) 64 explicit WindowListObserver(WindowListProvider* provider)
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 EXPECT_FALSE(t1->IsVisible()); 348 EXPECT_FALSE(t1->IsVisible());
348 w1->Show(); 349 w1->Show();
349 EXPECT_TRUE(t1->IsVisible()); 350 EXPECT_TRUE(t1->IsVisible());
350 351
351 // Resetting transient window won't notify the observer. 352 // Resetting transient window won't notify the observer.
352 t1.reset(); 353 t1.reset();
353 EXPECT_EQ(0, observer->window_removal_calls()); 354 EXPECT_EQ(0, observer->window_removal_calls());
354 } 355 }
355 356
356 } // namespace athena 357 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698