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

Side by Side Diff: chrome/browser/file_select_helper_unittest.cc

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 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 | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/first_run/first_run.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) 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 "base/command_line.h" 7 #include "base/command_line.h"
6 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/path_service.h" 12 #include "base/path_service.h"
11 #include "base/process/launch.h" 13 #include "base/process/launch.h"
14 #include "build/build_config.h"
12 #include "chrome/browser/file_select_helper.h" 15 #include "chrome/browser/file_select_helper.h"
13 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
14 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
15 18
16 class FileSelectHelperTest : public testing::Test { 19 class FileSelectHelperTest : public testing::Test {
17 public: 20 public:
18 FileSelectHelperTest() {} 21 FileSelectHelperTest() {}
19 22
20 protected: 23 protected:
21 void SetUp() override { 24 void SetUp() override {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 base::FilePath::CharType kBadName[] = {0xe3, 0x81, 0x81, 0x81, 0x82, 0}; 106 base::FilePath::CharType kBadName[] = {0xe3, 0x81, 0x81, 0x81, 0x82, 0};
104 #endif 107 #endif
105 base::FilePath bad_filename(kBadName); 108 base::FilePath bad_filename(kBadName);
106 ASSERT_FALSE(bad_filename.empty()); 109 ASSERT_FALSE(bad_filename.empty());
107 // The only thing we are testing is that if the source filename was non-empty, 110 // The only thing we are testing is that if the source filename was non-empty,
108 // the resulting filename is also not empty. Invalid encoded filenames can 111 // the resulting filename is also not empty. Invalid encoded filenames can
109 // cause conversions to fail. Such failures shouldn't cause the resulting 112 // cause conversions to fail. Such failures shouldn't cause the resulting
110 // filename to disappear. 113 // filename to disappear.
111 EXPECT_FALSE(FileSelectHelper::GetSanitizedFileName(bad_filename).empty()); 114 EXPECT_FALSE(FileSelectHelper::GetSanitizedFileName(bad_filename).empty());
112 } 115 }
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698