Index: LayoutTests/fast/serviceworker/serviceworkercontainer-interface.html |
diff --git a/LayoutTests/fast/serviceworker/serviceworkercontainer-interface.html b/LayoutTests/fast/serviceworker/serviceworkercontainer-interface.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..73d520deef1ac62b1d3ee8dda293a5274f75f04c |
--- /dev/null |
+++ b/LayoutTests/fast/serviceworker/serviceworkercontainer-interface.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+function getPropertyDescriptor(name) { |
+ return ( |
+ Object.getOwnPropertyDescriptor(ServiceWorkerContainer.prototype, name) || |
+ // FIXME: Remove this when http://crbug.com/43394 is fixed. |
+ Object.getOwnPropertyDescriptor(navigator.serviceWorker, name)); |
+} |
+ |
+test(function() { |
+ assert_true('ServiceWorkerContainer' in window, |
+ 'the constructor should be defined'); |
+ assert_throws(null, function() { new ServiceWorkerContainer(); }, |
+ 'the constructor should not be callable with "new"'); |
+ assert_throws(null, function() { ServiceWorkerContainer(); }, |
+ 'the constructor should not be callable'); |
+ |
+ var descriptor = getPropertyDescriptor('waiting'); |
+ assert_false(descriptor.configurable, |
+ 'the waiting property should be Unforgeable'); |
+}, 'ServiceWorkerContainer interface'); |
+</script> |