Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / blur-contenteditable.html
blob153db29a362adc4af6d362ddfb6142d09042c84d
1 <html>
2 <head>
3 <script>
4 var result;
5 var pass1;
6 var pass2;
7 var pass3;
8 var exceptions;
10 function blurIt() {
11 pass1 = true;
12 pass2 = true;
13 pass3 = false;
14 exceptions = "";
15 try {
16 document.getElementById('mydiv').focus();
17 document.getElementById('mydiv').blur();
18 } catch(e) {
19 exceptions += "Exception: " + e + "\n";
20 pass1 = false;
23 try {
24 document.getElementById('result').blur();
25 } catch(e) {
26 exceptions += "Exception: " + e + "\n";
27 pass2 = false;
30 if (pass1 && pass2 && pass3) {
31 result = "Test Passed.";
32 } else {
33 result = "Test Failed.";
36 document.getElementById('result').innerHTML = result;
37 document.getElementById('exc').innerHTML = exceptions;
39 </script>
40 </head>
41 <body onload="blurIt()">
42 This test will try to call blur() on a contenteditable div, and then a normal div.
43 <div id="mydiv" onblur="pass3 = true;" style="border-style:solid" contenteditable>contentEditable div</div>
44 <div id="result"></div>
45 <div id="exc"></div>
46 </body>
47 </html>