Title: [186070] trunk/LayoutTests
Revision
186070
Author
[email protected]
Date
2015-06-29 09:50:16 -0700 (Mon, 29 Jun 2015)

Log Message

Test existence of controls on MediaSession
https://bugs.webkit.org/show_bug.cgi?id=146356

Reviewed by Eric Carlson.

* media/session/controls-existence-expected.txt: Added.
* media/session/controls-existence.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (186069 => 186070)


--- trunk/LayoutTests/ChangeLog	2015-06-29 15:22:18 UTC (rev 186069)
+++ trunk/LayoutTests/ChangeLog	2015-06-29 16:50:16 UTC (rev 186070)
@@ -1,3 +1,14 @@
+2015-06-26  Matt Rajca  <[email protected]>
+
+        Test existence of controls on MediaSession
+        https://bugs.webkit.org/show_bug.cgi?id=146356
+
+        Reviewed by Eric Carlson.
+
+        * media/session/controls-existence-expected.txt: Added.
+        * media/session/controls-existence.html: Added.
+        * platform/mac/TestExpectations: Media Session support is disabled by default.
+
 2015-06-29  Hunseop Jeong  <[email protected]>
 
         Unreviewed EFL gardening on 29th Jun.

Added: trunk/LayoutTests/media/session/controls-existence-expected.txt (0 => 186070)


--- trunk/LayoutTests/media/session/controls-existence-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/session/controls-existence-expected.txt	2015-06-29 16:50:16 UTC (rev 186070)
@@ -0,0 +1,12 @@
+Only Content Media Sessions should have media remote controls after creation.
+
+RUN(session = new MediaSession('content'))
+EXPECTED (session.controls != 'null') OK
+RUN(session = new MediaSession('transient'))
+EXPECTED (session.controls == 'null') OK
+RUN(session = new MediaSession('transient-solo'))
+EXPECTED (session.controls == 'null') OK
+RUN(session = new MediaSession('ambient'))
+EXPECTED (session.controls == 'null') OK
+END OF TEST
+

Added: trunk/LayoutTests/media/session/controls-existence.html (0 => 186070)


--- trunk/LayoutTests/media/session/controls-existence.html	                        (rev 0)
+++ trunk/LayoutTests/media/session/controls-existence.html	2015-06-29 16:50:16 UTC (rev 186070)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <script src=""
+    <script type="text/_javascript_">
+        var session;
+    
+        function doTest () 
+        {
+            session = new MediaSession("content");
+            run("session = new MediaSession('content')");
+            testExpected("session.controls", null, '!=');
+
+            session = new MediaSession("transient");
+            run("session = new MediaSession('transient')");
+            testExpected("session.controls", null);
+
+            session = new MediaSession("transient-solo");
+            run("session = new MediaSession('transient-solo')");
+            testExpected("session.controls", null);
+
+            session = new MediaSession("ambient");
+            run("session = new MediaSession('ambient')");
+            testExpected("session.controls", null);
+
+            endTest();
+        }
+    </script>
+</head>
+<body _onload_="doTest()">
+    <p>Only Content Media Sessions should have media remote controls after creation.</p>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/mac/TestExpectations (186069 => 186070)


--- trunk/LayoutTests/platform/mac/TestExpectations	2015-06-29 15:22:18 UTC (rev 186069)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2015-06-29 16:50:16 UTC (rev 186070)
@@ -995,6 +995,9 @@
 
 webkit.org/b/140639 http/tests/media/video-play-waiting.html [ Pass Timeout ]
 
+# ENABLE(MEDIA_SESSION) is disabled
+media/session/controls-existence.html
+
 # This test requires generation of progress events during loading
 webkit.org/b/100984 media/progress-events-generated-correctly.html [ Failure ]
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to