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

Unified Diff: LayoutTests/push_messaging/push-messaging.html

Issue 676003002: Add layout tests for hasPermission (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@push_has_permission
Patch Set: rebase Created 6 years, 1 month 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
« no previous file with comments | « no previous file | LayoutTests/push_messaging/push-messaging-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/push_messaging/push-messaging.html
diff --git a/LayoutTests/push_messaging/push-messaging.html b/LayoutTests/push_messaging/push-messaging.html
index 42d68d40a420edf643456244173604fc72c65e81..cc58cc378ee822cc85cbbd84aa6152e5edd26859 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();
}, function(e) {
testFailed('Error callback invoked unexpectedly.');
finishJSTest();
});
}
+
+function testPushHasPermission() {
+ navigator.push.hasPermission().then(function(permissionStatus) {
+ status = permissionStatus;
+ shouldBeEqualToString('status', 'granted');
+ finishJSTest();
+ }, function() {
+ testFailed('Error callback invoked unexpectedly.');
+ finishJSTest();
+ });
+}
+
</script>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/push_messaging/push-messaging-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698