Bug 26336

Summary: Some test cases in LayoutTests/editing/execCommand ought to use dumpAsText tests instead
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: jparent, oliver
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fixes the bug. Most of test cases now use a dumpAsText test.
eric: review-
converts 4916583.html 5119244.html 5120591.html
eric: review+
converts 5142012-3.html 5144139-1.html 5164796.html
eric: review+
converts 5207369.html 5210032.html 5432254-1.html
none
converts 5432254-2.html 5700414-1.html 5700414-2.html
none
converts find-after-replace.html findString-2.html insert-list-and-stitch.html
none
converts insertHTML.html paste-1.html paste-2.html
none
converts remove-list-1.html remove-list-items.html switch-list-type.html
none
converts 4916583.html 5119244.html 5120591.html
none
converts 4916583.html 5119244.html 5120591.html
eric: review+
converts 5142012-3.html 5144139-1.html 5164796.html
eric: review+
converts 5207369.html 5210032.html 5432254-1.html
eric: review+
converts 5432254-2.html 5700414-1.html 5700414-2.html
eric: review-
converts find-after-replace.html findString-2.html insert-list-and-stitch.html
eric: review-
converts insertHTML.html switch-list-type.html
eric: review+
converts paste-1.html paste-2.html
eric: review-
converts remove-list-1.html remove-list-items.html
eric: review-
converts 5432254-2.html 5700414-1.html 5700414-2.html
eric: review+
converts find-after-replace.html findString-2.html insert-list-and-stitch.html
none
converts paste-1.html paste-2.html
none
converts remove-list-1.html remove-list-items.html
none
converts paste-1.html paste-2.html
eric: review-
converts find-after-replace.html findString-2.html insert-list-and-stitch.html eric: review-

