mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
aa82f54ab6
There are a few different reasons why tests needed updating (not an exhaustive list): - Tests assume that successive operations take place at different times. - Tests assume that an operation took a minimum amount of time. - Tests hardcodes a specific delay. In most cases we hardcode the preference off. In some cases this is the best approach, in others, we would like to improve. The bug for tracking those improvements is Bug 1429648 An improvement that is present in some tests is to hardcode a specific precision reduction that is acceptable based on the confides of the test. (Obviously this needs to be a fix for the test framework and not a requirement on the feature being tested.) In a few places, the test itself can be fixed, for example to no longer require the end time of an operation to be strictly greater than the start time, and allows it to be equal to it. MozReview-Commit-ID: J59c7xQtZZJ --HG-- extra : rebase_source : df8a03e76eaf9cdc9524dbb3eb9035af237e534b
41 lines
894 B
HTML
41 lines
894 B
HTML
<!--
|
|
Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
-->
|
|
|
|
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=822480
|
|
-->
|
|
<head>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
|
|
<pre id="test">
|
|
<script type="application/javascript">
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
// Resource timing is prefed off by default, so we had to use this workaround
|
|
SpecialPowers.pushPrefEnv({"set": [
|
|
["dom.enable_resource_timing", true],
|
|
["privacy.reduceTimerPrecision", false]]}, start);
|
|
var subwindow = null;
|
|
|
|
function start() {
|
|
subwindow = window.open("resource_timing_main_test.html");
|
|
}
|
|
|
|
function finishTests() {
|
|
subwindow.close();
|
|
SimpleTest.finish();
|
|
}
|
|
</script>
|
|
</pre>
|
|
|
|
</body>
|
|
</html>
|