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

Unified Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 1467063002: Introduce the ChromeControllerClient class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/ssl/ssl_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 1d7e7c89fbc47cea3673a0928e72bbb9e9421bf0..17f5fd4b21c597ec8a80bb6c978f45b022333a15 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -46,6 +46,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
+#include "components/security_interstitials/core/controller_client.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "components/ssl_errors/error_classification.h"
#include "components/variations/variations_associated_data.h"
@@ -96,6 +97,7 @@ using content::NavigationController;
using content::NavigationEntry;
using content::SSLStatus;
using content::WebContents;
+using security_interstitials::ControllerClient;
using web_modal::WebContentsModalDialogManager;
const base::FilePath::CharType kDocRoot[] =
@@ -2319,9 +2321,9 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestInterstitialJavaScriptProceeds) {
content::RenderViewHost* interstitial_rvh =
interstitial_page->GetMainFrame()->GetRenderViewHost();
int result = -1;
- std::string javascript = base::StringPrintf(
- "window.domAutomationController.send(%d);",
- SecurityInterstitialPage::CMD_PROCEED);
+ std::string javascript =
+ base::StringPrintf("window.domAutomationController.send(%d);",
+ ControllerClient::CMD_PROCEED);
ASSERT_TRUE(content::ExecuteScriptAndExtractInt(
interstitial_rvh, javascript, &result));
// The above will hang without the fix.
@@ -2354,9 +2356,9 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestInterstitialJavaScriptGoesBack) {
content::RenderViewHost* interstitial_rvh =
interstitial_page->GetMainFrame()->GetRenderViewHost();
int result = -1;
- std::string javascript = base::StringPrintf(
- "window.domAutomationController.send(%d);",
- SecurityInterstitialPage::CMD_DONT_PROCEED);
+ std::string javascript =
+ base::StringPrintf("window.domAutomationController.send(%d);",
+ ControllerClient::CMD_DONT_PROCEED);
ASSERT_TRUE(content::ExecuteScriptAndExtractInt(
interstitial_rvh, javascript, &result));
// The above will hang without the fix.

Powered by Google App Engine
This is Rietveld 408576698