54 lines
1.3 KiB
HTML
54 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<style>
|
|
.box {
|
|
height: 100px;
|
|
width: 100px;
|
|
background-color: blue;
|
|
}
|
|
|
|
img {
|
|
height: 90%;
|
|
width: 90%;
|
|
}
|
|
</style>
|
|
<script>
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
}
|
|
|
|
function sleep(ms) {
|
|
var endTime = (new Date().getTime()) + ms;
|
|
while ((new Date().getTime()) < endTime) {
|
|
}
|
|
}
|
|
|
|
const maxIterations = 20;
|
|
var iteration = 0;
|
|
function startTest()
|
|
{
|
|
var interval = window.setInterval(function() {
|
|
// Sleep to get the GIF into catchup mode.
|
|
sleep(50);
|
|
if (++iteration == maxIterations) {
|
|
window.clearInterval(interval);
|
|
if (window.testRunner)
|
|
testRunner.notifyDone();
|
|
}
|
|
}, 20);
|
|
}
|
|
|
|
window.addEventListener('load', startTest);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p>This test should not assert in debug builds.</p>
|
|
<div class="box">
|
|
<img src="resources/spinner.gif" width="100" height="100">
|
|
</div>
|
|
</body>
|
|
</html>
|