<!DOCTYPE html>
<html>
<body>
<script src="/js-test-resources/js-test.js"></script>
<script>
description("Tests that trying to set an event listener for deviceorientation and deviceorientation logs an error in non-secure contexts.");
jsTestIsAsync = true;

// localhost is secure by default.
internals.markContextAsInsecure();

let lastConsoleMessage = null;
internals.setConsoleMessageListener((message) => {
    lastConsoleMessage = message;
});

function runDeviceMotionTest()
{
    if (!window.DeviceMotionEvent) {
        console.log("Device Motion API is not supported");
        finishJSTest();
        return;
    }

    lastConsoleMessage = null;
    debug("");
    debug("* Registering device motion listener");
    addEventListener("devicemotion", function() { });
    internals.postTask(() => {
        shouldBeEqualToString("lastConsoleMessage", "No device motion events will be fired, reason: Browsing context is not secure.");
        finishJSTest();
    });
}

function runDeviceOrientationTest()
{
    if (!window.DeviceOrientationEvent) {
        console.log("Device Orientation API is not supported");
        runDeviceMotionTest();
        return;
    }

    lastConsoleMessage = null;
    debug("* Registering device orientation listener");
    addEventListener("deviceorientation", function() { });
    internals.postTask(() => {
        shouldBeEqualToString("lastConsoleMessage", "No device orientation events will be fired, reason: Browsing context is not secure.");
        runDeviceMotionTest();
    });
}

onload = runDeviceOrientationTest;
</script>
</body>
</html>
