30 lines
983 B
HTML
30 lines
983 B
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<style>
|
|
input { background: red; }
|
|
button { background: red; }
|
|
:default { background: lime; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p id="description"></p>
|
|
<form method="get">
|
|
<input name="victim" type="submit" value="Submit" />
|
|
<input name="victim" type="submit" value="Submit"/>
|
|
<button name="victim" type="submit"/>Submit</button>
|
|
</form>
|
|
<div id="console"></div>
|
|
<script>
|
|
description("This test performs a check for the :default CSS selector on multiple submit buttons.");
|
|
|
|
v = document.getElementsByName("victim");
|
|
shouldBe("document.defaultView.getComputedStyle(v[0], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");
|
|
for (i = 1; i < v.length; i++)
|
|
shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|