12 background-color: red;
20 var writeLog = function (msg)
22 var results = document.getElementById('results');
23 results.innerHTML += msg + '<br>';
26 var clickElement = function (element) {
28 var detail = document.getElementById("details" + element);
29 var old = detail.open;
31 eventSender.mouseDown();
32 eventSender.mouseUp();
34 if (old !== detail.open) {
35 writeLog("details" + element + "'s open attribute is expected to be'" + !old + "' and is.");
37 writeLog("details" + element + "'s open attribute is expected to be'" + !old + "' but instead is '" + old + "'.");
42 var testElement = function (element) {
45 eventSender.mouseMoveTo(2, 2);
48 eventSender.mouseMoveTo(2, 158);
51 eventSender.mouseMoveTo(2, 162);
54 eventSender.mouseMoveTo(198, 242);
58 clickElement(element);
59 clickElement(element);
62 var runTests = function () {
64 if (!window.layoutTestController || !window.eventSender)
67 layoutTestController.dumpAsText();
74 writeLog(error ? "FAIL" : "PASS");
81 <body onload="runTests()">
83 <div style="-webkit-writing-mode:horizontal-tb;">
84 <details id="details0"><input></details>
87 <div style="-webkit-writing-mode:horizontal-bt;">
88 <details id="details1"><input></details>
91 <div style="-webkit-writing-mode:vertical-lr;">
92 <details id="details2"><input></details>
95 <div style="-webkit-writing-mode:vertical-rl;">
96 <details id="details3"><input></details>