OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <html> |
2 <html style="display: inline-table"> | |
3 <script> | 2 <script> |
4 if (window.testRunner) | 3 if (window.testRunner) |
5 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
6 | 5 |
7 window.onload = function() { | 6 window.onload = function() { |
8 var selection = window.getSelection(); | 7 var selection = window.getSelection(); |
9 selection.selectAllChildren(document); | 8 selection.selectAllChildren(document); |
10 selection.collapseToEnd(); | 9 selection.collapseToEnd(); |
11 var element = document.activeElement; | 10 var element = document.activeElement; |
11 var parent = element.parentNode; | |
Yuta Kitamura
2014/03/27 01:21:12
|parent| is not used; is this necessary?
Mads Ager (chromium)
2014/03/27 13:52:44
Yes, that is actually what is causing the issue he
| |
12 document.open(); | 12 document.open(); |
13 document.write("Pass. Test didn't crash."); | 13 if (selection.containsNode(element,true)) |
Yuta Kitamura
2014/03/27 01:21:12
nit: space after comma
Mads Ager (chromium)
2014/03/27 13:52:44
Thanks, done.
| |
14 document.write("FAIL: selection.containsNode should return false"); | |
15 else | |
16 document.write("PASS"); | |
14 document.close(); | 17 document.close(); |
15 selection.containsNode(element,true); | |
16 } | 18 } |
17 </script> | 19 </script> |
18 </html> | 20 </html> |
OLD | NEW |