Title: [187552] trunk/LayoutTests
- Revision
- 187552
- Author
- mra...@apple.com
- Date
- 2015-07-29 12:54:49 -0700 (Wed, 29 Jul 2015)
Log Message
Media Session: test 'Transient Solo' interruptions https://bugs.webkit.org/show_bug.cgi?id=147091
Reviewed by Eric Carlson.
* media/session/transient-solo-interruptions-expected.txt: Added.
* media/session/transient-solo-interruptions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (187551 => 187552)
--- trunk/LayoutTests/ChangeLog 2015-07-29 19:20:35 UTC (rev 187551)
+++ trunk/LayoutTests/ChangeLog 2015-07-29 19:54:49 UTC (rev 187552)
@@ -1,3 +1,14 @@
+2015-07-19 Matt Rajca <mra...@apple.com>
+
+ Media Session: test 'Transient Solo' interruptions
+ https://bugs.webkit.org/show_bug.cgi?id=147091
+
+ Reviewed by Eric Carlson.
+
+ * media/session/transient-solo-interruptions-expected.txt: Added.
+ * media/session/transient-solo-interruptions.html: Added.
+ * platform/mac/TestExpectations: Media Session support is disabled by default.
+
2015-07-29 Basile Clement <basile_clem...@apple.com>
Unreviewed, remove a .orig file.
Added: trunk/LayoutTests/media/session/transient-solo-interruptions-expected.txt (0 => 187552)
--- trunk/LayoutTests/media/session/transient-solo-interruptions-expected.txt (rev 0)
+++ trunk/LayoutTests/media/session/transient-solo-interruptions-expected.txt 2015-07-29 19:54:49 UTC (rev 187552)
@@ -0,0 +1,18 @@
+'Transient Solo' interruption events should pause elements belonging to 'Content' media sessions.
+
+
+Waiting for Content media to begin playing.
+EVENT(canplaythrough)
+Media began playing.
+EXPECTED (internals.mediaSessionCurrentState(session) == 'active') OK
+EXPECTED (video.paused == 'false') OK
+Sending 'Transient Solo' start-of-interruption notification.
+RUN(internals.sendMediaSessionStartOfInterruptionNotification("transient-solo"))
+EXPECTED (internals.mediaSessionCurrentState(session) == 'interrupted') OK
+EXPECTED (video.paused == 'true') OK
+Sending 'Transient Solo' end-of-interruption notification.
+RUN(internals.sendMediaSessionEndOfInterruptionNotification("transient-solo"))
+EXPECTED (internals.mediaSessionCurrentState(session) == 'active') OK
+EXPECTED (video.paused == 'false') OK
+END OF TEST
+
Added: trunk/LayoutTests/media/session/transient-solo-interruptions.html (0 => 187552)
--- trunk/LayoutTests/media/session/transient-solo-interruptions.html (rev 0)
+++ trunk/LayoutTests/media/session/transient-solo-interruptions.html 2015-07-29 19:54:49 UTC (rev 187552)
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script src=""
+ <script type="text/_javascript_">
+ var session;
+
+ function runTest()
+ {
+ session = new MediaSession("content");
+
+ consoleWrite("Waiting for Content media to begin playing.")
+
+ findMediaElement();
+ waitForEvent('canplaythrough', beginPlaying);
+ video.src = "" "../content/counting");
+ video.session = session;
+ video._onplaying_ = beganPlaying;
+ }
+
+ function beginPlaying(event)
+ {
+ video.play();
+ }
+
+ function beganPlaying(event)
+ {
+ video._onplaying_ = null;
+
+ consoleWrite("Media began playing.");
+
+ if (window.internals) {
+ testExpected('internals.mediaSessionCurrentState(session)', "active");
+ testExpected('video.paused', false);
+
+ consoleWrite("Sending 'Transient Solo' start-of-interruption notification.");
+ run('internals.sendMediaSessionStartOfInterruptionNotification("transient-solo")');
+
+ testExpected('internals.mediaSessionCurrentState(session)', "interrupted");
+ testExpected('video.paused', true);
+
+ consoleWrite("Sending 'Transient Solo' end-of-interruption notification.");
+ run('internals.sendMediaSessionEndOfInterruptionNotification("transient-solo")');
+
+ testExpected('internals.mediaSessionCurrentState(session)', "active");
+ testExpected('video.paused', false);
+ }
+
+ endTest();
+ }
+ </script>
+</head>
+<body _onload_="runTest()">
+ <p>'Transient Solo' interruption events should pause elements belonging to 'Content' media sessions.</p>
+ <video id="video" />
+</body>
+</html>
Modified: trunk/LayoutTests/platform/mac/TestExpectations (187551 => 187552)
--- trunk/LayoutTests/platform/mac/TestExpectations 2015-07-29 19:20:35 UTC (rev 187551)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2015-07-29 19:54:49 UTC (rev 187552)
@@ -998,6 +998,7 @@
media/session/controls-existence.html
media/session/default-session.html
media/session/transient-interruptions.html
+media/session/transient-solo-interruptions.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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes