chromium/third_party/blink/web_tests/fast/dom/focus-contenteditable.html

<html>
<head>
<script>
var result;
var pass1;
var pass2;
var pass3;
var exceptions;

    function focusIt() {
        pass1 = true;
        pass2 = true;
        pass3 = false;
        exceptions = "";
        
        try {
            document.getElementById('mydiv').focus();
        } catch(e) {
            exceptions += "Exception: " + e + "\n";
            pass1 = false;
        }
        
        try {
            document.getElementById('result').focus();
        } catch(e) {
            exceptions += "Exception: " + e + "\n";
            pass2 = true;
        }
        
        if (pass1 && pass2 && pass3) {
            result = "Test Passed.";
        } else {
            result = "Test Failed.";
        }
        
        document.getElementById('result').innerHTML = result;
        document.getElementById('exc').innerHTML = exceptions;
    }
</script>
</head>
<body onload="focusIt()">
This test will try to call focus() on a contenteditable div, and then a normal div.  
<br>The window should scroll to reveal the contenteditable div.
<div style="width:500px;height:800px"></div>
<div id="mydiv" onfocus="pass3 = true;" style="border-style:solid" contenteditable>contentEditable div</div>
<div id="result"></div>
<div id="exc"></div>
</body>
</html>