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

Unified Diff: LayoutTests/media/video-defaultmuted.html

Issue 205683003: Update <video muted=""> handling to match spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update defaultMuted test Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/media/muted-expected.txt ('k') | LayoutTests/media/video-defaultmuted-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-defaultmuted.html
diff --git a/LayoutTests/media/video-defaultmuted.html b/LayoutTests/media/video-defaultmuted.html
index 931c0a2fff5ad92cae351216e4ae85c4039629b4..9644743403cc5e8c3b8f6055e535846cf2acc139 100644
--- a/LayoutTests/media/video-defaultmuted.html
+++ b/LayoutTests/media/video-defaultmuted.html
@@ -2,7 +2,6 @@
<html>
<head>
<script src=video-test.js></script>
- <script src=media-file.js></script>
<script>
var index = 0;
@@ -26,36 +25,26 @@
consoleWrite("<br>*** Test before setting src, IDL attribute should default to false");
testMuted(false, defaultMuted);
- var loadedmetadata = function(evt)
- {
- consoleWrite("<br>EVENT(" + evt.type + ")");
-
- consoleWrite("<br>*** After setting url, content attribute should have set IDL attribute");
- testMuted(defaultMuted, defaultMuted);
+ consoleWrite("<br>*** Change 'defaultMuted', IDL attribute should not change but content attribute should.");
+ var newDefaultMuted = !defaultMuted;
+ run("video.defaultMuted = " + newDefaultMuted);
+ testMuted(false, newDefaultMuted);
+ testExpected("video.hasAttribute('muted')", newDefaultMuted);
- consoleWrite("<br>*** Change 'defaultMuted', IDL attribute should not change but content attribute should.");
- var newDefaultMuted = !defaultMuted;
- run("video.defaultMuted = " + newDefaultMuted);
- testMuted(defaultMuted, newDefaultMuted);
- testExpected("video.hasAttribute('muted')", newDefaultMuted);
-
- consoleWrite("<br>*** Change 'muted' IDL attribute, content attribute should not change");
- run("video.muted = false");
- testMuted(false, newDefaultMuted);
- testExpected("video.hasAttribute('muted')", newDefaultMuted);
+ consoleWrite("<br>*** Change 'muted' IDL attribute, content attribute should not change");
+ run("video.muted = false");
+ testMuted(false, newDefaultMuted);
+ testExpected("video.hasAttribute('muted')", newDefaultMuted);
- var action = defaultMuted ? "Remove" : "Add";
- consoleWrite("<br>*** " + action + " 'muted' content attribute, it should have no effect on IDL attribute");
- if (defaultMuted)
- run("video.removeAttribute('muted')");
- else
- run("video.setAttribute('muted', 'muted')");
- testMuted(false, video.hasAttribute('muted'));
+ var action = defaultMuted ? "Remove" : "Add";
+ consoleWrite("<br>*** " + action + " 'muted' content attribute, it should have no effect on IDL attribute");
+ if (defaultMuted)
+ run("video.removeAttribute('muted')");
+ else
+ run("video.setAttribute('muted', 'muted')");
+ testMuted(false, video.hasAttribute('muted'));
- runNextTest();
- }
- video.addEventListener('loadedmetadata', loadedmetadata);
- video.src = findMediaFile("audio", "content/test");
+ runNextTest();
}
function runNextTest()
« no previous file with comments | « LayoutTests/media/muted-expected.txt ('k') | LayoutTests/media/video-defaultmuted-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698