Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js |
| diff --git a/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js b/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js |
| index c3fc52a380f96684aac3c26d246f58c70f9009fb..fda7d792ac48e038049bb3b74370b9af5246643a 100644 |
| --- a/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js |
| +++ b/LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js |
| @@ -71,5 +71,32 @@ promise_test(function(t) { |
| }, 'Cache'); |
| test(function() { |
| - assert_equals(new ExtendableEvent('ExtendableEvent').type, 'ExtendableEvent'); |
| + assert_equals( |
| + new ExtendableEvent('ExtendableEvent').type, |
| + 'ExtendableEvent', 'Type of ExtendableEvent should be ExtendableEvent:'); |
|
falken
2015/04/22 00:18:17
We don't add the ':' at the end of the description
Paritosh Kumar
2015/04/22 06:35:39
Thanks falken
Without ':' For Fail condition it w
|
| + assert_equals( |
| + new FetchEvent('FetchEvent').type, |
| + 'FetchEvent', 'Type of FetchEvent should be FetchEvent:'); |
| + assert_equals( |
| + new FetchEvent('FetchEvent').cancelable, |
| + true, 'Default FetchEvent.cancelable should be true:'); |
| + assert_equals( |
| + new FetchEvent('FetchEvent').bubbles, |
| + false, 'Default FetchEvent.bubbles should be true:'); |
| + assert_equals( |
| + new FetchEvent('FetchEvent').isReload, |
| + false, 'Default FetchEvent.isReload should be false:'); |
| + assert_equals( |
|
Paritosh Kumar
2015/04/21 09:31:01
Added this test, we cannot set explicitly cancelab
|
| + new FetchEvent('FetchEvent', {cancelable: false}).cancelable, |
| + true, 'FetchEvent.cancelable should be true:'); |
| + assert_equals( |
| + new FetchEvent('FetchEvent', {isReload : true}).isReload, true, |
| + 'FetchEvent.isReload with option {isReload : true} should be true:'); |
| + var req = new Request('http://localhost/', |
| + {method: 'POST', |
| + headers: [['Content-Type', 'Text/Html']]}); |
| + assert_equals( |
| + new FetchEvent('FetchEvent',{request : req, isReload : true}).request.url, |
|
falken
2015/04/22 00:18:17
need a space after the ,
|
| + 'http://localhost/', |
| + 'FetchEvent.request.url should return the value it was initialized to:'); |
| }, 'Event constructors'); |