| 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);
|
|
|