choose-default-001.html (977B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>HTML Test: Browsing context - Default name</title> 4 <link rel="author" title="Intel" href="http://www.intel.com/"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <div id="log"></div> 8 <iframe src="/common/blank.html" style="display:none"></iframe> 9 <object id="obj" type="text/html" data="about:blank"></object> 10 <embed id="embedded" type="image/svg+xml" src="/images/green.svg" width="0" height="0" /> 11 <script> 12 test(t => { 13 assert_equals(window.frames[0].name, ""); 14 assert_equals(document.getElementById("embedded").name, ""); 15 assert_equals(window["obj"].name, ""); 16 }, "A embedded browsing context has empty-string default name"); 17 18 test(t => { 19 var win = window.open("about:blank", "_blank"); 20 assert_equals(win.name, ""); 21 win.close(); 22 }, "A browsing context which is opened by window.open() method with '_blank' parameter has empty-string default name"); 23 </script>