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

Unified Diff: chrome/browser/chrome_security_exploit_browsertest.cc

Issue 2851423002: ChromeSecurityExploitBrowserTest: normalize whitespace for tests (Closed)
Patch Set: Created 3 years, 8 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/chrome_security_exploit_browsertest.cc
diff --git a/chrome/browser/chrome_security_exploit_browsertest.cc b/chrome/browser/chrome_security_exploit_browsertest.cc
index 35bb23f3a83daf1bef353c13146a5500cfcb72be..89d83fe3c4936c915b7eb1ba2f79d551998b3d6f 100644
--- a/chrome/browser/chrome_security_exploit_browsertest.cc
+++ b/chrome/browser/chrome_security_exploit_browsertest.cc
@@ -178,12 +178,15 @@ IN_PROC_BROWSER_TEST_F(ChromeSecurityExploitBrowserTest,
rfh = browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame();
EXPECT_EQ(GURL(target_origin), rfh->GetSiteInstance()->GetSiteURL());
std::string body;
- EXPECT_TRUE(content::ExecuteScriptAndExtractString(
- rfh, "window.domAutomationController.send(document.body.innerText);",
- &body));
+ std::string script = R"(
+ var textContent = document.body.innerText.replace(/\n+/g, '\n');
+ window.domAutomationController.send(textContent);
+ )";
+
+ EXPECT_TRUE(content::ExecuteScriptAndExtractString(rfh, script, &body));
if (extensions::IsIsolateExtensionsEnabled()) {
EXPECT_EQ(
- "\nYour file was not found\n\n"
+ "\nYour file was not found\n"
"It may have been moved or deleted.\n"
"ERR_FILE_NOT_FOUND\n",
body);
« 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