Commit 00f69e8e authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Fix expectations for HostedAppTest.SubframeRedirectsToHostedApp

At some point the innerText of the test page gained a couple of newline
characters. This isn't important to the test so trim them out.
Also use EvalJs() instead of the deprecated ExecuteScript*().

Bug: 956047
Change-Id: I8a8a67dcef9838ba7350d17a8fb2b51ccb6bf043
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1585746
Auto-Submit: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarJay Harris <harrisjay@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654796}
parent 944bbb01
...@@ -795,11 +795,9 @@ IN_PROC_BROWSER_TEST_P(HostedAppTest, SubframeRedirectsToHostedApp) { ...@@ -795,11 +795,9 @@ IN_PROC_BROWSER_TEST_P(HostedAppTest, SubframeRedirectsToHostedApp) {
// content. // content.
RenderFrameHost* subframe = content::ChildFrameAt(tab->GetMainFrame(), 0); RenderFrameHost* subframe = content::ChildFrameAt(tab->GetMainFrame(), 0);
EXPECT_EQ(app_url, subframe->GetLastCommittedURL()); EXPECT_EQ(app_url, subframe->GetLastCommittedURL());
std::string result; EXPECT_EQ(
EXPECT_TRUE(ExecuteScriptAndExtractString( "This page has no title.",
subframe, "window.domAutomationController.send(document.body.innerText);", EvalJs(subframe, "document.body.innerText.trim();").ExtractString());
&result));
EXPECT_EQ("This page has no title.", result);
} }
// Check that no assertions are hit when showing a permission request bubble. // Check that no assertions are hit when showing a permission request bubble.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment