Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js |
| index 16fa54b771c909e7486a68d1267b9552749db560..39f484a890d0041ce19beb433b6d390dc5dee753 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js |
| +++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/pushmessagedata-worker.js |
| @@ -27,30 +27,7 @@ test(function() { |
| }, 'PushEvent can be initialized from ArrayBuffer, ArrayBufferView and USVStrings.'); |
| test(function() { |
| - var pushMessageData = createPushMessageData(); |
| - |
| - assert_equals(pushMessageData.arrayBuffer().byteLength, 0); |
| - |
| - assert_equals(pushMessageData.blob().size, 0); |
| - assert_equals(pushMessageData.blob().type, ''); |
| - |
| - // PushMessageData.json() is specified to be identical to JSON.parse() with |
| - // the message's data as the argument. JSON.parse('') throws an exception, |
| - // so verify that calling json() without a body throws the same exception. |
| - try { |
| - pushMessageData.json(); |
| - assert_unreached('Expected an exception to be thrown.'); |
| - } catch (eventDataException) { |
| - try { |
| - JSON.parse(''); |
| - assert_unreached('Expected an exception to be thrown.'); |
| - } catch (jsonParseException) { |
| - assert_equals(eventDataException.name, jsonParseException.name); |
| - assert_equals(eventDataException.message, jsonParseException.message); |
| - } |
| - } |
| - |
| - assert_equals(pushMessageData.text().length, 0); |
| + assert_equals(createPushMessageData(undefined), null); |
| }, 'PushMessageData is empty by default.'); |
|
dgn
2016/03/09 21:22:25
null instead of empty?
Peter Beverloo
2016/03/09 21:28:29
Done.
|