tmenu);
        box.addEventListener('lostpointercapture',
          handle_lostpointercapture);
      }

      var current_test = null;
      var resolve_test = null;
      var reject_test = null;
      // window.promise_test is only defined when running the
      // test using testharness.js
      // if window.promise_test is not defined we'll run the manual testing
      // path
      if(!window.promise_test){
        addEventListeners();
      }

      if(window.promise_test){
        promise_test(funct