Skip to content

Commit

Permalink
Merge pull request #9285 from w3c/sync_c434326b946e471e50428ed987b5df…
Browse files Browse the repository at this point in the history
…e220c85027

Ensure that resource_initiator_types test is only run once,
  • Loading branch information
jgraham committed Jan 30, 2018
2 parents 6022349 + c434326 commit 7174d3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resource-timing/resource_initiator_types.html
Expand Up @@ -17,6 +17,7 @@
let ol_font_loaded = false;
let ul_font_loaded = false;
let xhr_loaded = false;
let tests_run = false;

function check_finished() {
if (!ul_font_loaded) {
Expand Down Expand Up @@ -64,6 +65,10 @@
}

function perform_test() {
if (tests_run) {
return;
}
tests_run = true;
const context = new PerformanceContext(document.getElementById('frameContext').contentWindow.performance);
const entries = context.getEntriesByType('resource');

Expand Down

0 comments on commit 7174d3e

Please sign in to comment.