Source code

Revision control

Copy as Markdown

Other Tools

Any copyright is dedicated to the Public Domain.
This file is a sub-test file for the Resource Timing and Performance Timeline
These tests are focused on the iframe corner case.
The first step is to check that the image from this document was added as
an entry to this window.performance object.
The second step is to check that this iframe was not added as an entry to its
own window.performance object.
As a final step, we do a double checking: no ifrmes were added as entries
to this window.performance object.
<meta charset="utf-8">
<title>Test for Bug 822480 - Add in the Resource Timing API</title>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
function doTest() {
let entries = window.performance.getEntriesByName(, 1, "This iframe should have only 1 entry with its URL");[0].type, "navigate", "This iframe should have its navigation entry");
// Check that there are no iframes added as entries
var resources = window.performance.getEntriesByType("resource");
for (var i = 0 ; i < resources.length; i++) {
var entry = resources[i];
if (entry.initiatorType === "iframe") {
ok(false, "unexpected iframe " +;
<body onLoad="doTest()">