tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_custom_element_htmlconstructor_chrome.html (1336B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1274159
      5 -->
      6 <head>
      7  <title>Test HTMLConstructor for custom elements.</title>
      8  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1274159">Bug 1274159</a>
     13 <script type="text/javascript">
     14 function test_with_new_window(f) {
     15  return new Promise((aResolve) => {
     16    let iframe = document.createElement('iframe');
     17    iframe.setAttribute('type', 'content');
     18    iframe.setAttribute('src', 'http://example.org/tests/dom/tests/mochitest/webcomponents/dummy_page.html');
     19    iframe.onload = function() {
     20      f(iframe.contentWindow);
     21      aResolve();
     22    };
     23    document.body.appendChild(iframe);
     24  });
     25 }
     26 
     27 var promises = [];
     28 SimpleTest.waitForExplicitFinish();
     29 </script>
     30 <!-- Test cases for autonomous element -->
     31 <script type="text/javascript" src="htmlconstructor_autonomous_tests.js"></script>
     32 <!-- Test cases for customized built-in element -->
     33 <script type="text/javascript" src="htmlconstructor_builtin_tests.js"></script>
     34 <script type="text/javascript">
     35 Promise.all(promises).then(() => {
     36  SimpleTest.finish();
     37 });
     38 </script>
     39 </body>
     40 </html>