| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |