Merge pull request #514 from notmasteryet/test-cleanup
Removing introduced by the test run DOM elements
This commit is contained in:
commit
36922d275a
@ -50,7 +50,21 @@ function load() {
|
|||||||
r.send(null);
|
r.send(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cleanup() {
|
||||||
|
var styleSheet = document.styleSheets[0];
|
||||||
|
if (styleSheet) {
|
||||||
|
while (styleSheet.cssRules.length > 0)
|
||||||
|
styleSheet.deleteRule(0);
|
||||||
|
}
|
||||||
|
var guard = document.getElementById('content-end');
|
||||||
|
var body = document.body;
|
||||||
|
while (body.lastChild !== guard)
|
||||||
|
body.removeChild(body.lastChild);
|
||||||
|
}
|
||||||
|
|
||||||
function nextTask() {
|
function nextTask() {
|
||||||
|
cleanup();
|
||||||
|
|
||||||
if (currentTaskIdx == manifest.length) {
|
if (currentTaskIdx == manifest.length) {
|
||||||
return done();
|
return done();
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
<body onload="load();">
|
<body onload="load();">
|
||||||
<pre style="width:800; height:800; overflow: scroll;"id="stdout"></pre>
|
<pre style="width:800; height:800; overflow: scroll;"id="stdout"></pre>
|
||||||
<p>Inflight requests: <span id="inFlightCount"></span></p>
|
<p>Inflight requests: <span id="inFlightCount"></span></p>
|
||||||
|
<div id="content-end"><!-- cleanup() guard --></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user