OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
| 3 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 4 (Please avoid writing new tests using video-test.js) --> |
3 <script src=video-test.js></script> | 5 <script src=video-test.js></script> |
4 <script> | 6 <script> |
5 function setPreload(value, expected) | 7 function setPreload(value, expected) |
6 { | 8 { |
7 consoleWrite("- set via DOM"); | 9 consoleWrite("- set via DOM"); |
8 run("video.removeAttribute('preload')"); | 10 run("video.removeAttribute('preload')"); |
9 run("video.preload = '" + value + "'"); | 11 run("video.preload = '" + value + "'"); |
10 testExpected("video.getAttribute('preload')", expected); | 12 testExpected("video.getAttribute('preload')", expected); |
11 testExpected("video.preload", expected); | 13 testExpected("video.preload", expected); |
12 consoleWrite("- and via attribute"); | 14 consoleWrite("- and via attribute"); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 testExpected("video.getAttribute('preload')", "bogus"); | 48 testExpected("video.getAttribute('preload')", "bogus"); |
47 testExpected("video.preload", "auto"); | 49 testExpected("video.preload", "auto"); |
48 consoleWrite("- and via attribute"); | 50 consoleWrite("- and via attribute"); |
49 run("video.setAttribute('preload', 'bogus')"); | 51 run("video.setAttribute('preload', 'bogus')"); |
50 testExpected("video.preload", "auto"); | 52 testExpected("video.preload", "auto"); |
51 testExpected("video.getAttribute('preload')", "bogus"); | 53 testExpected("video.getAttribute('preload')", "bogus"); |
52 consoleWrite(""); | 54 consoleWrite(""); |
53 | 55 |
54 consoleWrite("++ Set to 'metadata'"); | 56 consoleWrite("++ Set to 'metadata'"); |
55 setPreload("metadata", "metadata"); | 57 setPreload("metadata", "metadata"); |
56 | 58 |
57 endTest(); | 59 endTest(); |
58 } | 60 } |
59 </script> | 61 </script> |
60 | 62 |
61 </head> | 63 </head> |
62 | 64 |
63 <body onload="test()"> | 65 <body onload="test()"> |
64 <video controls></video> | 66 <video controls></video> |
65 </body> | 67 </body> |
66 </html> | 68 </html> |
67 | |
OLD | NEW |