tor-browser

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

test_tasks_skipall.xhtml (1107B)


      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.only() 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      /* eslint-disable mozilla/reject-addtask-only */
     11      // Check that we can skip all but one task by calling `only()`.
     12 
     13      add_task(async function skipMe1() {
     14        ok(false, "Not skipped after all.");
     15      });
     16 
     17      add_task(async function skipMe2() {
     18        ok(false, "Not skipped after all.");
     19      }).skip();
     20 
     21      add_task(async function skipMe3() {
     22        ok(false, "Not skipped after all.");
     23      }).only();
     24 
     25      add_task(async function skipMeNot() {
     26        ok(true, "Well well well.");
     27      }).only();
     28 
     29      add_task(async function skipMe4() {
     30        ok(false, "Not skipped after all.");
     31      });
     32 
     33    ]]>
     34  </script>
     35  <body xmlns="http://www.w3.org/1999/xhtml" >
     36  </body>
     37 </window>