tor-browser

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

test_tasks_skip.xhtml (1035B)


      1 <?xml version="1.0"?>
      2 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
      3                 type="text/css"?>
      4 <window title="Test add_task.skip() function"
      5        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      6  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
      7  <script type="application/javascript">
      8    <![CDATA[
      9 
     10      // Check that we can skip arbitrary tasks by calling `skip()`.
     11 
     12      add_task(async function skipMeNot1() {
     13        ok(true, "Well well well.");
     14      });
     15 
     16      add_task(async function skipMe1() {
     17        ok(false, "Not skipped after all.");
     18      }).skip();
     19 
     20      add_task(async function skipMeNot2() {
     21        ok(true, "Well well well.");
     22      });
     23 
     24      add_task(async function skipMeNot3() {
     25        ok(true, "Well well well.");
     26      });
     27 
     28      add_task(async function skipMe2() {
     29        ok(false, "Not skipped after all.");
     30      }).skip();
     31 
     32    ]]>
     33  </script>
     34  <body xmlns="http://www.w3.org/1999/xhtml" >
     35  </body>
     36 </window>