| <script src="../media-file.js"></script> |
| <script src="controls-test-helpers.js"></script> |
| var tester = new ControlsTest("non-existent-media-file", "error") |
| currentState = tester.currentState; |
| tester.test("We are using the apple idiom") |
| .value(currentState.idiom) |
| tester.startNewSection("Get the status label state"); |
| var statusDisplayLabelState = tester.stateForControlsElement("Status Display"); |
| tester.test("Name is 'Status Display'") |
| .value(statusDisplayLabelState.name) |
| .isEqualTo("Status Display"); |
| tester.test("Has empty class") |
| .value(statusDisplayLabelState.className) |
| tester.test("Content is 'Error'") |
| .value(statusDisplayLabelState.textContent) |
| tester.test("CSS display: block") |
| .value(statusDisplayLabelState.computedStyle.display) |
| tester.test("Displayed bounds is non-zero") |
| .value(statusDisplayLabelState.bounds.width) |
| <p>This tests that the status display has the corrent error message.</p> |
| <p>This test only runs in DRT!</p> |