OLD | NEW |
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 <stddef.h> |
| 6 |
5 #include <algorithm> | 7 #include <algorithm> |
6 | 8 |
7 #include "remoting/base/util.h" | 9 #include "remoting/base/util.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
10 | 12 |
11 namespace remoting { | 13 namespace remoting { |
12 | 14 |
13 TEST(ReplaceLfByCrLfTest, Basic) { | 15 TEST(ReplaceLfByCrLfTest, Basic) { |
14 EXPECT_EQ("ab", ReplaceLfByCrLf("ab")); | 16 EXPECT_EQ("ab", ReplaceLfByCrLf("ab")); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 EXPECT_FALSE(StringIsUtf8("\xfe\x80\x80\x80\x80\x80\x80", 7)); | 109 EXPECT_FALSE(StringIsUtf8("\xfe\x80\x80\x80\x80\x80\x80", 7)); |
108 EXPECT_FALSE(StringIsUtf8("\xff\x80\x80\x80\x80\x80\x80", 7)); | 110 EXPECT_FALSE(StringIsUtf8("\xff\x80\x80\x80\x80\x80\x80", 7)); |
109 | 111 |
110 // Invalid continuation byte | 112 // Invalid continuation byte |
111 EXPECT_FALSE(StringIsUtf8("\xc0\x00", 2)); | 113 EXPECT_FALSE(StringIsUtf8("\xc0\x00", 2)); |
112 EXPECT_FALSE(StringIsUtf8("\xc0\x40", 2)); | 114 EXPECT_FALSE(StringIsUtf8("\xc0\x40", 2)); |
113 EXPECT_FALSE(StringIsUtf8("\xc0\xc0", 2)); | 115 EXPECT_FALSE(StringIsUtf8("\xc0\xc0", 2)); |
114 } | 116 } |
115 | 117 |
116 } // namespace remoting | 118 } // namespace remoting |
OLD | NEW |