Index: third_party/WebKit/LayoutTests/media/remoteplayback/prompt-twice-throws.html |
diff --git a/third_party/WebKit/LayoutTests/media/remoteplayback/prompt-twice-throws.html b/third_party/WebKit/LayoutTests/media/remoteplayback/prompt-twice-throws.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..737f4671e3c56ac63c4654271106fb7b9853e6e7 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/media/remoteplayback/prompt-twice-throws.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE html> |
+<html> |
+ <head> |
+ <title>Test that calling prompt() before the promise returned by the previous call is resolved throws an exception</title> |
+ <script src="../../resources/testharness.js"></script> |
+ <script src="../../resources/testharnessreport.js"></script> |
+ <script src="../media-file.js"></script> |
+ </head> |
+ <body> |
+ <script> |
+ async_test(function(test) |
+ { |
+ var v = document.createElement('video'); |
+ v.src = findMediaFile('video', 'content/test'); |
+ document.body.appendChild(v); |
+ |
+ document.onclick = function() { |
+ v.remote.prompt(); |
+ |
+ v.remote.prompt().then( |
mlamouri (slow - plz ping)
2016/10/01 14:55:53
Maybe you should have another simulated user gestu
whywhat
2016/10/03 20:39:01
Hm, if the checks are reversed, the utiliseUserGes
|
+ test.unreached_func(), |
+ test.step_func_done(function(e) { |
+ assert_equals(e.name, 'OperationError'); |
+ assert_equals(e.message, 'A prompt is already being shown for this media element.'); |
+ })); |
+ document.onclick = null; |
+ } |
+ |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
mlamouri (slow - plz ping)
2016/10/01 14:55:53
Having a <button>click me</button> as a target wou
whywhat
2016/10/03 20:39:01
Alright. I'll try to remember to point noone to th
|
+ }, 'Test that calling prompt() before the promise returned by the previous call is resolved throws an exception.'); |
+ </script> |
+ </body> |
+</html> |