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

Side by Side Diff: chrome/browser/download/save_page_browsertest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 SavePackageFinishedObserver observer( 802 SavePackageFinishedObserver observer(
803 content::BrowserContext::GetDownloadManager(browser()->profile()), 803 content::BrowserContext::GetDownloadManager(browser()->profile()),
804 loop_runner->QuitClosure()); 804 loop_runner->QuitClosure());
805 chrome::SavePage(browser()); 805 chrome::SavePage(browser());
806 loop_runner->Run(); 806 loop_runner->Run();
807 base::FilePath download_dir = DownloadPrefs::FromDownloadManager( 807 base::FilePath download_dir = DownloadPrefs::FromDownloadManager(
808 GetDownloadManager())->DownloadPath(); 808 GetDownloadManager())->DownloadPath();
809 base::FilePath filename = download_dir.AppendASCII("dataurl.txt"); 809 base::FilePath filename = download_dir.AppendASCII("dataurl.txt");
810 ASSERT_TRUE(base::PathExists(filename)); 810 ASSERT_TRUE(base::PathExists(filename));
811 std::string contents; 811 std::string contents;
812 EXPECT_TRUE(file_util::ReadFileToString(filename, &contents)); 812 EXPECT_TRUE(base::ReadFileToString(filename, &contents));
813 EXPECT_EQ("foo", contents); 813 EXPECT_EQ("foo", contents);
814 } 814 }
815 815
816 } // namespace 816 } // namespace
817 817
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/drive/fake_drive_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698