Chromium Code Reviews| Index: chrome/browser/download/save_page_browsertest.cc |
| diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc |
| index 5f75f65a979bb8399f078f774c9ae90154579b5f..fa89853454823ca4273bd003d909e05e107d85e7 100644 |
| --- a/chrome/browser/download/save_page_browsertest.cc |
| +++ b/chrome/browser/download/save_page_browsertest.cc |
| @@ -593,11 +593,18 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, |
| DownloadItemCreatedObserver creation_observer( |
| BrowserContext::GetDownloadManager(incognito->profile())); |
| + // The navigation needs to at least commit, otherwise there will be nothing |
|
Charlie Reis
2013/09/16 23:10:54
I agree with rdsmith: this test appears to be a re
nasko
2013/09/18 17:03:18
Reverting this in favor of more complete fix as di
|
| + // to save. The test doesn't need to wait for a full page load though. |
| + content::WindowedNotificationObserver commit_observer( |
| + content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
| + content::NotificationService::AllSources()); |
| + |
| // Navigate, unblocking with new tab. |
| GURL url = URLRequestMockHTTPJob::GetMockUrl( |
| base::FilePath(kTestDir).AppendASCII("b.htm")); |
| NavigateToURLWithDisposition(incognito, url, NEW_FOREGROUND_TAB, |
| ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB); |
| + commit_observer.Wait(); |
| // Save the page before completion. |
| base::FilePath full_file_name, dir; |