/*
* These rules should get dropped due to syntax errors. The script
* below tests that the 25% rule following them is at cssRules[1].
*/
from, { margin-left: 0 }
from , { margin-left: 0 }
, from { margin-left: 0 }
,from { margin-left: 0 }
from from { margin-left: 0 }
from, 1 { margin-left: 0 }
1 { margin-left: 0 }
1, from { margin-left: 0 }
from, 1.0 { margin-left: 0 }
1.0 { margin-left: 0 }
1.0, from { margin-left: 0 }
is(bounce.findRule("75%"), null, "findRule should match all keys");
is(bounce.findRule("85%, 75%"), null, "findRule should match all keys in order");
is(bounce.findRule("75%,85%"), bounce.cssRules[2], "findRule should match all keys in order, parsed");
is(bounce.findRule("to"), bounce.cssRules[3], "findRule should match keys as parsed");
is(bounce.findRule("100%"), bounce.cssRules[3], "findRule should match keys as parsed");
is(bounce.findRule("100%, 100%"), null, "findRule should match key list");
is(bounce.findRule("100%,"), null, "findRule should fail when given bad selector");
is(bounce.findRule(",100%"), null, "findRule should fail when given bad selector");
is(bounce.cssRules.length, 4, "length of css rules");
bounce.deleteRule("85%");
is(bounce.cssRules.length, 4, "deleteRule should match all keys");
bounce.deleteRule("85%, 75%");
is(bounce.cssRules.length, 4, "deleteRule should match key list");
bounce.deleteRule("75% ,85%");
is(bounce.cssRules.length, 3, "deleteRule should match keys in order, parsed");
bounce.deleteRule("0%");
is(bounce.cssRules.length, 2, "deleteRule should match keys in order, parsed");
bounce.appendRule("from { color: blue }");
is(bounce.cssRules.length, 3, "appendRule should append");
is(bounce.cssRules[2].keyText, "0%", "appendRule should append");
bounce.appendRule("from { color: blue }");
is(bounce.cssRules.length, 4, "appendRule should append");
is(bounce.cssRules[3].keyText, "0%", "appendRule should append");
bounce.appendRule("from { color: blue } to { color: green }");
is(bounce.cssRules.length, 4, "appendRule should ignore garbage at end");
</script>
</pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.