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

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

Issue 155095: Make default extension for downloading html "html" rather than "htm" on non-w... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « chrome/browser/download/save_package_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/download/save_package_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698