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

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

Issue 225053005: ServiceWorker should have an interface object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak test. Created 6 years, 8 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/serviceworker-interface.html
diff --git a/LayoutTests/fast/serviceworker/serviceworker-interface.html b/LayoutTests/fast/serviceworker/serviceworker-interface.html
new file mode 100644
index 0000000000000000000000000000000000000000..985b0742d4084f6419753f1733bcbfb02a67d40a
--- /dev/null
+++ b/LayoutTests/fast/serviceworker/serviceworker-interface.html
@@ -0,0 +1,14 @@
+<!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(null, function() { new ServiceWorker(); },
jsbell 2014/04/11 15:54:09 Can you add a case that calls the constructor as f
+ 'the constructor should not be callable');
+ assert_equals(Object.getPrototypeOf(ServiceWorker.prototype),
+ Worker.prototype,
+ 'ServiceWorker should extend Worker');
+}, 'ServiceWorker interface');
+</script>

Powered by Google App Engine
This is Rietveld 408576698