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

Side by Side Diff: third_party/WebKit/Source/platform/exported/FilePathConversionTest.cpp

Issue 2796233002: Rewrite references to "wtf/" to "platform/wtf/" in platform/exported. (Closed)
Patch Set: Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "public/platform/FilePathConversion.h" 5 #include "public/platform/FilePathConversion.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "platform/wtf/text/WTFString.h"
8 #include "public/platform/WebString.h" 9 #include "public/platform/WebString.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 #include "wtf/text/WTFString.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 TEST(FilePathConversionTest, convert) { 14 TEST(FilePathConversionTest, convert) {
15 String test8bitString("path"); 15 String test8bitString("path");
16 String test8bitLatin1("a\xC4"); 16 String test8bitLatin1("a\xC4");
17 17
18 static const UChar test[5] = {0x0070, 0x0061, 0x0074, 0x0068, 0}; // path 18 static const UChar test[5] = {0x0070, 0x0061, 0x0074, 0x0068, 0}; // path
19 static const UChar testLatin1[3] = {0x0061, 0x00C4, 0}; // a\xC4 19 static const UChar testLatin1[3] = {0x0061, 0x00C4, 0}; // a\xC4
20 static const UChar testUTF16[3] = {0x6587, 0x5B57, 0}; // \u6587 \u5B57 20 static const UChar testUTF16[3] = {0x6587, 0x5B57, 0}; // \u6587 \u5B57
(...skipping 24 matching lines...) Expand all
45 FilePathToWebString(base::FilePath(FILE_PATH_LITERAL("path"))) 45 FilePathToWebString(base::FilePath(FILE_PATH_LITERAL("path")))
46 .utf8() 46 .utf8()
47 .data()); 47 .data());
48 EXPECT_STREQ(test8bitLatin1.utf8().data(), 48 EXPECT_STREQ(test8bitLatin1.utf8().data(),
49 FilePathToWebString(pathLatin1).utf8().data()); 49 FilePathToWebString(pathLatin1).utf8().data());
50 EXPECT_STREQ(test16bitUTF16.utf8().data(), 50 EXPECT_STREQ(test16bitUTF16.utf8().data(),
51 FilePathToWebString(pathUTF16).utf8().data()); 51 FilePathToWebString(pathUTF16).utf8().data());
52 } 52 }
53 53
54 } // namespace blink 54 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698