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

Side by Side Diff: components/url_formatter/url_fixer_unittest.cc

Issue 1549993003: Switch to standard integer types in components/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « components/url_formatter/url_fixer.cc ('k') | components/url_formatter/url_formatter.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
5 #include <stdlib.h> 6 #include <stdlib.h>
6 7
7 #include "base/base_paths.h" 8 #include "base/base_paths.h"
8 #include "base/basictypes.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
12 #include "base/macros.h"
12 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h"
14 #include "components/url_formatter/url_fixer.h" 16 #include "components/url_formatter/url_fixer.h"
15 #include "net/base/filename_util.h" 17 #include "net/base/filename_util.h"
16 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
17 #include "url/gurl.h" 19 #include "url/gurl.h"
18 #include "url/third_party/mozilla/url_parse.h" 20 #include "url/third_party/mozilla/url_parse.h"
19 21
20 namespace url { 22 namespace url {
21 23
22 std::ostream& operator<<(std::ostream& os, const Component& part) { 24 std::ostream& operator<<(std::ostream& os, const Component& part) {
23 return os << "(begin=" << part.begin << ", len=" << part.len << ")"; 25 return os << "(begin=" << part.begin << ", len=" << part.len << ")";
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 EXPECT_TRUE(base::DeleteFile(full_path, false)); 530 EXPECT_TRUE(base::DeleteFile(full_path, false));
529 EXPECT_TRUE(base::DeleteFile(new_dir, true)); 531 EXPECT_TRUE(base::DeleteFile(new_dir, true));
530 532
531 // Test that an obvious HTTP URL isn't accidentally treated as an absolute 533 // Test that an obvious HTTP URL isn't accidentally treated as an absolute
532 // file path (on account of system-specific craziness). 534 // file path (on account of system-specific craziness).
533 base::FilePath empty_path; 535 base::FilePath empty_path;
534 base::FilePath http_url_path(FILE_PATH_LITERAL("http://../")); 536 base::FilePath http_url_path(FILE_PATH_LITERAL("http://../"));
535 EXPECT_TRUE(url_formatter::FixupRelativeFile(empty_path, http_url_path) 537 EXPECT_TRUE(url_formatter::FixupRelativeFile(empty_path, http_url_path)
536 .SchemeIs("http")); 538 .SchemeIs("http"));
537 } 539 }
OLDNEW
« no previous file with comments | « components/url_formatter/url_fixer.cc ('k') | components/url_formatter/url_formatter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698