<head>
    <script src="../../resources/js-test-pre.js"></script>
    <script>
        if (window.testRunner)
            testRunner.dumpAsText();


    </script>
</head>
<body style="text-decoration: underline; border-top-color: green">
    <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>
    <div id="console"></div>
    <script>
        shouldBe("document.body.style.length", "2");
        shouldBeTrue("'0' in document.body.style");
        shouldBeTrue("'1' in document.body.style");
        shouldBeTrue("'textDecoration' in document.body.style");
        shouldBeTrue("'borderTopColor' in document.body.style");
        shouldBeTrue("'border' in document.body.style");
        shouldBeTrue("'font' in document.body.style");
        shouldBeTrue("'webkitTransform' in document.body.style");
        shouldBeTrue("'WebkitTransform' in document.body.style");
        shouldBeFalse("'bogus-random-String' in document.body.style");
        shouldBeTrue("'cssText' in document.body.style");
        shouldBeTrue("'getPropertyCSSValue' in document.body.style");

        // Test CSS property order.
        var started;
        var cssPropertyCount = 0;
        var previous;
        var seenFilter;
        for (var p in document.body.style) {
            if (p === "alignmentBaseline")
                started = true;
            if (!started)
                continue;
            if (p === "filter")
                seenFilter = true;
            if (previous && previous >= p) {
                testFailed("Invalid CSS-mapped property order: '" + p + "' after '" + previous + "'");
                break;
            }
            if (++cssPropertyCount <= 103)
                previous = p;
            else {
                if (seenFilter)
                    testPassed("The CSS property order is correct");
                else
                    testFailed("The 'filter' property was not enumerated");
                break;
            }
        }
    </script>
    <script src="../../resources/js-test-post.js"></script>
</body>
