Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / autoclose-braces-and-parentheses.html
blob195ab4e8a7908c0a490a93e9f8937c758b27c598
1 <!DOCTYPE HTML>
2 <style>
3 .test1 {
4 width: 1px;
5 width: calc(100px
6 </style>
7 <style>
8 .test2 {
9 width: 1px;
10 width: calc((((((100px
11 </style>
12 <style>
13 @media all {
14 .test3 {
15 width: 1px;
16 width: calc(100px
17 </style>
18 <body>
19 <div>Tests parsing style declarations without closing braces and parentheses. &quot;User agents must close all open constructs ... at the end of the style sheet.&quot;
20 (<a href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors">http://www.w3.org/TR/CSS21/syndata.html#parsing-errors</a>). So it must be parsed as if
21 all braces and parentheses are closed.</div>
22 <div id="console"></div>
23 <script>
24 if (window.testRunner)
25 testRunner.dumpAsText();
27 var NUMBER_OF_TESTS = 3;
28 var failed = false;
29 var consoleElement = document.getElementById("console");
30 for (var i = 1; i <= NUMBER_OF_TESTS; i++) {
31 var div = document.createElement("DIV");
32 div.className = "test" + i;
33 document.body.appendChild(div);
34 var width = window.getComputedStyle(div).getPropertyValue("width");
35 document.body.removeChild;
37 if (width != "100px") {
38 consoleElement.textContent += "Test " + i + " failed\n";
39 failed = true;
42 if (!failed) {
43 consoleElement.textContent += "All tests passed\n";
45 </script>
46 </body>