8 function setupBlock(description
, style
)
10 var descriptionBlock
= document
.createElement("b");
11 descriptionBlock
.innerHTML
= description
;
12 document
.body
.appendChild(descriptionBlock
);
14 var block
= document
.createElement("div");
16 block
.setAttribute("style", style
);
17 block
.innerHTML
= document
.getElementById("template").innerHTML
;
18 document
.body
.appendChild(block
);
25 setupBlock("Default tab size (8).", null);
26 setupBlock("Tab size = -10, should fall back to the default.", "tab-size: -10;");
27 setupBlock("Tab size = 2.", "tab-size: 2;");
29 var dynamicBlock
= setupBlock("Tab size becomes 2 dynamically.", null);
31 if (window
.testRunner
)
32 testRunner
.waitUntilDone();
33 window
.setTimeout(function() {
34 dynamicBlock
.style
.setProperty("tab-size", "2");
35 if (window
.testRunner
)
36 testRunner
.notifyDone();
41 <body onload=
"test();">
42 <div id=
"template" style=
"display:none;">
44 <pre>		x
</pre>
45 <pre>	x
	x
</pre>
46 <pre>xx
	xx
	x
</pre>
47 <pre>xxxxxxxxx
	xx
	x
</pre>