| function print(message, color) |
| var paragraph = document.createElement("div"); |
| paragraph.appendChild(document.createTextNode(message)); |
| paragraph.style.fontFamily = "monospace"; |
| paragraph.style.color = color; |
| document.getElementById("console").appendChild(paragraph); |
| print("PASS: " + a + " should be " + b + " and is.", "green"); |
| print("FAIL: " + a + " should be " + b + " but instead is " + evalA + ".", "red"); |
| document.getElementById('sel').options[1].selected = true; |
| shouldBe("document.getElementById('sel').options.selectedIndex", 1); |
| shouldBe("document.getElementById('sel').options[1].selected", true); |
| document.getElementById('sel').options[1].text = "PASS"; |
| shouldBe("document.getElementById('sel').options[1].text", "PASS"); |
| <p>This page tests setting 'selected' and 'text' on an option element. See <a href="https://bugs.webkit.org/show_bug.cgi?id=9095">https://bugs.webkit.org/show_bug.cgi?id=9095</a>.</p> |
| <p>If the test passes, you'll see a series of 'PASS' messages below.</p> |
| <option value='bad'>FAIL</option> |
| <option value='good'>FAIL</option> |