Commit 7fdc25a1 authored by Mustaq Ahmed's avatar Mustaq Ahmed Committed by Commit Bot

Remove unintended user activation in OpenerNavigation_DownloadPolicy

This fixes the test for UAv2.

Bug: 906639
Change-Id: Ic23f0384691b4cbc3936efabafa2c8cbd128c780
Reviewed-on: https://chromium-review.googlesource.com/c/1342773Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609417}
parent 58967030
......@@ -1435,12 +1435,13 @@ IN_PROC_BROWSER_TEST_F(NavigationBrowserTest, OpenerNavigation_DownloadPolicy) {
DownloadTestObserverInProgress observer(
BrowserContext::GetDownloadManager(opener->GetBrowserContext()),
1 /* wait_count */);
EXPECT_TRUE(ExecuteScript(
EXPECT_TRUE(ExecuteScriptWithoutUserGesture(
popup,
"window.opener.location ='data:html/text;base64,'+btoa('payload');"));
observer.WaitForFinished();
histograms.ExpectUniqueSample("Navigation.DownloadPolicy",
NavigationDownloadPolicy::kAllowOpener, 1);
NavigationDownloadPolicy::kAllowOpenerNoGesture,
1);
}
} // namespace content
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