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

Side by Side Diff: LayoutTests/css-parser/at-rule-in-declaration-list.html

Issue 1053953002: CSS Parser: Handle at-rules in declaration lists (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | Source/core/css/parser/CSSParserImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <style>
6 div {
7 margin: 10px;
8 border: 10px solid green;
9 width: 80px;
10 height: 80px;
11 background: red;
12 }
13 #a { @some at-rule; background: green; }
14 #b { @at-rule yay { } background: green; }
15 #c, #d {
16 background: green;
17 border-color: red;
18 }
19 #c {
20 not-an-at-rule { }
21 background: red;
22 border-color: green;
23 }
24 #d {
25 #also-not-an-at-rule { }
26 background: red;
27 border-color: green;
28 }
29 </style>
30
31 <div id=a></div>
32 <div id=b></div>
33 <div id=c></div>
34 <div id=d></div>
35 <div id=e></div>
36
37 <script>
38 test(function(){
39 assert_equals(getComputedStyle(a).backgroundColor, "rgb(0, 128, 0)");
40 }, "Declarations allowed after semicolon-terminated at-rules in declaration list ");
41 test(function(){
42 assert_equals(getComputedStyle(b).backgroundColor, "rgb(0, 128, 0)");
43 }, "Declarations allowed after at-rules with an associated block in declaration list");
44 test(function(){
45 assert_equals(getComputedStyle(c).backgroundColor, "rgb(0, 128, 0)");
46 assert_equals(getComputedStyle(c).borderColor, "rgb(0, 128, 0)");
47 assert_equals(getComputedStyle(d).backgroundColor, "rgb(0, 128, 0)");
48 assert_equals(getComputedStyle(d).borderColor, "rgb(0, 128, 0)");
49 }, "Error recovery looks for semicolon and not block end");
50 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/CSSParserImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698