Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/preload/onerror_event.html

Issue 2903653005: [preload] Mandatory `as` value and related spec alignments (Closed)
Patch Set: IDL changes Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698