Commit 311f7c0a authored by engedy's avatar engedy Committed by Commit bot

Prevent racey favicon loads in subresource filter browsertests.

The favicon load was at race with the page load event, which caused flakiness
in tests that verified, at page load completion time, the number of evaluated
loads recorded into histograms.

BUG=677370

Review-Url: https://codereview.chromium.org/2604173002
Cr-Commit-Position: refs/heads/master@{#440956}
parent b65b86e3
......@@ -488,8 +488,8 @@ void ExpectHistogramsAreRecordedForTestFrameSet(
tester.ExpectTotalCount(kEvaluationTotalCPUDurationForDocument,
time_recorded ? 6 : 0);
tester.ExpectTotalCount(kEvaluationWallDuration, time_recorded ? 7 : 0);
tester.ExpectTotalCount(kEvaluationCPUDuration, time_recorded ? 7 : 0);
tester.ExpectTotalCount(kEvaluationWallDuration, time_recorded ? 6 : 0);
tester.ExpectTotalCount(kEvaluationCPUDuration, time_recorded ? 6 : 0);
// Activation timing histograms are always recorded.
tester.ExpectTotalCount(kActivationWallDuration, 6);
......
<html>
<head>
<!--
The favicon resource load is at race with the page load event. Specify a
data URI as the source of the icon, so that the load is not evaluated by
the subresource filter. This prevent flakiness in tests that verify, at
page load completion time, that the correct number of evaluated loads
have been recorded into histograms.
-->
<link rel="icon" href="data:image/png;base64,">
<script type="text/javascript">
function insertFrameWithScriptAndNotify() {
var frame = document.createElement("iframe");
......
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