Changeset 64507 in webkit
- Timestamp:
- Aug 2, 2010, 5:00:42 PM (15 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64506 r64507 1 2010-07-30 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Ojan Vafai. 4 5 Remove setNodeToDump from dump-as-markup.js 6 https://bugs.webkit.org/show_bug.cgi?id=43286 7 8 Removed Removed Markup.setNodeToDump, replaced all calls to this method by calls to dump. 9 Because we want need to avoid printing "Dump of markup 1:" when dump is called only once, 10 Markup.dump no longer adds the text on the first call. Instead, it'll insert the text 11 on the second call when the first call didn't have the description. 12 13 * editing/execCommand/create-list-from-range-selection.html: Replaced setNodeToDump by dump 14 * editing/execCommand/hilitecolor.html: Replaced setNodeToDump by dump 15 * editing/execCommand/insert-list-empty-div.html: Replaced setNodeToDump by dump 16 * editing/execCommand/switch-list-type-with-inner-list.html: Replaced setNodeToDump by dump 17 * editing/execCommand/switch-list-type-with-orphaned-li.html: Replaced setNodeToDump by dump 18 * editing/selection/home-inside-noneditable-table.html: Replaced setNodeToDump by dump 19 * editing/style/remove-underline-from-stylesheet.html: Replaced setNodeToDump by dump 20 * resources/dump-as-markup.js: Removed Markup.setNodeToDump. 21 (Markup.dump): 22 (Markup.notifyDone): 23 1 24 2010-08-02 Martin Robinson <mrobinson@igalia.com> 2 25 -
trunk/LayoutTests/editing/execCommand/create-list-from-range-selection.html
r63873 r64507 8 8 s.setBaseAndExtent(start, 2, end, 2); 9 9 document.execCommand("InsertOrderedList", false, ""); 10 Markup. setNodeToDump("test");10 Markup.dump("test"); 11 11 </script> -
trunk/LayoutTests/editing/execCommand/hilitecolor.html
r64013 r64507 15 15 sel.modify("move", "backward", "line"); 16 16 17 Markup. setNodeToDump('test')17 Markup.dump('test') 18 18 </script> -
trunk/LayoutTests/editing/execCommand/insert-list-empty-div.html
r63873 r64507 9 9 10 10 document.execCommand("InsertUnorderedList"); 11 Markup. setNodeToDump("div");11 Markup.dump("div"); 12 12 </script> -
trunk/LayoutTests/editing/execCommand/switch-list-type-with-inner-list.html
r64337 r64507 12 12 <script> 13 13 Markup.description('This tests switching an unordered list with a nested list to an ordered list.'); 14 Markup.setNodeToDump('test');15 14 16 15 var test = document.getElementById('test'); 17 16 window.getSelection().selectAllChildren(test); 18 17 document.execCommand('InsertOrderedList', false, null); 18 19 Markup.dump('test'); 19 20 </script> 20 21 </body> -
trunk/LayoutTests/editing/execCommand/switch-list-type-with-orphaned-li.html
r64337 r64507 15 15 <script> 16 16 Markup.description('This tests switching multiple lists with an orphaned list child to an ordered list.'); 17 Markup.setNodeToDump('test');18 17 19 18 var test = document.getElementById('test'); 20 19 window.getSelection().selectAllChildren(test); 21 20 document.execCommand('InsertOrderedList', false, null); 21 22 Markup.dump('test'); 22 23 </script> 23 24 </body> -
trunk/LayoutTests/editing/selection/focus-contenteditable-iframe-expected.txt
r64495 r64507 1 1 This tests focusing the body element in a contentEditable iframe. The whole body contents should be selected. Focus should only place the cursor at the beginning of the body if there isn't an existing selection. 2 3 Dump of markup 1:4 2 | <html> 5 3 | <head> -
trunk/LayoutTests/editing/selection/home-inside-noneditable-table.html
r63918 r64507 13 13 14 14 Markup.description("Tests whether home moves the caret to the beginning of line inside a content-editable in an uneditable table.") 15 Markup.setNodeToDump('test');16 15 17 16 var s = window.getSelection(); 18 17 s.setPosition(document.getElementById('l1').firstChild, 23); 19 Markup.dump( );18 Markup.dump('test'); 20 19 s.modify("move", "backward", "lineboundary"); 21 Markup.dump( );20 Markup.dump('test'); 22 21 23 22 </script> -
trunk/LayoutTests/editing/style/remove-underline-from-stylesheet.html
r64013 r64507 40 40 <script> 41 41 Markup.description('This tests removing underline from stylesheet (.editing has underline). Because text-decoration that comes from a style rule cannot be pushed down, the underline should stay. (see bug 27809).'); 42 Markup.setNodeToDump('root');43 42 runEditingTest(); 43 Markup.dump('root'); 44 44 </script> 45 45 </body> -
trunk/LayoutTests/resources/dump-as-markup.js
r64303 r64507 36 36 opt_node = document.getElementById(opt_node); 37 37 38 var node = opt_node || Markup._node ||document38 var node = opt_node || document 39 39 var markup = ""; 40 40 41 if (Markup._test_description && !Markup._dumpCalls)42 markup += Markup._test_description + '\n';43 44 41 Markup._dumpCalls++; 45 42 46 // If dump is not called by notifyDone, then print out optional description 47 // because this test is manually calling dump. 48 if (!Markup._done || opt_description) { 43 if (Markup._dumpCalls > 1 || opt_description) { 49 44 if (!opt_description) 50 45 opt_description = "Dump of markup " + Markup._dumpCalls … … 52 47 markup += '\n'; 53 48 markup += '\n' + opt_description + ':\n'; 54 } 49 } else 50 Markup._firstCallDidNotHaveDescription = true; 55 51 56 52 markup += Markup.get(node); … … 59 55 Markup._container = document.createElement('pre'); 60 56 Markup._container.style.width = '100%'; 57 } 58 59 if (Markup._dumpCalls == 2 && Markup._firstCallDidNotHaveDescription) { 60 var wrapper = Markup._container.getElementsByClassName('dump-as-markup-span')[0]; 61 wrapper.insertBefore(document.createTextNode('\nDump of markup 1:\n'), wrapper.firstChild); 61 62 } 62 63 … … 73 74 } 74 75 75 Markup._container.appendChild(document.createTextNode(markup)); 76 if (Markup._test_description && Markup._dumpCalls == 1) 77 Markup._container.appendChild(document.createTextNode(Markup._test_description + '\n')) 78 79 var wrapper = document.createElement('span'); 80 wrapper.className = 'dump-as-markup-span'; 81 wrapper.appendChild(document.createTextNode(markup)); 82 Markup._container.appendChild(wrapper); 76 83 } 77 84 … … 90 97 { 91 98 // Need to waitUntilDone or some tests won't finish appending the markup before the text is dumped. 92 layoutTestController.waitUntilDone();93 Markup._done = true;99 if (window.layoutTestController) 100 layoutTestController.waitUntilDone(); 94 101 95 102 // If dump has already been called, don't bother to dump again … … 107 114 if (window.layoutTestController) 108 115 layoutTestController.notifyDone(); 109 }110 111 Markup.setNodeToDump = function(node)112 {113 if (typeof node == "string")114 node = document.getElementById(node);115 Markup._node = node116 116 } 117 117
Note:
See TracChangeset
for help on using the changeset viewer.