| 1 |
wakaba |
1.1 |
<!DOCTYPE HTML> |
| 2 |
|
|
<html> |
| 3 |
|
|
<head> |
| 4 |
|
|
<title>.setAtribute ('style', invalid-css)</title> |
| 5 |
|
|
</head> |
| 6 |
|
|
<body> |
| 7 |
|
|
<p id=result class=FAIL>FAIL (noscript)</p> |
| 8 |
|
|
<p id=test></p> |
| 9 |
|
|
<script> |
| 10 |
|
|
var r = document.getElementById ('result'); |
| 11 |
|
|
r.firstChild.data = 'FAIL (script error)'; |
| 12 |
|
|
var t = document.getElementById ('test'); |
| 13 |
|
|
t.setAttribute ('style', 'invalid-css'); |
| 14 |
|
|
var v = t.style.cssText; |
| 15 |
|
|
if (v == '') { |
| 16 |
|
|
r.firstChild.data = 'PASS'; |
| 17 |
|
|
r.className = 'PASS'; |
| 18 |
|
|
} else { |
| 19 |
|
|
r.firstChild.data = 'FAIL (' + typeof (v) + ', ' + v + ')'; |
| 20 |
|
|
} |
| 21 |
|
|
</script> |
| 22 |
|
|
</body> |
| 23 |
|
|
</html> |