Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: LayoutTests/fast/serviceworker/serviceworkercontainer-interface.html

Issue 313553002: Add the navigator.serviceWorker.waiting property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring patch to head. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698