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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js

Issue 2347473005: Make required dictionary members non-nullable again (Closed)
Patch Set: rm TouchInit, add tests Created 4 years, 3 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: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js
index 88eeaead49e059cfffcb588ac5dc6c1eec4cfa84..75ef8c6fa3c17161511b6f24f316fe28364103a7 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js
@@ -72,6 +72,15 @@ test(function() {
assert_equals(
new ExtendableEvent('ExtendableEvent').type,
'ExtendableEvent', 'Type of ExtendableEvent should be ExtendableEvent');
+ assert_throws(new TypeError, function() {
+ new FetchEvent('FetchEvent');
+ }, 'FetchEvent constructor with one argument throws');
+ assert_throws(new TypeError, function() {
+ new FetchEvent('FetchEvent', {});
+ }, 'FetchEvent constructor with empty init dict throws');
+ assert_throws(new TypeError, function() {
+ new FetchEvent('FetchEvent', {request: null});
+ }, 'FetchEvent constructor with null request member throws');
var req = new Request('https://www.example.com/', {method: 'POST'});
assert_equals(
new FetchEvent('FetchEvent', {request: req}).type,

Powered by Google App Engine
This is Rietveld 408576698