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

Unified Diff: chrome/browser/printing/print_preview_dialog_controller_browsertest.cc

Issue 124673002: Remove notifications from PrintPreviewDialogController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 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/printing/print_preview_dialog_controller_browsertest.cc
diff --git a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
index ee9fbb39eb5d4b74b54c3524c860b2535fa595a9..1c769f4b3acd85f68f481159fb11ed0e3e581f40 100644
--- a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
@@ -14,9 +14,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/test/browser_test_utils.h"
#include "url/gurl.h"
#include "ipc/ipc_message_macros.h"
@@ -209,11 +208,9 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewDialogControllerBrowserTest,
// Reload the initiator. Make sure reloading destroys the print preview
// dialog.
PrintPreviewDialogDestroyedObserver dialog_destroyed_observer(preview_dialog);
- content::WindowedNotificationObserver notification_observer(
- content::NOTIFICATION_LOAD_STOP,
- content::NotificationService::AllSources());
chrome::Reload(browser(), CURRENT_TAB);
- notification_observer.Wait();
+ content::WaitForLoadStop(
+ browser()->tab_strip_model()->GetActiveWebContents());
ASSERT_TRUE(dialog_destroyed_observer.dialog_destroyed());
// Try printing again.

Powered by Google App Engine
This is Rietveld 408576698