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

Unified Diff: third_party/WebKit/LayoutTests/media/play-promise-crash.html

Issue 2048393002: Test for bug 618429. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/play-promise-crash.html
diff --git a/third_party/WebKit/LayoutTests/media/play-promise-crash.html b/third_party/WebKit/LayoutTests/media/play-promise-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..2e1a546582997b65a3ebaa540d0eb5516dbe89e9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/play-promise-crash.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Crash test for play() promise</title>
+</head>
+<body>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<script>
+ window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
+
+ async_test(function(t) {
+ var video = document.createElement('video');
+ video.src = findMediaFile('video', 'content/test');
+ video.play().then(t.step_func_done(function() {
+ assert_unreached();
+ }), t.step_func(function() {
+ // Running gc to make sure the promise returned by |play()| is destructed.
+ gc();
+ t.done();
+ }));
+ }, "Test that the rejected promise returned by play() doesn't lead to a crash at dtor.");
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698