blob: 51e96005eb9dcaccae61689d7ddbe8c0341b4040 (
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
|
<!DOCTYPE html>
<html>
<head>
<script>
function log(message)
{
document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
}
function test()
{
log("Test calling revokeObjectURL with no argument.");
try {
var url = URL.revokeObjectURL();
log("FAIL");
} catch(err) {
log("PASS: " + err.message);
}
log("Test calling revokeObjectURL with empty URL.");
URL.revokeObjectURL("");
log("PASS");
log("Test calling revokeObjectURL with invalid URL.");
URL.revokeObjectURL("[foo bar]");
log("PASS");
log("Test calling revokeObjectURL with non-existent URL.");
URL.revokeObjectURL("blob:non-existent");
log("PASS");
log("DONE");
}
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body onload="test()">
<pre id='console'></pre>
</body>
</html>
|