Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: LayoutTests/editing/selection/contains-node-cleared-document.html

Issue 212873002: Remove Selection.containsNode assertion that is not valid. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make test slightly smaller. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698