OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head></head> | |
4 <body> | |
5 <script src="../resources/testharness.js"></script> | |
6 <script src="../resources/testharnessreport.js"></script> | |
7 <script> | |
8 var t = async_test('Makes sure that preloaded resources trigger the onerror
event'); | |
9 var scriptFailed = false; | |
10 var styleFailed = false; | |
11 var imageFailed = false; | |
12 var fontFailed = false; | |
13 var videoFailed = false; | |
14 var audioFailed = false; | |
15 var trackFailed = false; | |
16 var gibrishFailed = false; | |
17 var noTypeFailed = false; | |
18 </script> | |
19 <link rel=preload href="../non-existent/dummy.js" as=script onerror="scriptFaile
d = true;"> | |
20 <link rel=preload href="../non-existent/dummy.css" as=style onerror="styleFailed
= true;"> | |
21 <link rel=preload href="../non-existent/square.png" as=image onerror="imageFaile
d = true;"> | |
22 <link rel=preload href="../non-existent/Ahem.ttf" as=font crossorigin onerror="f
ontFailed = true;"> | |
23 <link rel=preload href="../non-existent/test.mp4" as=video onerror="videoFailed
= true;"> | |
24 <link rel=preload href="../non-existent/test.oga" as=audio onerror="audioFailed
= true;"> | |
25 <link rel=preload href="../non-existent/security/captions.vtt" as=track onerror=
"trackFailed = true;"> | |
26 <link rel=preload href="../non-existent/dummy.xml" as=foobarxmlthing onerror="gi
brishFailed = true;"> | |
27 <link rel=preload href="../non-existent/dummy.xml" onerror="noTypeFailed = true;
"> | |
28 <script src="../resources/slow-script.pl?delay=500"></script> | |
29 <script> | |
30 window.onload = t.step(function(){ | |
31 assert_true(styleFailed, "style triggered error event"); | |
32 assert_true(scriptFailed, "script triggered error event"); | |
33 assert_true(imageFailed, "image triggered error event"); | |
34 assert_true(fontFailed, "font triggered error event"); | |
35 assert_true(videoFailed, "video triggered error event"); | |
36 assert_true(audioFailed, "audio triggered error event"); | |
37 assert_true(trackFailed, "track triggered error event"); | |
38 assert_true(gibrishFailed, "gibrish as value triggered error event"); | |
39 assert_true(noTypeFailed, "empty as triggered error event"); | |
40 t.done(); | |
41 }); | |
42 </script> | |
43 </body> | |
44 </html> | |
OLD | NEW |