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

Unified Diff: chrome/browser/download/save_page_uitest.cc

Issue 165393: Add a UI test for "Encoding" menu. Please see crbug.com/5515 for more details... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_encoding_uitest.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_page_uitest.cc
===================================================================
--- chrome/browser/download/save_page_uitest.cc (revision 23177)
+++ chrome/browser/download/save_page_uitest.cc (working copy)
@@ -29,24 +29,16 @@
protected:
SavePageTest() : UITest() {}
- void CheckFile(const FilePath& client_file,
- const FilePath& server_file) {
- file_util::FileInfo previous, current;
- bool exist = false;
- for (int i = 0; i < 20; ++i) {
- if (exist) {
- file_util::GetFileInfo(client_file, &current);
- if (current.size == previous.size)
- break;
- previous = current;
- } else if (file_util::PathExists(client_file)) {
- file_util::GetFileInfo(client_file, &previous);
- exist = true;
- }
- PlatformThread::Sleep(sleep_timeout_ms());
- }
- EXPECT_TRUE(exist);
- EXPECT_TRUE(file_util::DieFileDie(client_file, false));
+ void CheckFile(const FilePath& generated_file,
+ const FilePath& expected_result_file) {
+ FilePath expected_result_filepath = UITest::GetTestFilePath(
+ UTF8ToWide(kTestDir), expected_result_file.ToWStringHack());
+ ASSERT_TRUE(file_util::PathExists(expected_result_filepath));
+ WaitForGeneratedFileAndCheck(generated_file,
+ expected_result_filepath,
+ false, // Don't care whether they are equal.
+ false,
+ false); // Don't delete file
}
virtual void SetUp() {
« no previous file with comments | « chrome/browser/browser_encoding_uitest.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698