| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/test/test_file_util.h" | 8 #include "base/test/test_file_util.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/net/url_request_mock_http_job.h" | 10 #include "chrome/browser/net/url_request_mock_http_job.h" |
| 11 #include "chrome/browser/download/save_package.h" | 11 #include "chrome/browser/download/save_package.h" |
| 12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
| 13 #include "chrome/test/automation/browser_proxy.h" | 13 #include "chrome/test/automation/browser_proxy.h" |
| 14 #include "chrome/test/automation/tab_proxy.h" | 14 #include "chrome/test/automation/tab_proxy.h" |
| 15 #include "chrome/test/ui/ui_test.h" | 15 #include "chrome/test/ui/ui_test.h" |
| 16 #include "chrome/test/ui_test_utils.h" | 16 #include "chrome/test/ui_test_utils.h" |
| 17 #include "net/url_request/url_request_unittest.h" | 17 #include "net/url_request/url_request_test_util.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("save_page"); | 21 const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("save_page"); |
| 22 | 22 |
| 23 const char* const kAppendedExtension = | 23 const char* const kAppendedExtension = |
| 24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
| 25 ".htm"; | 25 ".htm"; |
| 26 #else | 26 #else |
| 27 ".html"; | 27 ".html"; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 automation()->SavePackageShouldPromptUser(false); | 84 automation()->SavePackageShouldPromptUser(false); |
| 85 EXPECT_TRUE(browser->RunCommandAsync(IDC_SAVE_PAGE)); | 85 EXPECT_TRUE(browser->RunCommandAsync(IDC_SAVE_PAGE)); |
| 86 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); | 86 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); |
| 87 automation()->SavePackageShouldPromptUser(true); | 87 automation()->SavePackageShouldPromptUser(true); |
| 88 | 88 |
| 89 CheckFile(full_file_name, file_name); | 89 CheckFile(full_file_name, file_name); |
| 90 EXPECT_TRUE(file_util::DieFileDie(full_file_name, false)); | 90 EXPECT_TRUE(file_util::DieFileDie(full_file_name, false)); |
| 91 EXPECT_TRUE(file_util::DieFileDie(dir, true)); | 91 EXPECT_TRUE(file_util::DieFileDie(dir, true)); |
| 92 } | 92 } |
| 93 #endif | 93 #endif |
| OLD | NEW |