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

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

Issue 23022006: Remove GetActiveEntry usage from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Save Page As code and test. Created 7 years, 3 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
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;
« no previous file with comments | « no previous file | content/browser/accessibility/accessibility_ui.cc » ('j') | content/browser/accessibility/accessibility_ui.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698