1 function testComputedStyle(ancestorValue, childValue)
3 shouldBe("window.getComputedStyle(ancestor).getPropertyValue('text-indent')", "'" + ancestorValue + "'");
4 shouldBe("window.getComputedStyle(child).getPropertyValue('text-indent')", "'" + childValue + "'");
8 function ownValueTest(ancestorValue, childValue)
10 debug("Value of ancestor is '" + ancestorValue + "', while child is '" + childValue + "':");
11 ancestor.style.textIndent = ancestorValue;
12 child.style.textIndent = childValue;
13 testComputedStyle(ancestorValue, childValue);
16 function inheritanceTest(ancestorValue)
18 debug("Value of ancestor is '" + ancestorValue + "':");
19 ancestor.style.textIndent = ancestorValue;
20 testComputedStyle(ancestorValue, ancestorValue);
23 description("This test checks that the value of text-indent is properly inherited to the child.");
25 ancestor = document.getElementById('ancestor');
26 child = document.getElementById('child');
28 inheritanceTest("10px");
29 inheritanceTest("10px each-line");
30 inheritanceTest("10px hanging");
31 inheritanceTest("10px each-line hanging");
33 ownValueTest("10px each-line", "10px");
34 ownValueTest("10px hanging", "10px");
35 ownValueTest("10px each-line hanging", "10px");