OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "remoting/base/capabilities.h" | 9 #include "remoting/base/capabilities.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 struct HasCapabilityTestData { | 14 struct HasCapabilityTestData { |
15 const char* capabilities; | 15 const char* capabilities; |
16 const char* key; | 16 const char* key; |
17 bool result; | 17 bool result; |
18 }; | 18 }; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 Tokenize(data[i].left, " ", &caps); | 97 Tokenize(data[i].left, " ", &caps); |
98 | 98 |
99 do { | 99 do { |
100 EXPECT_EQ(IntersectCapabilities(JoinString(caps, " "), data[i].right), | 100 EXPECT_EQ(IntersectCapabilities(JoinString(caps, " "), data[i].right), |
101 data[i].result); | 101 data[i].result); |
102 } while (std::next_permutation(caps.begin(), caps.end())); | 102 } while (std::next_permutation(caps.begin(), caps.end())); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 } // namespace remoting | 106 } // namespace remoting |
OLD | NEW |