2015-06-02 17:51:00 +03:00
|
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
|
|
|
<!doctype html>
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8"/>
|
|
|
|
<title>Performance tool + garbage collection test page</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript">
|
2017-02-24 04:32:00 +03:00
|
|
|
"use strict";
|
|
|
|
|
2015-08-24 03:41:33 +03:00
|
|
|
var x = 1;
|
2018-04-04 18:56:30 +03:00
|
|
|
/* global test */
|
2018-03-12 21:24:38 +03:00
|
|
|
window.test = function() {
|
2015-06-02 17:51:00 +03:00
|
|
|
SpecialPowers.Cu.forceGC();
|
2015-08-24 03:41:33 +03:00
|
|
|
document.body.style.borderTop = x + "px solid red";
|
2017-02-24 04:32:00 +03:00
|
|
|
x = 1 ^ x;
|
|
|
|
// flush pending reflows
|
|
|
|
document.body.innerHeight;
|
2015-08-24 03:41:33 +03:00
|
|
|
|
|
|
|
// Prevent this script from being garbage collected.
|
2015-06-02 17:51:00 +03:00
|
|
|
setTimeout(window.test, 100);
|
|
|
|
};
|
|
|
|
test();
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|