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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/interfaces-worker.js

Issue 2869793003: Remove the interface tests for Push Messaging (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/push_messaging/interfaces.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 importScripts('/resources/testharness.js');
2
3 test(function() {
4 assert_own_property(self, 'PushEvent');
5
6 var event = new PushEvent('PushEvent');
7 assert_idl_attribute(event, 'data');
8 assert_equals(event.type, 'PushEvent');
9
10 // PushEvent should be extending ExtendableEvent.
11 assert_inherits(event, 'waitUntil');
12
13 }, 'PushEvent should be exposed and have the expected interface.');
14
15 test(function() {
16 assert_own_property(self, 'PushManager', 'PushManager needs to be exposed as a global.');
17 assert_idl_attribute(registration, 'pushManager', 'PushManager needs to be e xposed on the registration.');
18
19 assert_own_property(PushManager, 'supportedContentEncodings');
20
21 assert_inherits(registration.pushManager, 'subscribe');
22 assert_inherits(registration.pushManager, 'getSubscription');
23 assert_inherits(registration.pushManager, 'permissionState');
24
25 }, 'PushManager should be exposed and have the expected interface.');
26
27 test(function() {
28 assert_own_property(self, 'PushMessageData', 'PushMessageData needs to be ex posed as a global.');
29
30 var pushMessageData = new PushEvent('PushEvent', { data: 'SomeData' }).data;
31 assert_inherits(pushMessageData, 'arrayBuffer');
32 assert_inherits(pushMessageData, 'blob');
33 assert_inherits(pushMessageData, 'json');
34 assert_inherits(pushMessageData, 'text');
35
36 }, 'PushMessageData should be exposed and have the expected interface.');
37
38 test(function() {
39 assert_own_property(self, 'PushSubscription', 'PushSubscription needs to be exposed as a global.');
40
41 assert_own_property(PushSubscription.prototype, 'endpoint');
42
43 assert_own_property(PushSubscription.prototype, 'getKey');
44 assert_own_property(PushSubscription.prototype, 'unsubscribe');
45
46 }, 'PushSubscription should be exposed and have the expected interface.');
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/push_messaging/interfaces.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698