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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-fullscreen.js

Issue 2222163005: Updating media controls to give fullscreen button highest priority (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 4 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 unified diff | Download patch
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 function hasFullscreenButton(element)
4 {
5 var size = mediaControlsButtonDimensions(element, "fullscreen-button");
6 return size[0] > 0 && size[1] > 0;
7 }
8
9 function fullscreen_test() 3 function fullscreen_test()
10 { 4 {
11 async_test(function(t) 5 async_test(function(t)
12 { 6 {
13 var v1 = document.createElement("video"); 7 var v1 = document.createElement("video");
14 var v2 = document.createElement("video"); 8 var v2 = document.createElement("video");
15 v1.controls = v2.controls = true; 9 v1.controls = v2.controls = true;
16 v1.src = findMediaFile("video", "content/test"); 10 v1.src = findMediaFile("video", "content/test");
17 v2.src = findMediaFile("audio", "content/test"); 11 v2.src = findMediaFile("audio", "content/test");
18 document.body.appendChild(v1); 12 document.body.appendChild(v1);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 v.src = findMediaFile("video", "content/test"); 61 v.src = findMediaFile("video", "content/test");
68 document.body.appendChild(v); 62 document.body.appendChild(v);
69 63
70 v.addEventListener("loadeddata", t.step_func_done(function() 64 v.addEventListener("loadeddata", t.step_func_done(function()
71 { 65 {
72 assert_false(hasFullscreenButton(v), 66 assert_false(hasFullscreenButton(v),
73 "fullscreen button not show when fullscreen is not supp orted"); 67 "fullscreen button not show when fullscreen is not supp orted");
74 })); 68 }));
75 }); 69 });
76 } 70 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/media-controls.js ('k') | third_party/WebKit/Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698