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

Side by Side Diff: url/url_test_utils.h

Issue 15709011: Use a direct include of strings headers in url/, win8/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebas3e Created 7 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 | Annotate | Revision Log
« no previous file with comments | « url/url_parse.h ('k') | url/url_util.h » ('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 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 #ifndef URL_URL_TEST_UTILS_H_ 5 #ifndef URL_URL_TEST_UTILS_H_
6 #define URL_URL_TEST_UTILS_H_ 6 #define URL_URL_TEST_UTILS_H_
7 7
8 // Convenience functions for string conversions. 8 // Convenience functions for string conversions.
9 // These are mostly intended for use in unit tests. 9 // These are mostly intended for use in unit tests.
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/string16.h" 13 #include "base/strings/string16.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "url/url_canon_internal.h" 15 #include "url/url_canon_internal.h"
16 16
17 namespace url_test_utils { 17 namespace url_test_utils {
18 18
19 // Converts a UTF-16 string from native wchar_t format to char16, by 19 // Converts a UTF-16 string from native wchar_t format to char16, by
20 // truncating the high 32 bits. This is not meant to handle true UTF-32 20 // truncating the high 32 bits. This is not meant to handle true UTF-32
21 // encoded strings. 21 // encoded strings.
22 inline string16 WStringToUTF16(const wchar_t* src) { 22 inline string16 WStringToUTF16(const wchar_t* src) {
23 string16 str; 23 string16 str;
(...skipping 20 matching lines...) Expand all
44 EXPECT_TRUE(url_canon::ConvertUTF16ToUTF8(src.data(), 44 EXPECT_TRUE(url_canon::ConvertUTF16ToUTF8(src.data(),
45 static_cast<int>(src.length()), 45 static_cast<int>(src.length()),
46 &output)); 46 &output));
47 output.Complete(); 47 output.Complete();
48 return str; 48 return str;
49 } 49 }
50 50
51 } // namespace url_test_utils 51 } // namespace url_test_utils
52 52
53 #endif // URL_URL_TEST_UTILS_H_ 53 #endif // URL_URL_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « url/url_parse.h ('k') | url/url_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698