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

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

Issue 14620012: Improved parse error handling for CSSMQ. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@query-selector-performance
Patch Set: Let expected result for "and(" be the current implementation. 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
(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 {}", "screen and (color), tv", "Medi a query error #6" ],
19 [ "@media all and (color) and (f() {}), tv {}", "not all, tv", "Medi a query error #7" ]
20 ];
21 var cdataNode = document.getElementById("sheet").firstChild;
22 for (var i=0; i < tests.length; i++) {
23 cdataNode.data = tests[i][0];
24 if (document.styleSheets[0].cssRules.length > 0 &&
25 document.styleSheets[0].cssRules[0].type == 4) {
26 result = document.styleSheets[0].cssRules[0].media.mediaText;
27 }
28 else {
29 result = "MEDIA RULE DROPPED!";
30 }
31 test(function() {
32 assert_equals(result, tests[i][1]);
33 }, tests[i][2]);
34 }
35 </script>
36 </head>
37 <body>
38 <div id="log"></div>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/media/import-media-01-expected.html ('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