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

Unified Diff: chrome/browser/chromeos/login/test/js_checker.cc

Issue 2347013002: Fix how JsChecker::GetBoolImpl enforces boolean result (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/test/js_checker.cc
diff --git a/chrome/browser/chromeos/login/test/js_checker.cc b/chrome/browser/chromeos/login/test/js_checker.cc
index 0b5db2c7dde8e6c6d3e850c6eae7eb726b645044..6ccc5ab2a3a43b4da3d2ffa276bbc4c70a6fde1e 100644
--- a/chrome/browser/chromeos/login/test/js_checker.cc
+++ b/chrome/browser/chromeos/login/test/js_checker.cc
@@ -86,9 +86,8 @@ void JSChecker::ExpectNE(const std::string& expression,
void JSChecker::GetBoolImpl(const std::string& expression, bool* result) {
CHECK(web_contents_);
- ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents_,
- "!!" + WrapSend(expression),
- result));
+ ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
+ web_contents_, WrapSend("!!(" + expression + ")"), result));
}
void JSChecker::GetIntImpl(const std::string& expression, int* result) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698