sandbox_021-manual.htm (2362B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>HTML5 Sandbox: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</title> 5 <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> 6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 7 <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> 8 <meta name="assert" content="Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe." /> 9 <script src="support/sandbox_helper.js" type="text/javascript"></script> 10 </head> 11 <body> 12 <pre>Description: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</pre> 13 <div>This test is to verify script is allowed inside nested iframes if any of the conditions below are true</div> 14 <div>1. both parent sandbox and child sandbox have 'allow-scripts' token.</div> 15 <div>2. parent sandbox has 'allow-scripts' token and nested child iframe has no sandbox attribute.</div> 16 <div>3. parent iframe has no sandbox attribute and child iframe has sandbox='allow-scripts' token.</div> 17 <div>4. both parent and child iframes have no sandbox attribute.</div> 18 <br /> 19 <table id='testtable' border='1'> 20 <tr> 21 <td>Test Result</td> 22 <td>Test Assertion</td> 23 </tr> 24 <tr> 25 <td id='test_0_result'>Manual</td> 26 <td id='test_0_assertion'>Test passes if there is no red on the page.</td> 27 </tr> 28 </table> 29 <br /> 30 <div id="testframe"> 31 <div style="float: left; border: 1px solid; padding: 5px;"> 32 <div style="font-weight: bold">Top-most iframe with sandbox="allow-scripts"</div> 33 <iframe id="iframe1" src="support/iframe_sandbox_021.htm" sandbox="allow-scripts" style="height: 330px; width: 400px;"></iframe> 34 </div> 35 <div style="float: left; border: 1px solid; padding: 5px; margin-left: 20px;"> 36 <div style="font-weight: bold">Top-most iframe without sandbox attribute</div> 37 <iframe id="iframe2" src="support/iframe_sandbox_021.htm" style="height: 330px; width: 400px;"></iframe> 38 </div> 39 </div> 40 <script type="text/javascript"> 41 DisableTestForNonSupportingBrowsers(); 42 </script> 43 </body> 44 </html>