| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/platform_thread.h" | 7 #include "base/platform_thread.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
| 10 #include "chrome/browser/automation/url_request_mock_http_job.h" | 10 #include "chrome/browser/automation/url_request_mock_http_job.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // http://crbug.com/15416 | 21 // http://crbug.com/15416 |
| 22 #define MAYBE_FilenameFromPageTitle DISABLED_FilenameFromPageTitle | 22 #define MAYBE_FilenameFromPageTitle DISABLED_FilenameFromPageTitle |
| 23 #else | 23 #else |
| 24 #define MAYBE_SaveCompleteHTML SaveCompleteHTML | 24 #define MAYBE_SaveCompleteHTML SaveCompleteHTML |
| 25 #define MAYBE_SaveHTMLOnly SaveHTMLOnly | 25 #define MAYBE_SaveHTMLOnly SaveHTMLOnly |
| 26 #define MAYBE_FilenameFromPageTitle FilenameFromPageTitle | 26 #define MAYBE_FilenameFromPageTitle FilenameFromPageTitle |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 const char* const kTestDir = "save_page"; | 29 const char* const kTestDir = "save_page"; |
| 30 | 30 |
| 31 const char* const kAppendedExtension = ".htm"; | 31 const char* const kAppendedExtension = |
| 32 #if defined(OS_WIN) |
| 33 ".htm"; |
| 34 #else |
| 35 ".html"; |
| 36 #endif |
| 32 | 37 |
| 33 class SavePageTest : public UITest { | 38 class SavePageTest : public UITest { |
| 34 protected: | 39 protected: |
| 35 SavePageTest() : UITest() {} | 40 SavePageTest() : UITest() {} |
| 36 | 41 |
| 37 void CheckFile(const FilePath& client_file, | 42 void CheckFile(const FilePath& client_file, |
| 38 const FilePath& server_file, | 43 const FilePath& server_file, |
| 39 bool check_equal) { | 44 bool check_equal) { |
| 40 file_util::FileInfo previous, current; | 45 file_util::FileInfo previous, current; |
| 41 bool exist = false; | 46 bool exist = false; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 EXPECT_TRUE(browser->RunCommandAsync(IDC_SAVE_PAGE)); | 209 EXPECT_TRUE(browser->RunCommandAsync(IDC_SAVE_PAGE)); |
| 205 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); | 210 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); |
| 206 automation()->SavePackageShouldPromptUser(true); | 211 automation()->SavePackageShouldPromptUser(true); |
| 207 | 212 |
| 208 CheckFile(full_file_name, FilePath::FromWStringHack(UTF8ToWide(file_name)), | 213 CheckFile(full_file_name, FilePath::FromWStringHack(UTF8ToWide(file_name)), |
| 209 false); | 214 false); |
| 210 EXPECT_TRUE(DieFileDie(full_file_name, false)); | 215 EXPECT_TRUE(DieFileDie(full_file_name, false)); |
| 211 EXPECT_TRUE(DieFileDie(dir, true)); | 216 EXPECT_TRUE(DieFileDie(dir, true)); |
| 212 } | 217 } |
| 213 #endif | 218 #endif |
| OLD | NEW |