Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / style-enumerate-properties.html
blob6d1cd22c21a280435017ed70b149ccb265ea759f
1 <head>
2 <script src="../../resources/js-test.js"></script>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
8 </script>
9 </head>
10 <body style="text-decoration: underline; border-top-color: green">
11 <div id="description">This test makes sure that CSSStyleDeclaration enumerates JavaScript properties for defined and non-defined CSS properties, indexed properties, and properties defined on the prototype. See <a href="https://bugs.webkit.org/show_bug.cgi?id=23946">Bug 23946</a>.</div>
12 <div id="console"></div>
13 <script>
14 shouldBe("document.body.style.length", "4");
15 shouldBeTrue("'0' in document.body.style");
16 shouldBeTrue("'1' in document.body.style");
17 shouldBeTrue("'textDecoration' in document.body.style");
18 shouldBeTrue("'textDecorationLine' in document.body.style");
19 shouldBeTrue("'textDecorationStyle' in document.body.style");
20 shouldBeTrue("'textDecorationColor' in document.body.style");
21 shouldBeTrue("'borderTopColor' in document.body.style");
22 shouldBeTrue("'border' in document.body.style");
23 shouldBeTrue("'font' in document.body.style");
24 shouldBeTrue("'webkitTransform' in document.body.style");
25 shouldBeTrue("'WebkitTransform' in document.body.style");
26 shouldBeFalse("'bogus-random-String' in document.body.style");
27 shouldBeTrue("'cssText' in document.body.style");
29 // Test CSS property order.
30 var started;
31 var cssPropertyCount = 0;
32 var previous;
33 var seenFilter;
34 for (var p in document.body.style) {
35 if (p === "alignmentBaseline")
36 started = true;
37 if (!started)
38 continue;
39 if (p === "filter")
40 seenFilter = true;
41 if (previous && previous >= p) {
42 testFailed("Invalid CSS-mapped property order: '" + p + "' after '" + previous + "'");
43 break;
45 if (++cssPropertyCount <= 100)
46 previous = p;
47 else {
48 if (seenFilter)
49 testPassed("The CSS property order is correct");
50 else
51 testFailed("The 'filter' property was not enumerated");
52 break;
55 </script>
56 </body>