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 |