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

Unified Diff: android_webview/test/shell/assets/full_screen_video.js

Issue 639923003: [aw] Fullscreen tests for non-media elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreenNonMediaForReview
Patch Set: Remove inheritance, combine tests into one class Created 6 years, 2 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: android_webview/test/shell/assets/full_screen_video.js
diff --git a/android_webview/test/shell/assets/full_screen_video.js b/android_webview/test/shell/assets/full_screen_video.js
new file mode 100644
index 0000000000000000000000000000000000000000..2b40b8a4357f458cf66ebc2db877aeb26e927364
--- /dev/null
+++ b/android_webview/test/shell/assets/full_screen_video.js
@@ -0,0 +1,24 @@
+
+function goFullscreen(id) {
+ var element = document.getElementById(id);
+ if (element.webkitRequestFullScreen) {
+ element.webkitRequestFullScreen();
+ }
+}
+
+function playVideo() {
+ document.getElementById('video').play();
+}
+
+addEventListener('DOMContentLoaded', function() {
+ document.addEventListener('webkitfullscreenchange', function() {
+ javaOnEnterFullscreen.notifyJava();
+ }, false);
+ document.getElementById('video').addEventListener('play', function() {
+ javaOnPlayObserver.notifyJava();
+ }, false);
+ document.addEventListener('webkitfullscreenerror', function() {
+ javaFullScreenErrorObserver.notifyJava();
+ }, false);
+}, false);
+

Powered by Google App Engine
This is Rietveld 408576698