Changeset 203526 in webkit
- Timestamp:
- Jul 21, 2016, 2:19:22 PM (10 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt (modified) (2 diffs)
-
platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203525 r203526 1 2016-07-21 Daniel Bates <dabates@apple.com> 2 3 Test platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=160002 5 6 Reviewed by Alexey Proskuryakov. 7 8 The file platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html tests loading 9 plugin content from the main frame and from a subframe. Depending on timing the plugin 10 content loaded in the subframe may complete before plugin content loaded in the main frame. 11 We should test loading plugin content in a subframe after perform all main frame sub-tests 12 so as to ensure a well-defined sub-test order. 13 14 Add logic to ensure that an embedded YouTube flash video loaded in a subframe actually creates 15 a shadow DOM. Additionally, simplify the test logic by making use window.jsTestIsAsync/finishJSTest() 16 to mark the test as asynchronous and notify test completion instead of calling 17 window.testRunner.{waitUntilDone, notifyDone}(), remove the call to 18 testRunner.dumpAsText() (js-test-pre.js calls this for us), remove all of the DOM elements 19 used in the test to avoid noise in the expected results, and fix some style nits. 20 21 * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt: 22 * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html: 23 1 24 2016-07-21 Chris Dumez <cdumez@apple.com> 2 25 -
trunk/LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt
r203522 r203526 9 9 10 10 11 PASS successfullyParsed is true12 13 TEST COMPLETE14 11 PASS normalEmbed.tagName is "EMBED" 15 12 PASS elinkEmbed.tagName is "EMBED" … … 23 20 PASS internals.shadowPseudoId(objectNoEmbedShadowRoot.firstChild) is "-webkit-plugin-replacement" 24 21 PASS objectNoEmbedShadowRoot.firstChild.firstChild.tagName is "IFRAME" 25 Normal Embed: 22 PASS internals.shadowPseudoId(normalEmbedInIframeShadowRoot.firstChild) is "-webkit-plugin-replacement" 23 PASS normalEmbedInIframeShadowRoot.firstChild.firstChild.tagName is "IFRAME" 24 PASS successfullyParsed is true 26 25 27 E-link Embed: 26 TEST COMPLETE 28 27 29 Object with embed:30 31 Object without embed:32 33 Embed inside iframe:34 -
trunk/LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html
r203522 r203526 4 4 <script src="../../../../resources/js-test-pre.js"></script> 5 5 <script> 6 if (window.testRunner) { 7 testRunner.waitUntilDone(); 8 testRunner.dumpAsText(); 9 } 6 window.jsTestIsAsync = true; 10 7 11 8 description( 12 9 'Test transforming youtube flash plugin to youtube iFrame based player. <<a href="rdar://problem/11201356"> rdar://problem/11201356</a>>' 13 10 ); 11 12 function checkEmbeddedYouTubeVideoInsideIframe() 13 { 14 normalEmbedInIframe = document.getElementById('test-iframe').contentDocument.getElementById('normal-embed'); 15 normalEmbedInIframeShadowRoot = internals.shadowRoot(normalEmbedInIframe); 16 shouldBe('internals.shadowPseudoId(normalEmbedInIframeShadowRoot.firstChild)', '"-webkit-plugin-replacement"'); 17 shouldBe('normalEmbedInIframeShadowRoot.firstChild.firstChild.tagName', '"IFRAME"'); 18 19 document.body.removeChild(document.getElementById("test-container")); 20 finishJSTest(); 21 } 22 23 function testEmbedYouTubeVideoInsideIframe() 24 { 25 var markup = [ 26 '<body>', 27 '<p>Normal Embed:<br><embed id="normal-embed" src="http://www.youtube.com/v/N0gb9v4LI4o" type="application/x-shockwave-flash" width="425" height="350"></p>', 28 '<script>', 29 'window.setTimeout(window.parent.checkEmbeddedYouTubeVideoInsideIframe, 0);', 30 '</' + 'script>', 31 '</body>', 32 ]; 33 var iframe = document.getElementById('test-iframe'); 34 iframe.srcdoc = markup.join(""); 35 } 14 36 15 37 function Test() … … 43 65 shouldBe('objectNoEmbedShadowRoot.firstChild.firstChild.tagName', '"IFRAME"'); 44 66 45 var successfullyParsed = true; 46 testRunner.notifyDone(); 47 }, 100); 67 testEmbedYouTubeVideoInsideIframe(); 68 }, 0); 48 69 } 49 70 </script> … … 53 74 <div id="console"></div> 54 75 55 <p>Normal Embed:<br><embed id='normal-embed' src="http://www.youtube.com/v/N0gb9v4LI4o" type="application/x-shockwave-flash" width="425" height="350"></p> 56 <p>E-link Embed:<br><embed id='elink-embed' src="http://www.youtube.com/e/N0gb9v4LI4o" type="application/x-shockwave-flash" width="425" height="350"></p> 57 <p>Object with embed:<br><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/N0gb9v4LI4o?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed id='object-embed' src="http://www.youtube.com/v/N0gb9v4LI4o?version=3&hl=en_US" type="application/x-shockwave-flash" width="425" height="350" allowscriptaccess="always" allowfullscreen="true"></embed></object></p> 58 <p>Object without embed:<br><object id='object-no-embed' width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/N0gb9v4LI4o?version=3&hl=en_US"></object> 59 <p>Embed inside iframe:<br> 60 <iframe width="300" height="200"id='container-iframe' src='data:text/html,<body><p>Normal Embed:<br><embed id="normal-embed" src="http://www.youtube.com/v/N0gb9v4LI4o" type="application/x-shockwave-flash" width="425" height="350"></p></body>' > 61 </iframe> 76 <div id="test-container"> 77 <p>Normal Embed:<br><embed id="normal-embed" src="http://www.youtube.com/v/N0gb9v4LI4o" type="application/x-shockwave-flash" width="425" height="350"></p> 78 <p>E-link Embed:<br><embed id="elink-embed" src="http://www.youtube.com/e/N0gb9v4LI4o" type="application/x-shockwave-flash" width="425" height="350"></p> 79 <p>Object with embed:<br> 80 <object width="425" height="350"> 81 <param name="movie" value="http://www.youtube.com/v/N0gb9v4LI4o?version=3&hl=en_US"></param> 82 <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param> 83 <embed id="object-embed" src="http://www.youtube.com/v/N0gb9v4LI4o?version=3&hl=en_US" type="application/x-shockwave-flash" width="425" height="350" allowscriptaccess="always" allowfullscreen="true"></embed> 84 </object> 85 </p> 86 <p>Object without embed:<br><object id="object-no-embed" width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/N0gb9v4LI4o?version=3&hl=en_US"></object> 87 <p>Embed inside iframe:<br> 88 <iframe width="300" height="200" id="test-iframe"></iframe> 89 </div> 62 90 63 91 <script src="../../../../resources/js-test-post.js"></script>
Note:
See TracChangeset
for help on using the changeset viewer.