| <script src="../../resources/js-test-pre.js"></script> |
| <div id="parentDiv" class="parent"> |
| description("Tests inherit and initial on 'alt' CSS property."); |
| var parentDiv = document.getElementById("parentDiv"); |
| var testDiv = document.getElementById("testDiv"); |
| shouldBeEmptyString("parentDiv.style['alt']", ""); |
| shouldBeEqualToString("window.getComputedStyle(parentDiv).getPropertyValue('alt')", '"TestAlt"'); |
| shouldBeEmptyString("testDiv.style['alt']"); |
| evalAndLog("testDiv.style['alt'] = 'inherit'"); |
| shouldBeEqualToString("testDiv.style['alt']", "inherit"); |
| shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('alt')", '"TestAlt"'); |
| evalAndLog("testDiv.style['alt'] = 'initial'"); |
| shouldBeEqualToString("testDiv.style['alt']", "initial"); |
| shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('alt')", `""`); |
| <script src="../../resources/js-test-post.js"></script> |