| <script src="../../resources/js-test-pre.js"></script> |
| description("Tests caching of result of NamedNodeMap named property getter"); |
| var bodyAttributes = document.body.attributes; |
| shouldBe("bodyAttributes.class", "undefined"); |
| var lastIterationHasRightValue = false; |
| for (var i = 0; i < 1000; i++) { |
| document.body.setAttribute('class', 'test'); |
| if (bodyAttributes.class != undefined) { |
| lastIterationHasRightValue = true; |
| testFailed("The body element should NOT have a 'class' attribute set"); |
| shouldBeTrue("lastIterationHasRightValue"); |
| <script src="../../resources/js-test-post.js"></script> |