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

Side by Side Diff: ash/accelerators/accelerator_table_unittest.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ash/accelerators/accelerator_table.cc ('k') | ash/accelerators/debug_commands.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <set> 5 #include <set>
6 6
7 #include "ash/accelerators/accelerator_table.h" 7 #include "ash/accelerators/accelerator_table.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 namespace { 13 namespace {
14 14
15 struct Cmp { 15 struct Cmp {
16 bool operator()(const AcceleratorData& lhs, 16 bool operator()(const AcceleratorData& lhs, const AcceleratorData& rhs) {
17 const AcceleratorData& rhs) {
18 if (lhs.trigger_on_press != rhs.trigger_on_press) 17 if (lhs.trigger_on_press != rhs.trigger_on_press)
19 return lhs.trigger_on_press < rhs.trigger_on_press; 18 return lhs.trigger_on_press < rhs.trigger_on_press;
20 if (lhs.keycode != rhs.keycode) 19 if (lhs.keycode != rhs.keycode)
21 return lhs.keycode < rhs.keycode; 20 return lhs.keycode < rhs.keycode;
22 return lhs.modifiers < rhs.modifiers; 21 return lhs.modifiers < rhs.modifiers;
23 // Do not check |action|. 22 // Do not check |action|.
24 } 23 }
25 }; 24 };
26 25
27 } // namespace 26 } // namespace
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // The UMA histogram name must be of the format "Ash.Accelerators.*" 100 // The UMA histogram name must be of the format "Ash.Accelerators.*"
102 std::string uma_histogram(data.uma_histogram_name); 101 std::string uma_histogram(data.uma_histogram_name);
103 EXPECT_TRUE(base::StartsWith(uma_histogram, "Ash.Accelerators.", 102 EXPECT_TRUE(base::StartsWith(uma_histogram, "Ash.Accelerators.",
104 base::CompareCase::SENSITIVE)); 103 base::CompareCase::SENSITIVE));
105 } 104 }
106 } 105 }
107 106
108 #endif // defined(OS_CHROMEOS) 107 #endif // defined(OS_CHROMEOS)
109 108
110 } // namespace ash 109 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | ash/accelerators/debug_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698