Index: LayoutTests/push_messaging/push-messaging.html |
diff --git a/LayoutTests/push_messaging/push-messaging.html b/LayoutTests/push_messaging/push-messaging.html |
index 16e1e439315b04655ab5eda81f2a03e4cb51f258..9ea4dc4a4515a4864ef921df9bde91c0dbc3f78d 100644 |
--- a/LayoutTests/push_messaging/push-messaging.html |
+++ b/LayoutTests/push_messaging/push-messaging.html |
@@ -31,12 +31,24 @@ function testPushRegistrationSuccess() { |
registration = reg; |
shouldBeEqualToString('registration.pushEndpoint', 'endpoint'); |
shouldBeEqualToString('registration.pushRegistrationId', 'registrationId'); |
- finishJSTest(); |
+ testPushHasPermission('granted'); |
Michael van Ouwerkerk
2014/10/24 12:53:01
Is this a tab for whitespace? Oh dear.
Miguel Garcia
2014/10/31 17:04:47
Done. Sorry about that, I configured eclipse prope
Miguel Garcia
2014/10/31 17:04:47
Done.
|
}, function(e) { |
testFailed('Error callback invoked unexpectedly.'); |
finishJSTest(); |
}); |
} |
+ |
+function testPushHasPermission(expectedStatus) { |
Michael van Ouwerkerk
2014/10/24 12:53:01
Please separate the tests more cleanly by making t
Miguel Garcia
2014/10/31 17:04:47
Done.
|
+ navigator.push.hasPermission().then(function(permissionStatus) { |
+ status = permissionStatus; |
+ shouldBeEqualToString("status", expectedStatus); |
Michael van Ouwerkerk
2014/10/24 12:53:01
nit: single quotes for js strings
Peter Beverloo
2014/10/24 13:03:24
shouldBeEqualToString takes two literal strings wh
Miguel Garcia
2014/10/31 17:04:47
Not that it matters now but expectedStatus is alre
|
+ finishJSTest(); |
+ }, function() { |
+ testFailed('Error callback invoked unexpectedly.'); |
+ finishJSTest(); |
+ }); |
+} |
+ |
</script> |
</body> |
</html> |