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

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

Issue 2978673002: Update print preview test to not use CallJavascriptFunctionUnsafe (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
diff --git a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
index 58c1104bd0e9c38b6e44f05ca35d0aa41a910e12..3a47bb1a1a1d5514c29337a3362459d9715f4c39 100644
--- a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
+++ b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
@@ -209,8 +209,7 @@ class PrintPreviewObserver : public WebContentsObserver {
}
ASSERT_FALSE(script_argument.empty());
- GetUI()->web_ui()->CallJavascriptFunctionUnsafe(
- "onManipulateSettingsForTest", script_argument);
+ GetUI()->SendManipulateSettingsForTest(script_argument);
}
// Saves the print preview settings to be sent to the print preview dialog.
@@ -283,8 +282,7 @@ class PrintPreviewObserver : public WebContentsObserver {
ui->web_ui()->AddMessageHandler(
base::MakeUnique<UIDoneLoadingMessageHandler>(this));
- ui->web_ui()->CallJavascriptFunctionUnsafe(
- "onEnableManipulateSettingsForTest");
+ ui->SendEnableManipulateSettingsForTest();
}
void DidCloneToNewWebContents(WebContents* old_web_contents,
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698