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

Side by Side Diff: LayoutTests/fast/media/media-query-list-syntax.html

Issue 14065029: Improved parse error handling for CSSMQ. (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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Media Query List syntax</title>
5 <link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
6 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax">
7 <script type="text/javascript" src="../../resources/testharness.js"></script >
8 <script type="text/javascript" src="../../resources/testharnessreport.js"></ script>
9 <style id="sheet">/**/</style>
10 <script>
11
12 var tests = [
13 [ "@media all, not,{}", "all, not all, not all" , "Media query error #1" ],
14 [ "@media screen, all and f() {}", "screen, not all", "Media query e rror #2" ],
15 [ "@media not and (color), #screen, screen {}", "not all, not all, s creen", "Media query error #3" ],
16 [ "@media all; @media tv {}", "tv", "Media query error #4" ],
17 [ "@media ({ block, }), tv {}", "not all, tv", "Media query error #5 " ],
18 [ "@media screen and(color), tv {}", "not all, tv", "Media query err or #6" ]
19 ];
20 var cdataNode = document.getElementById("sheet").firstChild;
21 for (var i=0; i < tests.length; i++) {
22 cdataNode.data = tests[i][0];
23 if (document.styleSheets[0].cssRules.length > 0 &&
24 document.styleSheets[0].cssRules[0].type == 4) {
25 result = document.styleSheets[0].cssRules[0].media.mediaText;
26 }
27 else {
28 result = "MEDIA RULE DROPPED!";
29 }
30 test(function() {
31 assert_equals(result, tests[i][1]);
32 }, tests[i][2]);
33 }
34 </script>
35 </head>
36 <body>
37 <div id="log"></div>
38 </body>
39 </html>
40
OLDNEW
« no previous file with comments | « LayoutTests/fast/media/media-query-list-01-expected.txt ('k') | LayoutTests/fast/media/media-query-list-syntax-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698