<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
    <script src="../../../resources/ui-helper.js"></script>
    <style>
    body, html {
        margin: 0;
        width: 100%;
        height: 100%;
    }

    input {
        font-size: 16px;
    }
    </style>
    <script>
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
    }

    addEventListener("load", async () => {
        const field = document.getElementById("field");

        await UIHelper.setKeyboardInputModeIdentifier("he_IL");
        await UIHelper.activateElementAndWaitForInputSession(field);
        document.write(`The text field direction is: '${field.dir}'`);
        field.blur();
        await UIHelper.waitForKeyboardToHide();
        testRunner.notifyDone();
    });
    </script>
</head>
<body>
    <p>Verifies that focusing an editable area with an RTL keyboard does not switch text direction to RTL in a non-editable web view.
    To test manually, switch to a Hebrew keyboard and focus the editable area in Safari.
    The editable area should not be made RTL.</p>
    <input type="text" id="field"></input>
</body>
</html>
