Revision 38cb63e5ec8e6a14fb1094dee946800f5ea35bee authored by Josh Matthews on 01 August 2018, 18:31:04 UTC, committed by GitHub on 01 August 2018, 18:31:04 UTC
1 parent 5aac5c1
test_performance_attributes.sub.html
<!DOCTYPE HTML>
<html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- Use https to ensure secureConnectionStart is nontrivial, if it is supported. -->
<iframe src="https://{{host}}:{{ports[https][0]}}/navigation-timing/resources/performance_attribute_sender.html"></iframe>
<body>
<script>
async_test(function(t) {
window.addEventListener('message', t.step_func_done(function(event) {
const connectStart = event.data[0];
const navigationStart = event.data[1];
const secureConnectionStart = event.data[2];
const connectEnd = event.data[3];
assert_greater_than_equal(connectStart, navigationStart,
'performance.timing.connectStart >= performance.timing.navigationStart');
// secureConnectionStart is an optional attribute.
if (secureConnectionStart == undefined) {
return;
}
assert_greater_than_equal(secureConnectionStart, connectStart,
'performance.timing.secureConnectionStart >= performance.timing.connectStart');
assert_greater_than_equal(connectEnd, secureConnectionStart,
'performance.timing.connectEnd >= performance.timing.secureConnectionStart');
}));
}, 'Check that performance.timing has reasonable values for secureConnectionStart and other attributes');
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...