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

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

Issue 213013006: Define push_messaging module with PushManager skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More oilpan types. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/push_messaging/push-messaging.html
diff --git a/LayoutTests/push_messaging/push-messaging.html b/LayoutTests/push_messaging/push-messaging.html
new file mode 100644
index 0000000000000000000000000000000000000000..f72c1a8f4fd1802cc2a4a7c6c394476f2f19fc53
--- /dev/null
+++ b/LayoutTests/push_messaging/push-messaging.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description('Tests for the Push API.');
+
+if (!window.testRunner)
+ debug('This test can not run without testRunner');
+
+window.jsTestIsAsync = true;
+
+shouldBeTrue('!!navigator.push');
+shouldBeTrue('!!navigator.push.register');
+shouldBe('String(navigator.push.register("senderId"))', '"[object Promise]"');
+
+// Currently we have an empty implementation that always fails.
+navigator.push.register('senderId').then(function successCallback() {
+ testFailed('Success callback invoked unexpectedly.');
+ finishJSTest();
+}, function errorCallback(e) {
+ error = e;
+ shouldBeNull('error');
+ finishJSTest();
+});
+
+</script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt ('k') | LayoutTests/push_messaging/push-messaging-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698