Title: [219579] trunk/LayoutTests
Revision
219579
Author
commit-qu...@webkit.org
Date
2017-07-17 15:49:02 -0700 (Mon, 17 Jul 2017)

Log Message

media element handle adding source immediately before src.
https://bugs.webkit.org/show_bug.cgi?id=174284

Patch by Jeremy Jones <jere...@apple.com> on 2017-07-17
Reviewed by David Kilzer.

Adds missing -expected and tests to make sure resulting currentSrc is correct.

* TestExpectations:
* media/video-source-before-src-expected.txt: Added.
* media/video-source-before-src.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (219578 => 219579)


--- trunk/LayoutTests/ChangeLog	2017-07-17 22:42:06 UTC (rev 219578)
+++ trunk/LayoutTests/ChangeLog	2017-07-17 22:49:02 UTC (rev 219579)
@@ -1,3 +1,16 @@
+2017-07-17  Jeremy Jones  <jere...@apple.com>
+
+        media element handle adding source immediately before src.
+        https://bugs.webkit.org/show_bug.cgi?id=174284
+
+        Reviewed by David Kilzer.
+
+        Adds missing -expected and tests to make sure resulting currentSrc is correct.
+
+        * TestExpectations:
+        * media/video-source-before-src-expected.txt: Added.
+        * media/video-source-before-src.html:
+
 2017-07-17  Matt Lewis  <jlew...@apple.com>
 
         Fixed test expectations after r219518.

Modified: trunk/LayoutTests/TestExpectations (219578 => 219579)


--- trunk/LayoutTests/TestExpectations	2017-07-17 22:42:06 UTC (rev 219578)
+++ trunk/LayoutTests/TestExpectations	2017-07-17 22:49:02 UTC (rev 219579)
@@ -1399,5 +1399,3 @@
 webkit.org/b/172514 [ Debug ] imported/w3c/web-platform-tests/innerText/getter.html [ Skip ]
 
 webkit.org/b/173333 imported/w3c/web-platform-tests/dom/nodes/Document-constructor-svg.svg [ Skip ]
-
-webkit.org/b/174284 media/video-source-before-src.html [ Skip ]

Added: trunk/LayoutTests/media/video-source-before-src-expected.txt (0 => 219579)


--- trunk/LayoutTests/media/video-source-before-src-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/video-source-before-src-expected.txt	2017-07-17 22:49:02 UTC (rev 219579)
@@ -0,0 +1,5 @@
+Append source element before setting src attribute.
+Platforms that support setVideoPlaybackRequiresUserGesture will have the expected, empty, currentSrc. Platforms that don't should have the unexpected "src.mp4".
+
+EXPECTED (relativeURL(video.currentSrc) == ''), OBSERVED 'src.mp4' FAIL
+

Modified: trunk/LayoutTests/media/video-source-before-src.html (219578 => 219579)


--- trunk/LayoutTests/media/video-source-before-src.html	2017-07-17 22:42:06 UTC (rev 219578)
+++ trunk/LayoutTests/media/video-source-before-src.html	2017-07-17 22:49:02 UTC (rev 219579)
@@ -1,5 +1,6 @@
 <html>
 <head>
+<script src=""
 <script>
 
 if (window.testRunner) {
@@ -8,15 +9,20 @@
     testRunner.dumpAsText();
 }
 
+var video
+
 window._onload_ = () => {
-    var video = document.getElementsByTagName("video")[0]
-    video.appendChild(document.createElement("source"))
-    video.src = ""
+    video = document.getElementsByTagName("video")[0];
+    var source = document.createElement("source");
+    source.src = ""
+    video.appendChild(source);
+    video.src = ""
 
     setTimeout(()=>{
+        testExpected("relativeURL(video.currentSrc)", "");
         if (window.testRunner)
             testRunner.notifyDone();
-    }, 1)
+    }, 1);
 }
 
 </script>
@@ -23,6 +29,9 @@
 </head>
 <body>
 Append source element before setting src attribute.<br>
+Platforms that support setVideoPlaybackRequiresUserGesture
+will have the expected, empty, currentSrc. Platforms that don't should
+have the unexpected "src.mp4".<br>
 <video width=320 height=240></video>
 </body>
 </html>
\ No newline at end of file

Added: trunk/LayoutTests/platform/ios/media/video-source-before-src-expected.txt (0 => 219579)


--- trunk/LayoutTests/platform/ios/media/video-source-before-src-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios/media/video-source-before-src-expected.txt	2017-07-17 22:49:02 UTC (rev 219579)
@@ -0,0 +1,5 @@
+Append source element before setting src attribute.
+Platforms that support setVideoPlaybackRequiresUserGesture will have the expected, empty, currentSrc. Platforms that don't should have the unexpected "src.mp4".
+
+EXPECTED (relativeURL(video.currentSrc) == '') OK
+
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to