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

Side by Side Diff: LayoutTests/fast/media/mq-js-stylesheet-media-03.html

Issue 15094019: Fixing inconsistency with Media Query append/deleteMedium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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 <html> 1 <html>
2 <head> 2 <head>
3 <title>CSS3 media query test: stylesheet media.appendMedium</title> 3 <title>CSS3 media query test: stylesheet media.appendMedium</title>
4 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" /> 4 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
5 <link rel="help" href="http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html" /> 5 <link rel="help" href="http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html" />
6 <style type="text/css" media="braille, not screen"> 6 <style type="text/css" media="braille, not screen">
7 p { color: green } 7 p { color: green }
8 </style> 8 </style>
9 9
10 <script language="javascript"> 10 <script language="javascript">
11 function test() { 11 function test() {
12 var re = document.getElementById("result"); 12 var re = document.getElementById("result");
13 var media = document.styleSheets[0].media; 13 var media = document.styleSheets[0].media;
14 media.appendMedium("screen and (color)"); 14 media.appendMedium("screen and (color)");
15 media.appendMedium("not screen"); 15 media.appendMedium("not screen");
16 var first = true; 16 var first = true;
17 for (var i = 0; i < media.length; ++i) { 17 for (var i = 0; i < media.length; ++i) {
18 if (!first) re.innerHTML += ", " + media.item(i); 18 if (!first) re.innerHTML += ", " + media.item(i);
19 else re.innerHTML = media.item(i); 19 else re.innerHTML = media.item(i);
20 first = false; 20 first = false;
21 } 21 }
22 22
23 } 23 }
24 </script> 24 </script>
25 25
26 </head> 26 </head>
27 <body onload="test()"> 27 <body onload="test()">
28 <!-- FIXME: NOTE! This will fail until dynamic setting of media property causes style recalculation. 28 <!-- FIXME: NOTE! This will fail until dynamic setting of media property causes style recalculation.
apavlov 2013/05/21 15:31:22 I guess this comment should be removed as well?
29 This is not the case currently (24.07.2005) 29 This is not the case currently (24.07.2005)
30 --> 30 -->
31 <p> This text should be green and below should read "braille, not screen, screen and (color)". </p> 31 <p> This text should be green and below should read "braille, not screen, screen and (color)". </p>
32 <p id="result">Failure: test not run</p> 32 <p id="result">Failure: test not run</p>
33 <p> expected to fail (24.07.2005)</p>
34 </body> 33 </body>
35 </html> 34 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/media/mq-append-delete-expected.txt ('k') | LayoutTests/fast/media/mq-js-stylesheet-media-03-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698