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

Side by Side Diff: LayoutTests/fast/media/mq-js-media-except-01.html

Issue 15094019: Fixing inconsistency with Media Query append/deleteMedium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: For landing Created 7 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>CSS3 media query test: deleteMedium throwing exception.</title> 3 <title>CSS3 media query test: deleteMedium throwing exception.</title>
4 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" /> 4 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
5 5
6 <style type="text/css"> 6 <style type="text/css">
7 @media all and (color) { 7 @media all and (color) {
8 p#result { color: green;} 8 p#result { color: green;}
9 } 9 }
10 </style> 10 </style>
11 11
12 <script language="javascript"> 12 <script language="javascript">
13 function test() { 13 function test() {
14 try { 14 try {
15 document.styleSheets[0].cssRules[0].media.deleteMedium("all and ("); 15 document.styleSheets[0].cssRules[0].media.deleteMedium("all and (");
16 document.getElementById("result").innerHTML = "Success. This text should be green.";
16 } 17 }
17 catch(e) { 18 catch(e) {
18 document.getElementById("result").innerHTML = "Success." 19 document.getElementById("result").innerHTML = "Failure. 'all and (' is n ot a valid medium and should be ignored."
19 document.getElementById("details").innerHTML = "Following exception was caught: " + e; 20 document.getElementById("details").innerHTML = "Following exception was caught: " + e;
20 } 21 }
21 } 22 }
22 </script> 23 </script>
23 24
24 25
25 </head> 26 </head>
26 <body onload="test()"> 27 <body onload="test()">
27 <p>The text below should read "Success." </p> 28 <p>The text below should read "Success." </p>
28 <p id="result">Failure: test not run.</p> 29 <p id="result">Failure: test not run.</p>
29 <p id="details"></p> 30 <p id="details"></p>
30 </body> 31 </body>
31 </html> 32 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/media/mq-append-delete-expected.txt ('k') | LayoutTests/fast/media/mq-js-media-except-01-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698