blob: b9234f22db52e7d210e28808f6bcc14fa2a2d421 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<!DOCTYPE html>
<html>
<head>
<script src="../js/resources/js-test-pre.js"></script>
<script>
window.jsTestIsAsync = true;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpResourceRequestCallbacks();
} else {
document.write("This test cannot run without a testRunner");
}
function requestMoreResources() {
document.getElementById("img-changing").src = "../images/resources/mu.png";
var createdImage = document.createElement("img");
createdImage.id = "img-created";
createdImage.src = "../images/resources/oval.png";
document.getElementById("images").appendChild(createdImage);
document.getElementById("with-background").style.backgroundImage = "url(../images/resources/palatted-color-png-gamma-one-color-profile.png)";
document.getElementById("more-images").innerHTML = "<img id='img-created-2' src='../images/resources/png_per_row_alpha.png'>";
var createdScript = document.createElement("script");
createdScript.id = "script-created";
createdScript.src = "../loader/resources/empty-script.js";
document.head.appendChild(createdScript);
setTimeout(finishTest, 0);
}
function finishTest() {
testPassed("");
finishJSTest();
}
</script>
<style>
#with-background
{
background-image:url("../images/resources/lenna.png");
}
body
{
cursor:url("../events/resources/greenbox-hotspot35-4.cur"), pointer;
}
@font-face
{
font-family: custom_font;
src: url("../text/resources/gw432047.ttf");
}
p
{
font-family: custom_font;
}
</style>
</head>
<body onload="setTimeout(requestMoreResources, 100);">
<div id="with-background">
<p>
This test checks that the correct callbacks for resource requests are
invoked. It passes if you see the callbacks for 12 resources.
</p>
</div>
<div id="images">
<img id="img-normal" src="../images/resources/dice.png" />
<img id="img-changing" src="../images/resources/dice.png" />
<img id="img-fail" />
<img id="img-not-there" src="not-existing.png" />
</div>
<div id="more-images">
</div>
<div id="console"></div>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
|