| Index: LayoutTests/http/tests/accessibility/slow-document-load.html
|
| diff --git a/LayoutTests/http/tests/accessibility/slow-document-load.html b/LayoutTests/http/tests/accessibility/slow-document-load.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..77e2072765fb787b83c32ce9379ad9fb82fa3890
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/accessibility/slow-document-load.html
|
| @@ -0,0 +1,40 @@
|
| +<!DOCTYPE html>
|
| +<head>
|
| +<title>Accessibility: slow document load</title>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +
|
| +<div id="console"></div>
|
| +
|
| +<script>
|
| +description("This tests that accessibility events will be fired after the first layout, rather than only after the document loads.");
|
| +window.jsTestIsAsync = true;
|
| +
|
| +if (window.testRunner && window.accessibilityController) {
|
| + testRunner.dumpAsText();
|
| +
|
| + startTime = new Date();
|
| + gotLayoutCompleteBeforeOneSecond = false;
|
| +
|
| + accessibilityController.addNotificationListener(function (target, notification) {
|
| + elapsedTime = new Date() - startTime;
|
| + if (notification == "LayoutComplete" && elapsedTime < 1000) {
|
| + gotLayoutCompleteBeforeOneSecond = true;
|
| + }
|
| +
|
| + if (notification == "LoadComplete") {
|
| + accessibilityController.removeNotificationListener();
|
| + shouldBeGreaterThanOrEqual("elapsedTime", "1000");
|
| + shouldBeTrue("gotLayoutCompleteBeforeOneSecond");
|
| + finishJSTest();
|
| + }
|
| + });
|
| +}
|
| +</script>
|
| +
|
| +<!-- This is a cgi script that waits 1 second before loading. -->
|
| +<script src="slow-loading-script.cgi"></script>
|
| +
|
| +</body>
|
| +</html>
|
|
|