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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/media-src/media-src-7_3_2.html

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests Created 3 years, 10 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>
4 <title>Video track src attribute must match src list - negative test</title>
5 <script src='/resources/testharness.js'></script>
6 <script src='/resources/testharnessreport.js'></script>
7 </head>
8 <body>
9 <h1>Video track src attribute must match src list - negative test</h1>
10 <div id='log'></div>
11
12 <script>
13 var source_test =
14 async_test("Disallowed track element onerror handler fires.");
15
16 var trackURL = location.protocol +
17 "//www." +
18 location.hostname +
19 ":" +
20 location.port +
21 "/media/foo.vtt";
22
23 function media_loaded(t) {
24 t.step( function () {
25 assert_unreached("Disllowed track source loaded.");
26 });
27 t.done();
28 }
29
30 function media_error_handler(t) {
31 t.done();
32 }
33 </script>
34
35 <video id="videoObject" width="320" height="240" controls
36 onerror="media_error_handler(source_test)"
37 crossorigin>
38 <source id="audioSourceObject"
39 type="audio/mpeg"
40 src="/media/white.mp4">
41 <track default
42 id="trackObject"
43 kind="subtitles"
44 srclang="en"
45 label="English"
46 onerror="media_error_handler(source_test)"
47 onload="media_loaded(source_test)"
48 onloadeddata="media_loaded(source_test)">
49 </video>
50 <script>
51 document.getElementById("trackObject").src = trackURL;
52 source_test.step(function() {
53 source_test.set_status(source_test.FAIL);
54 });
55
56 setTimeout(function() {
57 if(source_test.phase != source_test.phases.COMPLETE) {
58 source_test.step( function () { assert_unreached("Onerror event never fired for track element."); });
59 source_test.done();
60 }
61 }, 2 * 1000);
62 </script>
63
64 <script async defer src="../support/checkReport.sub.js?reportField=violated-di rective&reportValue=media-src%20%27self%27">
65 </script>
66
67 </body>
68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698