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

Unified Diff: LayoutTests/media/media-controller.html

Issue 59233014: Setting HTMLMediaElement.controller does not properly remove the 'mediagroup' content attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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 | « no previous file | LayoutTests/media/media-controller-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/media-controller.html
diff --git a/LayoutTests/media/media-controller.html b/LayoutTests/media/media-controller.html
index 119506399a4f0860c09b354f6f877172e11c6997..5875bd4659424362350f3f795c691988db873cd5 100644
--- a/LayoutTests/media/media-controller.html
+++ b/LayoutTests/media/media-controller.html
@@ -31,7 +31,7 @@
testExpected("video.controller", controller);
consoleWrite("");
consoleWrite("Test assigning the wrong type to the controller attribute of a media element:")
- testException("video.controller = 42", '"TypeError: Value is not of type MediaController"');
+ testException("video.controller = 42", '"TypeError: Failed to set the \'controller\' property on \'HTMLMediaElement\': The provided value is not of type \'MediaController\'."');
testExpected("video.controller", controller);
consoleWrite("");
consoleWrite("Test assigning a null controller to a media element:")
@@ -42,6 +42,24 @@
run("video.mediaGroup = 'group'");
run("video2.mediaGroup = 'group'");
testExpected("video.controller === video2.controller", true);
+ consoleWrite("");
+ consoleWrite("Test that setting the controller clears the mediaGroup:")
+ testExpected("video.mediaGroup", "group");
+ run("video.controller = null");
+ testExpected("video.controller", null);
+ testExpected("video.hasAttribute('mediaGroup')", false);
+ testExpected("video.mediaGroup", "");
+ run("video.mediaGroup = 'group'");
+ testExpected("video.mediaGroup", "group");
+ run("video.controller = controller");
+ testExpected("video.controller", controller);
+ testExpected("video.hasAttribute('mediaGroup')", false);
+ testExpected("video.mediaGroup", "");
+ consoleWrite("");
+ consoleWrite("Test that setting the controller to undefined is treated as null:")
+ testExpected("video.controller", null, "!=");
+ run("video.controller = undefined");
+ testExpected("video.controller", null);
endTest();
}
</script>
« no previous file with comments | « no previous file | LayoutTests/media/media-controller-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698