test_window_define_symbol.html (781B)
1 <!DOCTYPE html> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1082672 5 --> 6 <head> 7 <meta charset="UTF-8"> 8 <title>Test for Bug 1082672 part 2</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1082672">Mozilla Bug 1082672</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 </div> 17 <pre id="test"> 18 <script type="application/javascript"> 19 if (typeof Symbol === "function") { 20 var sym = Symbol("ponies"); 21 Object.defineProperty(window, sym, {configurable: true, value: 3}); 22 is(window[sym], 3); 23 } else { 24 ok(true, "no Symbols in this build"); 25 } 26 </script> 27 </pre> 28 </body> 29 </html>