chromium/third_party/blink/web_tests/fragmentation/break-properties.html

<!DOCTYPE html>
<div id="element"></div>
<script src="../resources/js-test.js"></script>
<script>
description("Test parsing and getComputedStyle behavior for break controlling properties");

var tests = [["break-after:always", ["break-after", "auto"], ["-webkit-column-break-after", "auto"], ["page-break-after", "auto"]], // Invalid declaration
	     ["break-after:auto", ["break-after", "auto"], ["-webkit-column-break-after", "auto"], ["page-break-after", "auto"]],
	     ["break-after:avoid", ["break-after", "avoid"], ["-webkit-column-break-after", "avoid"], ["page-break-after", "avoid"]],
	     ["break-after:avoid-column", ["break-after", "avoid-column"], ["-webkit-column-break-after", "avoid"],  ["page-break-after", ""]],
	     ["break-after:avoid-page", ["break-after", "avoid-page"], ["-webkit-column-break-after", ""],  ["page-break-after", ""]],
	     ["break-after:column", ["break-after", "column"], ["-webkit-column-break-after", "always"], ["page-break-after", ""]],
	     ["break-after:left", ["break-after", "left"], ["-webkit-column-break-after", ""],  ["page-break-after", "left"]],
	     ["break-after:page", ["break-after", "page"], ["-webkit-column-break-after", ""], ["page-break-after", "always"]],
	     ["break-after:recto", ["break-after", "recto"], ["-webkit-column-break-after", ""],  ["page-break-after", ""]],
	     ["break-after:right", ["break-after", "right"], ["-webkit-column-break-after", ""],  ["page-break-after", "right"]],
	     ["break-after:verso", ["break-after", "verso"], ["-webkit-column-break-after", ""],  ["page-break-after", ""]],
	     ["break-before:always", ["break-before", "auto"], ["-webkit-column-break-before", "auto"], ["page-break-before", "auto"]], // Invalid declaration
	     ["break-before:auto", ["break-before", "auto"], ["-webkit-column-break-before", "auto"], ["page-break-before", "auto"]],
	     ["break-before:avoid", ["break-before", "avoid"], ["-webkit-column-break-before", "avoid"], ["page-break-before", "avoid"]],
	     ["break-before:avoid-column", ["break-before", "avoid-column"], ["-webkit-column-break-before", "avoid"],  ["page-break-before", ""]],
	     ["break-before:avoid-page", ["break-before", "avoid-page"], ["-webkit-column-break-before", ""],  ["page-break-before", ""]],
	     ["break-before:column", ["break-before", "column"], ["-webkit-column-break-before", "always"], ["page-break-before", ""]],
	     ["break-before:left", ["break-before", "left"], ["-webkit-column-break-before", ""],  ["page-break-before", "left"]],
	     ["break-before:page", ["break-before", "page"], ["-webkit-column-break-before", ""], ["page-break-before", "always"]],
	     ["break-before:recto", ["break-before", "recto"], ["-webkit-column-break-before", ""],  ["page-break-before", ""]],
	     ["break-before:right", ["break-before", "right"], ["-webkit-column-break-before", ""],  ["page-break-before", "right"]],
	     ["break-before:verso", ["break-before", "verso"], ["-webkit-column-break-before", ""],  ["page-break-before", ""]],
	     ["break-inside:auto", ["break-inside", "auto"], ["-webkit-column-break-inside", "auto"], ["page-break-inside", "auto"]],
	     ["break-inside:avoid", ["break-inside", "avoid"], ["-webkit-column-break-inside", "avoid"], ["page-break-inside", "avoid"]],
	     ["break-inside:avoid-column", ["break-inside", "avoid-column"], ["-webkit-column-break-inside", "avoid"], ["page-break-inside", ""]],
	     ["break-inside:avoid-page", ["break-inside", "avoid-page"], ["-webkit-column-break-inside", ""], ["page-break-inside", "avoid"]],
	     ["-webkit-column-break-after:always", ["break-after", "column"], ["-webkit-column-break-after", "always"], ["page-break-after", ""]],
	     ["-webkit-column-break-after:avoid", ["break-after", "avoid"], ["-webkit-column-break-after", "avoid"], ["page-break-after", "avoid"]],
	     ["-webkit-column-break-after:column", ["break-after", "auto"], ["-webkit-column-break-after", "auto"], ["page-break-after", "auto"]], // Invalid declaration
	     ["-webkit-column-break-before:always", ["break-before", "column"], ["-webkit-column-break-before", "always"], ["page-break-before", ""]],
	     ["-webkit-column-break-before:avoid", ["break-before", "avoid"], ["-webkit-column-break-before", "avoid"], ["page-break-before", "avoid"]],
	     ["-webkit-column-break-before:column", ["break-before", "auto"], ["-webkit-column-break-before", "auto"], ["page-break-before", "auto"]], // Invalid declaration
	     ["-webkit-column-break-inside:avoid", ["break-inside", "avoid"], ["-webkit-column-break-inside", "avoid"], ["page-break-inside", "avoid"]],
	     ["-webkit-column-break-before:avoid-column", ["break-before", "auto"], ["-webkit-column-break-before", "auto"], ["page-break-before", "auto"]], // Invalid declaration
	     ["page-break-after:always", ["break-after", "page"], ["-webkit-column-break-after", ""], ["page-break-after", "always"]],
	     ["page-break-after:avoid", ["break-after", "avoid"], ["-webkit-column-break-after", "avoid"], ["page-break-after", "avoid"]],
	     ["page-break-after:left", ["break-after", "left"], ["-webkit-column-break-after", ""], ["page-break-after", "left"]],
	     ["page-break-after:right", ["break-after", "right"], ["-webkit-column-break-after", ""], ["page-break-after", "right"]],
	     ["page-break-after:verso", ["break-after", "auto"], ["-webkit-column-break-after", "auto"], ["page-break-after", "auto"]], // Invalid declaration
	     ["page-break-before:always", ["break-before", "page"], ["-webkit-column-break-before", ""], ["page-break-before", "always"]],
	     ["page-break-before:avoid", ["break-before", "avoid"], ["-webkit-column-break-before", "avoid"], ["page-break-before", "avoid"]],
	     ["page-break-before:left", ["break-before", "left"], ["-webkit-column-break-before", ""], ["page-break-before", "left"]],
	     ["page-break-before:right", ["break-before", "right"], ["-webkit-column-break-before", ""], ["page-break-before", "right"]],
	     ["page-break-before:verso", ["break-before", "auto"], ["-webkit-column-break-before", "auto"], ["page-break-before", "auto"]], // Invalid declaration
	     ["page-break-inside:always", ["break-before", "auto"], ["-webkit-column-break-before", "auto"], ["page-break-before", "auto"]], // Invalid declaration
	     ["page-break-inside:avoid", ["break-inside", "avoid"], ["-webkit-column-break-inside", "avoid"], ["page-break-inside", "avoid"]],
	     [""]];

tests.forEach(function(test) {
    debug(test[0]);
    element.style.cssText = test[0];
    for (var i = 1; i < test.length; i++)
	shouldBeEqualToString("getComputedStyle(element)['"+test[i][0]+"']", test[i][1]);
});
</script>