<!doctype html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test()
{
    let suite = InspectorTest.createAsyncSuite("Console.clearMessages");

    suite.addTestCase({
        name: "CallClearMessages",
        description: "Calling the Console.clearMessages command should trigger Console.messagesCleared.",
        test(resolve, reject) {
            ConsoleAgent.clearMessages();

            WI.logManager.awaitEvent(WI.LogManager.Event.MessageAdded)
            .then((event) => {
                InspectorTest.assert(false, "MessageAdded event should not fire.");
            })
            .then(reject, reject);

            WI.logManager.awaitEvent(WI.LogManager.Event.Cleared)
            .then((event) => {
                InspectorTest.expectThat(event, "Cleared event should fire.");
            })
            .then(resolve, reject);
        }
    });

    suite.runTestCasesAndFinish();
}
</script>
</head>
<body onload="runTest()">
<p>Test for the Console.clearMessages command.</p>
</body>
</html>