Ryosuke Niwa
Reported 2009-06-11 17:13:53 PDT
Some test cases in /LayoutTests/editing/execCommand are using a pixel test when a simple dumpAsText test would suffice the purpose. This slows down the LayoutTexts considerably.
Attachments
Fixes the bug. Most of test cases now use a dumpAsText test. (179.01 KB, patch)
2009-06-11 17:42 PDT, Ryosuke Niwa
eric: review-
converts 4916583.html 5119244.html 5120591.html (15.96 KB, patch)
2009-06-16 15:37 PDT, Ryosuke Niwa
eric: review+
converts 5142012-3.html 5144139-1.html 5164796.html (19.13 KB, patch)
2009-06-16 15:38 PDT, Ryosuke Niwa
eric: review+
converts 5207369.html 5210032.html 5432254-1.html (19.76 KB, patch)
2009-06-16 15:38 PDT, Ryosuke Niwa
no flags
converts 5432254-2.html 5700414-1.html 5700414-2.html (19.76 KB, patch)
2009-06-16 15:39 PDT, Ryosuke Niwa
no flags
converts find-after-replace.html findString-2.html insert-list-and-stitch.html (30.87 KB, patch)
2009-06-16 15:39 PDT, Ryosuke Niwa
no flags
converts insertHTML.html paste-1.html paste-2.html (34.16 KB, patch)
2009-06-16 15:40 PDT, Ryosuke Niwa
no flags
converts remove-list-1.html remove-list-items.html switch-list-type.html (49.58 KB, patch)
2009-06-16 15:41 PDT, Ryosuke Niwa
no flags
converts 4916583.html 5119244.html 5120591.html (505 bytes, patch)
2009-06-17 14:24 PDT, Ryosuke Niwa
no flags
converts 4916583.html 5119244.html 5120591.html (15.56 KB, patch)
2009-06-17 14:29 PDT, Ryosuke Niwa
eric: review+
converts 5142012-3.html 5144139-1.html 5164796.html (18.74 KB, patch)
2009-06-17 14:30 PDT, Ryosuke Niwa
eric: review+
converts 5207369.html 5210032.html 5432254-1.html (19.36 KB, patch)
2009-06-17 14:32 PDT, Ryosuke Niwa
eric: review+
converts 5432254-2.html 5700414-1.html 5700414-2.html (14.76 KB, patch)
2009-06-17 14:33 PDT, Ryosuke Niwa
eric: review-
converts find-after-replace.html findString-2.html insert-list-and-stitch.html (30.47 KB, patch)
2009-06-17 14:36 PDT, Ryosuke Niwa
eric: review-
converts insertHTML.html switch-list-type.html (32.02 KB, patch)
2009-06-17 14:37 PDT, Ryosuke Niwa
eric: review+
converts paste-1.html paste-2.html (22.47 KB, patch)
2009-06-17 14:39 PDT, Ryosuke Niwa
eric: review-
converts remove-list-1.html remove-list-items.html (28.95 KB, patch)
2009-06-17 14:41 PDT, Ryosuke Niwa
eric: review-
converts 5432254-2.html 5700414-1.html 5700414-2.html (14.68 KB, patch)
2009-06-17 16:18 PDT, Ryosuke Niwa
eric: review+
converts find-after-replace.html findString-2.html insert-list-and-stitch.html (30.49 KB, patch)
2009-06-17 16:22 PDT, Ryosuke Niwa
no flags
converts paste-1.html paste-2.html (22.49 KB, patch)
2009-06-17 16:25 PDT, Ryosuke Niwa
no flags
converts remove-list-1.html remove-list-items.html (28.95 KB, patch)
2009-06-17 16:31 PDT, Ryosuke Niwa
no flags
converts paste-1.html paste-2.html (22.45 KB, patch)
2009-06-17 16:33 PDT, Ryosuke Niwa
eric: review-
converts find-after-replace.html findString-2.html insert-list-and-stitch.html (30.49 KB, patch)
2009-06-17 16:35 PDT, Ryosuke Niwa
eric: review-
Ryosuke Niwa
Comment 1 2009-06-11 17:42:50 PDT
Created attachment 31184 [details] Fixes the bug. Most of test cases now use a dumpAsText test.
Ryosuke Niwa
Comment 2 2009-06-11 17:44:54 PDT
I converted 21 test cases to use dumpAsText test.
Eric Seidel (no email)
Comment 3 2009-06-13 02:13:52 PDT
Comment on attachment 31184 [details] Fixes the bug. Most of test cases now use a dumpAsText test. I can't review 20 tests at once. Please post these in smaller patches. Ideally 20k or less.
Ryosuke Niwa
Comment 4 2009-06-16 15:37:25 PDT
Created attachment 31381 [details] converts 4916583.html 5119244.html 5120591.html
Ryosuke Niwa
Comment 5 2009-06-16 15:38:04 PDT
Created attachment 31382 [details] converts 5142012-3.html 5144139-1.html 5164796.html
Ryosuke Niwa
Comment 6 2009-06-16 15:38:37 PDT
Created attachment 31383 [details] converts 5207369.html 5210032.html 5432254-1.html
Ryosuke Niwa
Comment 7 2009-06-16 15:39:14 PDT
Created attachment 31384 [details] converts 5432254-2.html 5700414-1.html 5700414-2.html
Ryosuke Niwa
Comment 8 2009-06-16 15:39:44 PDT
Created attachment 31385 [details] converts find-after-replace.html findString-2.html insert-list-and-stitch.html
Ryosuke Niwa
Comment 9 2009-06-16 15:40:16 PDT
Created attachment 31387 [details] converts insertHTML.html paste-1.html paste-2.html
Ryosuke Niwa
Comment 10 2009-06-16 15:41:24 PDT
Created attachment 31388 [details] converts remove-list-1.html remove-list-items.html switch-list-type.html
Ryosuke Niwa
Comment 11 2009-06-16 15:43:12 PDT
last three patches are fairly large but these patches are mostly deletion of files. so the actual context isn't that large.
Eric Seidel (no email)
Comment 12 2009-06-17 11:20:17 PDT
Comment on attachment 31381 [details] converts 4916583.html 5119244.html 5120591.html Looks fine.
Eric Seidel (no email)
Comment 13 2009-06-17 11:35:07 PDT
Comment on attachment 31382 [details] converts 5142012-3.html 5144139-1.html 5164796.html Looks OK.
Ryosuke Niwa
Comment 14 2009-06-17 14:24:17 PDT
Created attachment 31432 [details] converts 4916583.html 5119244.html 5120591.html
Ryosuke Niwa
Comment 15 2009-06-17 14:29:04 PDT
Created attachment 31433 [details] converts 4916583.html 5119244.html 5120591.html
Ryosuke Niwa
Comment 16 2009-06-17 14:30:49 PDT
Created attachment 31434 [details] converts 5142012-3.html 5144139-1.html 5164796.html
Ryosuke Niwa
Comment 17 2009-06-17 14:32:18 PDT
Created attachment 31435 [details] converts 5207369.html 5210032.html 5432254-1.html
Ryosuke Niwa
Comment 18 2009-06-17 14:33:59 PDT
Created attachment 31436 [details] converts 5432254-2.html 5700414-1.html 5700414-2.html
Ryosuke Niwa
Comment 19 2009-06-17 14:36:12 PDT
Created attachment 31437 [details] converts find-after-replace.html findString-2.html insert-list-and-stitch.html
Ryosuke Niwa
Comment 20 2009-06-17 14:37:54 PDT
Created attachment 31438 [details] converts insertHTML.html switch-list-type.html
Ryosuke Niwa
Comment 21 2009-06-17 14:39:25 PDT
Created attachment 31439 [details] converts paste-1.html paste-2.html
Ryosuke Niwa
Comment 22 2009-06-17 14:41:40 PDT
Created attachment 31440 [details] converts remove-list-1.html remove-list-items.html
Eric Seidel (no email)
Comment 23 2009-06-17 14:58:57 PDT
Comment on attachment 31433 [details] converts 4916583.html 5119244.html 5120591.html LGTM.
Eric Seidel (no email)
Comment 24 2009-06-17 14:59:59 PDT
Comment on attachment 31434 [details] converts 5142012-3.html 5144139-1.html 5164796.html LGTM.
Eric Seidel (no email)
Comment 25 2009-06-17 15:02:57 PDT
Comment on attachment 31435 [details] converts 5207369.html 5210032.html 5432254-1.html LGTM.
Eric Seidel (no email)
Comment 26 2009-06-17 15:07:34 PDT
Comment on attachment 31436 [details] converts 5432254-2.html 5700414-1.html 5700414-2.html Typo in: LayoutTests/editing/execCommand/5700414-2.html 4 <div id="div">There should be be a single empty paragraph above.</div> Otherwise looks fine.
Eric Seidel (no email)
Comment 27 2009-06-17 15:09:15 PDT
Comment on attachment 31437 [details] converts find-after-replace.html findString-2.html insert-list-and-stitch.html Tab: if (window.layoutTestController) { 3 layoutTestController.dumpEditingCallbacks(); 4 layoutTestController.dumpAsText(); 5 } Is there no button? 5 <p>The three items below should be stitched together into one ordered list when you click the button.</div>
Eric Seidel (no email)
Comment 28 2009-06-17 15:10:13 PDT
Comment on attachment 31438 [details] converts insertHTML.html switch-list-type.html Looks OK. Sad we can't pretty-print this: 36 <ol style="border: 1px solid red;"> <li>This should be in an ordered list.</li> </ol><span id="item1"><ul><li><span id="item1">This should be in an unordered list.</span>&nbsp;</li></ul></span><ol style="border: 1px solid red;"><br> This should be in an ordered list. <li>This should be in an ordered list.</li> </ol><ul><li>This should be in an unordered list.</li></ul><ol style="border: 1px solid red;"><li>This should be in an ordered list.</li> </ol><ul><li>This should be in an unordered list.</li></ul><ol style="border: 1px solid red;"> <li>This should be in an ordered list.</li> </ol> This should not be in a list.<br><ol><li>This should be in an ordered list.</li></ol>
Eric Seidel (no email)
Comment 29 2009-06-17 15:12:39 PDT
Comment on attachment 31439 [details] converts paste-1.html paste-2.html Tabs: 0 if (window.layoutTestController) 20 window.layoutTestController.notifyDone(); 31 window.layoutTestController.notifyDone(); Missing newline: 2539 </script> 2640 \ No newline at end of file Otherwise looks fine. The tab will block checkin (the pre-commit hook will fail).
Darin Adler
Comment 30 2009-06-17 15:14:35 PDT
(In reply to comment #28) > Sad we can't pretty-print this: > 36 <ol style="border: 1px solid red;"> <li>This should be in an ordered > list.</li> </ol><span id="item1"><ul><li><span id="item1">This should be in an > unordered list.</span>&nbsp;</li></ul></span><ol style="border: 1px solid > red;"><br> This should be in an ordered list. <li>This should be in an ordered > list.</li> </ol><ul><li>This should be in an unordered list.</li></ul><ol > style="border: 1px solid red;"><li>This should be in an ordered list.</li> > </ol><ul><li>This should be in an unordered list.</li></ul><ol style="border: > 1px solid red;"> <li>This should be in an ordered list.</li> </ol> This should > not be in a list.<br><ol><li>This should be in an ordered list.</li></ol> But we can! There's no reason we just have to log innerHTML. We could use a couple regular expressions to make it easier to read. I would if I was writing a test with this as the result.
Eric Seidel (no email)
Comment 31 2009-06-17 15:15:04 PDT
Comment on attachment 31440 [details] converts remove-list-1.html remove-list-items.html Tab: 3 layoutTestController.dumpEditingCallbacks(); 4 layoutTestController.dumpAsText(); Why? <div id="div" contenteditable="true"><ol><li></li><li>There should be a empty paragraph above this one.</li></ol></div> 8 <div id="div" contenteditable="true"><ol><li></li><li>There should be a single BR above this line and no OL or LI.</li></ol></div>
Ryosuke Niwa
Comment 32 2009-06-17 15:45:10 PDT
(In reply to comment #31) > Why? > <div id="div" contenteditable="true"><ol><li></li><li>There should be a empty > paragraph above this one.</li></ol></div> > 8 <div id="div" contenteditable="true"><ol><li></li><li>There should be a > single BR above this line and no OL or LI.</li></ol></div> > Because if we simply deleted LI tags, then there will be no content above the sentence; i.e. if acts as if we set display:none; for the first LI. But since we're just untoggling ordered list, there should still be a space allocated for it. As a place holder, we insert a BR.
Ryosuke Niwa
Comment 33 2009-06-17 16:02:39 PDT
(In reply to comment #27) > Is there no button? > 5 <p>The three items below should be stitched together into one ordered list > when you click the button.</div> As far as I checked, there was no button.
Ryosuke Niwa
Comment 34 2009-06-17 16:18:29 PDT
Created attachment 31458 [details] converts 5432254-2.html 5700414-1.html 5700414-2.html
Ryosuke Niwa
Comment 35 2009-06-17 16:22:54 PDT
Created attachment 31459 [details] converts find-after-replace.html findString-2.html insert-list-and-stitch.html
Ryosuke Niwa
Comment 36 2009-06-17 16:25:40 PDT
Created attachment 31460 [details] converts paste-1.html paste-2.html
Ryosuke Niwa
Comment 37 2009-06-17 16:31:54 PDT
Created attachment 31461 [details] converts remove-list-1.html remove-list-items.html
Ryosuke Niwa
Comment 38 2009-06-17 16:33:44 PDT
Created attachment 31462 [details] converts paste-1.html paste-2.html
Ryosuke Niwa
Comment 39 2009-06-17 16:35:17 PDT
Created attachment 31464 [details] converts find-after-replace.html findString-2.html insert-list-and-stitch.html
Eric Seidel (no email)
Comment 41 2009-06-18 18:55:01 PDT
CCing oliver. He expressed interest in this patch set this morning.
Eric Seidel (no email)
Comment 42 2009-06-21 14:13:14 PDT
Comment on attachment 31458 [details] converts 5432254-2.html 5700414-1.html 5700414-2.html Looks fine.
Eric Seidel (no email)
Comment 43 2009-06-21 14:14:28 PDT
Comment on attachment 31461 [details] converts remove-list-1.html remove-list-items.html Looks fine.
Eric Seidel (no email)
Comment 44 2009-06-21 14:15:46 PDT
Comment on attachment 31462 [details] converts paste-1.html paste-2.html Looks fine.
Eric Seidel (no email)
Comment 45 2009-06-21 14:17:21 PDT
Comment on attachment 31464 [details] converts find-after-replace.html findString-2.html insert-list-and-stitch.html Looks fine.
Eric Seidel (no email)
Comment 46 2009-06-24 01:06:38 PDT
Which ones of these have already been landed? It would be best if they were already obsoleted so that the rest of these could be more easily landed.
Ryosuke Niwa
Comment 47 2009-06-24 02:40:40 PDT
(In reply to comment #46) > Which ones of these have already been landed? It would be best if they were > already obsoleted so that the rest of these could be more easily landed. > obsolated 4 patches that have already been landed.
Eric Seidel (no email)
Comment 48 2009-06-25 17:51:44 PDT
Comment on attachment 31458 [details] converts 5432254-2.html 5700414-1.html 5700414-2.html Committing to http://svn.webkit.org/repository/webkit/trunk ... D LayoutTests/platform/mac/editing/execCommand/5432254-2-expected.checksum D LayoutTests/platform/mac/editing/execCommand/5432254-2-expected.png D LayoutTests/platform/mac/editing/execCommand/5432254-2-expected.txt D LayoutTests/platform/mac/editing/execCommand/5700414-1-expected.checksum D LayoutTests/platform/mac/editing/execCommand/5700414-1-expected.png D LayoutTests/platform/mac/editing/execCommand/5700414-1-expected.txt D LayoutTests/platform/mac/editing/execCommand/5700414-2-expected.checksum D LayoutTests/platform/mac/editing/execCommand/5700414-2-expected.png D LayoutTests/platform/mac/editing/execCommand/5700414-2-expected.txt D LayoutTests/platform/qt/editing/execCommand/5432254-2-expected.txt M LayoutTests/ChangeLog A LayoutTests/editing/execCommand/5432254-2-expected.txt M LayoutTests/editing/execCommand/5432254-2.html A LayoutTests/editing/execCommand/5700414-1-expected.txt M LayoutTests/editing/execCommand/5700414-1.html A LayoutTests/editing/execCommand/5700414-2-expected.txt M LayoutTests/editing/execCommand/5700414-2.html Committed r45224
Eric Seidel (no email)
Comment 49 2009-06-25 19:32:35 PDT
Comment on attachment 31461 [details] converts remove-list-1.html remove-list-items.html Committing to http://svn.webkit.org/repository/webkit/trunk ... R LayoutTests/platform/mac/editing/execCommand/remove-list-1-expected.txt => LayoutTests/editing/execCommand/remove-list-1-expected.txt D LayoutTests/platform/mac/editing/execCommand/remove-list-1-expected.checksum D LayoutTests/platform/mac/editing/execCommand/remove-list-1-expected.png D LayoutTests/platform/mac/editing/execCommand/remove-list-items-expected.checksum D LayoutTests/platform/mac/editing/execCommand/remove-list-items-expected.png D LayoutTests/platform/mac/editing/execCommand/remove-list-items-expected.txt D LayoutTests/platform/qt/editing/execCommand/remove-list-1-expected.txt D LayoutTests/platform/qt/editing/execCommand/remove-list-items-expected.txt M LayoutTests/ChangeLog M LayoutTests/editing/execCommand/remove-list-1.html A LayoutTests/editing/execCommand/remove-list-items-expected.txt M LayoutTests/editing/execCommand/remove-list-items.html Committed r45239 http://trac.webkit.org/changeset/45239
Eric Seidel (no email)
Comment 50 2009-06-26 01:08:26 PDT
Comment on attachment 31462 [details] converts paste-1.html paste-2.html Tests fail after conversion: editing/execCommand/paste-1.html -> failed . editing/execCommand/paste-2.html -> failed
Eric Seidel (no email)
Comment 51 2009-06-26 01:20:34 PDT
Comment on attachment 31464 [details] converts find-after-replace.html findString-2.html insert-list-and-stitch.html After applying the patch: editing/execCommand/find-after-replace.html -> failed
Eric Seidel (no email)
Comment 52 2009-06-26 01:21:19 PDT
Given that we seem to want to take a different approach for these. I think we can just close this bug now. The last two patches which failed, there seems little point in updating them. Feel-free to re-open if you disagree.
Ryosuke Niwa
Comment 53 2009-06-26 01:28:13 PDT
(In reply to comment #52) > Given that we seem to want to take a different approach for these. I think we > can just close this bug now. The last two patches which failed, there seems > little point in updating them. Feel-free to re-open if you disagree. > I think those are failing because my patch for 14062. I see weird nbsp's in the expected results for paste-1/2 & find-after-replace. It's interesting that these bug didn't show up in layout tests because a regular space and non-breaking space are rendered same way in many cases.
Note You need to log in before you can comment on or make changes to this bug.