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

Unified Diff: LayoutTests/media/media-controller-expected.txt

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 | « LayoutTests/media/media-controller.html ('k') | Source/bindings/bindings.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/media-controller-expected.txt
diff --git a/LayoutTests/media/media-controller-expected.txt b/LayoutTests/media/media-controller-expected.txt
index 72dc25e758359783d13715e90ff57be1c320781d..55f241052635696967e38eef2c180ad3f8658abd 100644
--- a/LayoutTests/media/media-controller-expected.txt
+++ b/LayoutTests/media/media-controller-expected.txt
@@ -18,7 +18,7 @@ RUN(video.controller = controller)
EXPECTED (video.controller == '[object MediaController]') OK
Test assigning the wrong type to the controller attribute of a media element:
-TEST(video.controller = 42) THROWS("TypeError: Value is not of type MediaController") OK
+TEST(video.controller = 42) THROWS("TypeError: Failed to set the 'controller' property on 'HTMLMediaElement': The provided value is not of type 'MediaController'.") OK
EXPECTED (video.controller == '[object MediaController]') OK
Test assigning a null controller to a media element:
@@ -29,5 +29,23 @@ Test that two media elements with the same mediaGroup have the same controller:
RUN(video.mediaGroup = 'group')
RUN(video2.mediaGroup = 'group')
EXPECTED (video.controller === video2.controller == 'true') OK
+
+Test that setting the controller clears the mediaGroup:
+EXPECTED (video.mediaGroup == 'group') OK
+RUN(video.controller = null)
+EXPECTED (video.controller == 'null') OK
+EXPECTED (video.hasAttribute('mediaGroup') == 'false') OK
+EXPECTED (video.mediaGroup == '') OK
+RUN(video.mediaGroup = 'group')
+EXPECTED (video.mediaGroup == 'group') OK
+RUN(video.controller = controller)
+EXPECTED (video.controller == '[object MediaController]') OK
+EXPECTED (video.hasAttribute('mediaGroup') == 'false') OK
+EXPECTED (video.mediaGroup == '') OK
+
+Test that setting the controller to undefined is treated as null:
+EXPECTED (video.controller != 'null') OK
+RUN(video.controller = undefined)
+EXPECTED (video.controller == 'null') OK
END OF TEST
« no previous file with comments | « LayoutTests/media/media-controller.html ('k') | Source/bindings/bindings.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698