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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-defaultmuted.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 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
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
5 (Please avoid writing new tests using video-test.js) -->
4 <script src=video-test.js></script> 6 <script src=video-test.js></script>
5 <script src=media-file.js></script> 7 <script src=media-file.js></script>
6 <script> 8 <script>
7 var index = 0; 9 var index = 0;
8 10
9 function testMuted(expectedMuted, expectedDefaultMuted) 11 function testMuted(expectedMuted, expectedDefaultMuted)
10 { 12 {
11 testExpected("video.muted", expectedMuted); 13 testExpected("video.muted", expectedMuted);
12 testExpected("video.defaultMuted", expectedDefaultMuted); 14 testExpected("video.defaultMuted", expectedDefaultMuted);
13 } 15 }
(...skipping 17 matching lines...) Expand all
31 consoleWrite("<br>EVENT(" + evt.type + ")"); 33 consoleWrite("<br>EVENT(" + evt.type + ")");
32 34
33 consoleWrite("<br>*** After setting url, content attribute s hould have set IDL attribute"); 35 consoleWrite("<br>*** After setting url, content attribute s hould have set IDL attribute");
34 testMuted(defaultMuted, defaultMuted); 36 testMuted(defaultMuted, defaultMuted);
35 37
36 consoleWrite("<br>*** Change 'defaultMuted', IDL attribute s hould not change but content attribute should."); 38 consoleWrite("<br>*** Change 'defaultMuted', IDL attribute s hould not change but content attribute should.");
37 var newDefaultMuted = !defaultMuted; 39 var newDefaultMuted = !defaultMuted;
38 run("video.defaultMuted = " + newDefaultMuted); 40 run("video.defaultMuted = " + newDefaultMuted);
39 testMuted(defaultMuted, newDefaultMuted); 41 testMuted(defaultMuted, newDefaultMuted);
40 testExpected("video.hasAttribute('muted')", newDefaultMuted) ; 42 testExpected("video.hasAttribute('muted')", newDefaultMuted) ;
41 43
42 consoleWrite("<br>*** Change 'muted' IDL attribute, content attribute should not change"); 44 consoleWrite("<br>*** Change 'muted' IDL attribute, content attribute should not change");
43 run("video.muted = false"); 45 run("video.muted = false");
44 testMuted(false, newDefaultMuted); 46 testMuted(false, newDefaultMuted);
45 testExpected("video.hasAttribute('muted')", newDefaultMuted) ; 47 testExpected("video.hasAttribute('muted')", newDefaultMuted) ;
46 48
47 var action = defaultMuted ? "Remove" : "Add"; 49 var action = defaultMuted ? "Remove" : "Add";
48 consoleWrite("<br>*** " + action + " 'muted' content attribu te, it should have no effect on IDL attribute"); 50 consoleWrite("<br>*** " + action + " 'muted' content attribu te, it should have no effect on IDL attribute");
49 if (defaultMuted) 51 if (defaultMuted)
50 run("video.removeAttribute('muted')"); 52 run("video.removeAttribute('muted')");
51 else 53 else
(...skipping 29 matching lines...) Expand all
81 } 83 }
82 84
83 </script> 85 </script>
84 </head> 86 </head>
85 87
86 <body onload="runNextTest()"> 88 <body onload="runNextTest()">
87 <div id="parent"></div> 89 <div id="parent"></div>
88 <p>Test 'muted' content attribute<p> 90 <p>Test 'muted' content attribute<p>
89 </body> 91 </body>
90 </html> 92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698