<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script>
var successfullyParsed = false;
</script>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body id="body">

<h1 tabindex=0 id="h1">H1</h1>
<h2 tabindex=0 id="h2">H2</h2>

<p id="description"></p>
<div id="console"></div>

<script>

    description("This tests that notifications are fired for focus changes");

    var focusChangeCount = 0;
    var rootElement = 0;
    function focusCallback(notification) {
        if (notification == "AXFocusChanged") {
            focusChangeCount++;

            // We should get a total of 2 focus changes.
            if (focusChangeCount == 2) {
               rootElement.removeNotificationListener();
               window.testRunner.notifyDone();
            }
        }
    }

    if (window.accessibilityController) {
        // Make sure AX gets turned on.
        rootElement = accessibilityController.rootElement;
        window.testRunner.waitUntilDone();

        var addedNotification = rootElement.addNotificationListener(focusCallback);
        shouldBe("addedNotification", "true");

        // Switch focus from h1.
        document.getElementById("h2").focus();
        // Cause focus change to be sent to h1.
        document.getElementById("h1").focus();

    }

    successfullyParsed = true;
</script>

<script src="../../../resources/js-test-post.js"></script>
</body>
</html>
