https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f7aab0af8bf4ffc4aa24ce4bb5299b0a063ff8ef authored by Adam Rice on 05 April 2018, 15:11:00 UTC
Streams: Constructors property lookup order
Tip revision: f7aab0a
interfaces-window.https.html
<!DOCTYPE html>
<title>Service Worker: Interfaces</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="resources/interfaces-idls.js"></script>
<script src="resources/test-helpers.sub.js"></script>
<script>
'use strict';

var idlArray = new IdlArray();
idlArray.add_untested_idls(idls.untested);
idlArray.add_idls(idls.tested);
idlArray.add_objects({
    ServiceWorkerContainer: ['navigator.serviceWorker']
  });

promise_test(function(t) {
    var scope = 'resources/scope/interfaces-and-attributes';

    return service_worker_unregister_and_register(
        t, 'resources/empty-worker.js', scope)
      .then(function(registration) {
          t.add_cleanup(function() {
              registration.unregister();
            });

          window.registrationInstance = registration;
          idlArray.add_objects({
              ServiceWorkerRegistration: ['window.registrationInstance'],
              ServiceWorker: ['window.registrationInstance.installing']
            });
          idlArray.test();
        });
  }, 'test setup (worker registration)');
</script>
back to top