diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 23:15:47 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 23:15:47 +0000 |
commit | 3753f52d42975eaefcafca9fc0257ec24e161a9c (patch) | |
tree | c9622baf613dd1b47c304d30e1ded74fa84fce54 /chrome/browser/download | |
parent | 9e23bb1bba29dad5305e8f8a08341aefe7275502 (diff) | |
download | chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.zip chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.tar.gz chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.tar.bz2 |
Implement chrome_proces_util for linux and enable download ui test.
To get the PID from the socket, we use lsof (fuser doesn't work with unix sockets apparently).
The download shelf, save page, and browser ui tests now pass.
Review URL: http://codereview.chromium.org/66071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13716 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/save_page_uitest.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/chrome/browser/download/save_page_uitest.cc b/chrome/browser/download/save_page_uitest.cc index f9a2036..ecb15e8 100644 --- a/chrome/browser/download/save_page_uitest.cc +++ b/chrome/browser/download/save_page_uitest.cc @@ -17,6 +17,15 @@ const std::string kTestDir = "save_page"; +// We don't append an extension on linux. +#if defined(OS_WIN) +const std::string kAppendedExtension = ".htm"; +#elif defined(OS_LINUX) +const std::string kAppendedExtension = ""; +#elif defined(OS_MAC) +// TODO(port): figure this out for mac. +#endif + class SavePageTest : public UITest { protected: SavePageTest() : UITest() {} @@ -131,8 +140,9 @@ TEST_F(SavePageTest, NoSave) { TEST_F(SavePageTest, FilenameFromPageTitle) { std::string file_name = "b.htm"; + FilePath full_file_name = download_dir_.AppendASCII( - "Test page for saving page feature.htm"); + "Test page for saving page feature" + kAppendedExtension); FilePath dir = download_dir_.AppendASCII( "Test page for saving page feature_files"); @@ -158,9 +168,13 @@ TEST_F(SavePageTest, FilenameFromPageTitle) { EXPECT_TRUE(DieFileDie(dir, true)); } +// This tests that a webpage with the title "test.exe" is saved as "test.htm". +// We probably don't care to handle this on linux. +#if !defined(OS_LINUX) TEST_F(SavePageTest, CleanFilenameFromPageTitle) { std::string file_name = "c.htm"; - FilePath full_file_name = download_dir_.AppendASCII("test.htm"); + FilePath full_file_name = download_dir_.AppendASCII("test" + + kAppendedExtension); FilePath dir = download_dir_.AppendASCII("test_files"); GURL url = URLRequestMockHTTPJob::GetMockUrl(UTF8ToWide(kTestDir + "/" + @@ -180,3 +194,4 @@ TEST_F(SavePageTest, CleanFilenameFromPageTitle) { EXPECT_TRUE(DieFileDie(full_file_name, false)); EXPECT_TRUE(DieFileDie(dir, true)); } +#endif |