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

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

Issue 2317993003: //chrome/browser and //components A-E: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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 (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> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 base::FilePath expected_file_name = ui_test_utils::GetTestFilePath( 135 base::FilePath expected_file_name = ui_test_utils::GetTestFilePath(
136 base::FilePath(kTestDir), expected); 136 base::FilePath(kTestDir), expected);
137 137
138 EXPECT_TRUE(base::ContentsEqual(full_file_name, expected_file_name)) << 138 EXPECT_TRUE(base::ContentsEqual(full_file_name, expected_file_name)) <<
139 "generated_file = " << full_file_name.AsUTF8Unsafe() << 139 "generated_file = " << full_file_name.AsUTF8Unsafe() <<
140 ", expected_file = " << expected_file_name.AsUTF8Unsafe(); 140 ", expected_file = " << expected_file_name.AsUTF8Unsafe();
141 } 141 }
142 142
143 void SetUpOnMainThread() override { 143 void SetUpOnMainThread() override {
144 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 144 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
145 save_dir_ = temp_dir_.path(); 145 save_dir_ = temp_dir_.GetPath();
146 temp_sub_resource_dir_ = save_dir_.AppendASCII("sub_resource_files"); 146 temp_sub_resource_dir_ = save_dir_.AppendASCII("sub_resource_files");
147 147
148 BrowserThread::PostTask( 148 BrowserThread::PostTask(
149 BrowserThread::IO, FROM_HERE, 149 BrowserThread::IO, FROM_HERE,
150 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); 150 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
151 } 151 }
152 152
153 base::ScopedTempDir temp_dir_; 153 base::ScopedTempDir temp_dir_;
154 base::FilePath save_dir_; 154 base::FilePath save_dir_;
155 base::FilePath temp_sub_resource_dir_; 155 base::FilePath temp_sub_resource_dir_;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 // Dump the page, the content of dump page should be equal with our expect 274 // Dump the page, the content of dump page should be equal with our expect
275 // result file. 275 // result file.
276 base::FilePath expected_result_file_name = 276 base::FilePath expected_result_file_name =
277 base::FilePath().AppendASCII(kAutoDetectDir). 277 base::FilePath().AppendASCII(kAutoDetectDir).
278 AppendASCII(kExpectedResultDir). 278 AppendASCII(kExpectedResultDir).
279 AppendASCII(kTestDatas[i].expected_result); 279 AppendASCII(kTestDatas[i].expected_result);
280 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name); 280 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name);
281 } 281 }
282 } 282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698