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

Unified Diff: LayoutTests/presentation/presentationrequest.html

Issue 1296943003: Presentation API: PresentationRequest.start() requires user gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/modules/presentation/PresentationRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/presentation/presentationrequest.html
diff --git a/LayoutTests/presentation/presentationrequest.html b/LayoutTests/presentation/presentationrequest.html
new file mode 100644
index 0000000000000000000000000000000000000000..c9870506b9ffc4d29f6ecc841fb95a3809fa8063
--- /dev/null
+++ b/LayoutTests/presentation/presentationrequest.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+
+async_test(function(t) {
+ var request = new PresentationRequest("http://example.com");
+ request.start().catch(t.step_func(function(e) {
+ assert_true(e instanceof DOMException);
+ assert_equals(e.name, "InvalidAccessError");
+ assert_equals(e.message, "PresentationRequest::start() requires user gesture.");
+ t.done();
+ }));
+}, "Test that the PresentationRequest.start() requires user gesture.")
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | Source/modules/presentation/PresentationRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698