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

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

Issue 2704543002: Import wpt@3bd204d7e86fd81e98e63f4ce59b95d98bad1c54 (Closed)
Patch Set: 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 element src attribute must match src list - negative test</titl e>
5 <meta name=timeout content=long>
6 <script src='/resources/testharness.js'></script>
7 <script src='/resources/testharnessreport.js'></script>
8 </head>
9 <body>
10 <h1>Video element src attribute must match src list - negative test</h1>
11 <div id='log'></div>
12
13 <script>
14 var src_test = async_test("Disallowed async video src");
15 var source_test = async_test("Disallowed async video source element");
16
17 // we assume tests are run from 'hostname' and 'www.hostname' or 'www2.hos tname' is a valid alias
18 var mediaURL = location.protocol +
19 "//www2." +
20 location.hostname +
21 ":" +
22 location.port +
23 "/media/white.mp4";
24
25 function media_loaded(t) {
26 t.step( function () {
27 assert_unreached("Media error handler should be triggered for non-allo wed domain.");
28 });
29 t.done();
30 }
31
32 function media_error_handler(t) {
33 t.done();
34 }
35 </script>
36
37 <video id="videoObject" width="320" height="240" controls
38 onloadeddata="media_loaded(source_test)">
39 <source id="videoSourceObject"
40 type="video/mp4"
41 onerror="media_error_handler(source_test)">
42 </video>
43 <video id="videoObject2" width="320" height="240" controls
44 onerror="media_error_handler(src_test)"
45 onloadeddata="media_loaded(src_test)">
46
47 <script>
48 document.getElementById("videoSourceObject").src = mediaURL;
49 document.getElementById("videoObject2").src = mediaURL;
50 </script>
51
52 <script async defer src='../support/checkReport.sub.js?reportField=violated- directive&reportValue=media-src%20%27self%27'></script>
53
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698