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

Unified Diff: chrome/browser/ui/webui/web_ui_browsertest.cc

Issue 8136027: Print Preview: Make print preview tab modal. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments Created 9 years, 2 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/ui/webui/web_ui_browsertest.cc
===================================================================
--- chrome/browser/ui/webui/web_ui_browsertest.cc (revision 105826)
+++ chrome/browser/ui/webui/web_ui_browsertest.cc (working copy)
@@ -12,6 +12,7 @@
#include "base/path_service.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/printing/print_preview_tab_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
@@ -206,6 +207,13 @@
browser()->tabstrip_model(), this);
browser()->Print();
tabstrip_observer.WaitForObservation();
+ printing::PrintPreviewTabController* tab_controller =
+ printing::PrintPreviewTabController::GetInstance();
+ ASSERT_TRUE(tab_controller);
+ TabContentsWrapper* preview_tab = tab_controller->GetPrintPreviewForTab(
+ browser()->GetSelectedTabContentsWrapper());
+ ASSERT_TRUE(preview_tab);
+ SetWebUIInstance(preview_tab->web_ui());
}
const char WebUIBrowserTest::kDummyURL[] = "chrome://DummyURL";

Powered by Google App Engine
This is Rietveld 408576698