blob: 60e6921f1218c79b07b24bc14afa4b7403c75526 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function() {
assert_true('ServiceWorker' in window,
'the constructor should be defined');
assert_throws_js(TypeError, function() { new ServiceWorker(); },
'the constructor should not be callable with "new"');
assert_throws_js(TypeError, function() { ServiceWorker(); },
'the constructor should not be callable');
assert_equals(Object.getPrototypeOf(ServiceWorker.prototype),
EventTarget.prototype,
'ServiceWorker should extend EventTarget');
}, 'ServiceWorker interface');
</script>