Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / elements / styles / parse-stylesheet-errors.html
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script src="styles-test.js"></script>
6 <script>
7
8 function test()
9 {
10     WebInspector.showPanel("elements");
11
12     InspectorTest.waitForStylesheetsOnFrontend(14, headersCallback);
13
14     function headersCallback(headers)
15     {
16         for (var i = 0; i < headers.length; ++i)
17             CSSAgent.getStyleSheet(headers[i].id, styleSheetCallback.bind(null, i === headers.length - 1));
18     }
19
20     function styleSheetCallback(isLast, error, styleSheet)
21     {
22         if (error) {
23             InspectorTest.addResult("Error loading stylesheet body: " + error);
24             InspectorTest.completeTest();
25             return;
26         }
27
28         InspectorTest.dumpRulesArray(styleSheet.rules);
29         if (isLast)
30             InspectorTest.completeTest();
31     }
32 }
33
34 </script>
35
36 <style>
37 body {
38     color: black;
39 }
40
41 font-family: serif;
42 }
43
44 body:hover {
45     color: #CDE;
46 }
47
48 body {
49     background-color: broken-declaration;
50 }
51
52 </style>
53 <style>
54 @import 12;
55 body {
56     color: import-error;
57 }
58 </style>
59 <style>
60 @import 12 {}
61 body {
62     color: import-error-block;
63 }
64 </style>
65 <style>
66 @media ;
67 body {
68     color: media-empty;
69 }
70 </style>
71 <style>
72 @page ;
73 body {
74     color: page-error;
75 }
76 </style>
77 <style>
78 @page {}
79 body {
80     color: page-block;
81 }
82 </style>
83 <style>
84 body {
85     color: before-import;
86 }
87 @import "foo";
88 body {
89     color: after-import;
90 }
91 </style>
92 <style>
93 body {
94     color: before-viewport;
95 }
96 @viewport {
97 }
98 body {
99     color: after-viewport;
100 }
101 </style>
102 <style>
103 @font-face {
104     font-family: initial;
105 }
106 body {
107     color: after-invalid-font-face;
108 }
109 </style>
110 <style>
111 @-webkit-region %^% {
112 }
113 body {
114     color: after-invalid-region;
115 }
116 </style>
117 <style>
118 body {
119   margin-left: 1px;
120   #;
121   margin-left: 2px;
122 }
123 </style>
124 <style>
125 body {
126   margin-right: 1px;
127   {};
128   margin-right: 2px;
129 }
130 </style>
131 <style>
132 body {
133   #;
134   margin-top: 1px;
135 }
136 </style>
137 <style>
138 body {
139   {};
140   margin-bottom: 2px;
141 }
142 </style>
143 </head>
144
145 <body onload="runTest()">
146 <p>
147 Tests that CSSParser produces source data consistent with CSSOM when parsing broken stylesheets. <a href="https://bugs.webkit.org/show_bug.cgi?id=98246">Bug 98246</a>
148 </body>
149 </html>