Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: LayoutTests/http/tests/accessibility/slow-document-load.html

Issue 199693003: Send AXLayoutComplete even when document hasn't finished loading yet (reland) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/accessibility/slow-document-load-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/http/tests/accessibility/slow-document-load-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698