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

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

Issue 981243003: Make commands consistent across security interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: if -> switch in SafeBrowsingBlockingPage Created 5 years, 9 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/ssl/captive_portal_blocking_page_browsertest.cc
diff --git a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
index 2e6b6cd82e949585d36170ae0fcee2f9ebdc1322..ec7402c4aab6ec90f242dfee36ab86105715f7cd 100644
--- a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
+++ b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
@@ -39,12 +39,12 @@ bool IsInterstitialDisplayingText(content::InterstitialPage* interstitial,
DCHECK(text.find("\'") == std::string::npos);
std::string command = base::StringPrintf(
"var hasText = document.body.textContent.indexOf('%s') >= 0;"
- "window.domAutomationController.send(hasText);",
+ "window.domAutomationController.send(hasText ? 1 : 0);",
text.c_str());
- bool result = false;
- EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
+ int result = 0;
+ EXPECT_TRUE(content::ExecuteScriptAndExtractInt(
interstitial->GetMainFrame(), command, &result));
- return result;
+ return result == 1;
}
enum ExpectWiFi {

Powered by Google App Engine
This is Rietveld 408576698