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

Side by Side Diff: LayoutTests/fast/forms/label/label-contains-other-interactive-content.html

Issue 1166743004: Force display:none for audio elements with no controls attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/media/audio-controls-computed-display.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body id="body"> 2 <body id="body">
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 <script src="../resources/common.js"></script> 4 <script src="../resources/common.js"></script>
5 <script> 5 <script>
6 var interactiveElements1 = ['button', 'details', 'embed', 'iframe', 'keygen', 'l abel', 'select', 'textarea']; 6 var interactiveElements1 = ['button', 'details', 'embed', 'iframe', 'keygen', 'l abel', 'select', 'textarea'];
7 var interactiveElements2 = [ 7 var interactiveElements2 = [
8 ['a', 'href'], 8 ['a', 'href'],
9 ['audio', 'controls'], 9 ['audio', 'controls'],
10 ['video', 'controls'], 10 ['video', 'controls'],
(...skipping 22 matching lines...) Expand all
33 }); 33 });
34 debug(''); 34 debug('');
35 35
36 interactiveElements2.forEach(function(entry) { 36 interactiveElements2.forEach(function(entry) {
37 var element = document.createElement(entry[0]); 37 var element = document.createElement(entry[0]);
38 element.id = entry[0]; 38 element.id = entry[0];
39 element.style.display = 'block'; 39 element.style.display = 'block';
40 element.style.width = '100px'; 40 element.style.width = '100px';
41 element.style.height = '100px'; 41 element.style.height = '100px';
42 label.appendChild(element); 42 label.appendChild(element);
43 clickElement(element);
44 // Audio elements without controls attribute is always invisible. 43 // Audio elements without controls attribute is always invisible.
45 if (entry[0] != 'audio') { 44 if (entry[0] != 'audio') {
45 clickElement(element);
46 debug(entry[0]); 46 debug(entry[0]);
47 shouldBeEqualToString('document.activeElement.id', 'control'); 47 shouldBeEqualToString('document.activeElement.id', 'control');
48 } 48 }
49 document.activeElement.blur(); 49 document.activeElement.blur();
50 50
51 element.setAttribute(entry[1], entry[1]); 51 element.setAttribute(entry[1], entry[1]);
52 // Prevents page transition. 52 // Prevents page transition.
53 if (entry[0] == 'a') 53 if (entry[0] == 'a')
54 element.addEventListener('click', function(e) { e.preventDefault(); }, f alse); 54 element.addEventListener('click', function(e) { e.preventDefault(); }, f alse);
55 clickElement(element); 55 clickElement(element);
(...skipping 13 matching lines...) Expand all
69 clickElement(element); 69 clickElement(element);
70 debug('input'); 70 debug('input');
71 shouldNotBe('document.activeElement.id', '"control"'); 71 shouldNotBe('document.activeElement.id', '"control"');
72 document.activeElement.blur(); 72 document.activeElement.blur();
73 73
74 // Note: It's impossible to click on input[type=hidden]. 74 // Note: It's impossible to click on input[type=hidden].
75 75
76 label.remove(); 76 label.remove();
77 </script> 77 </script>
78 </body> 78 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/audio-controls-computed-display.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698