RESOLVED FIXED 119797
grammar-markers.html and grammar-markers-hidpi.html pass even if element does not have grammar marker
https://bugs.webkit.org/show_bug.cgi?id=119797
Summary grammar-markers.html and grammar-markers-hidpi.html pass even if element does...
Grzegorz Czajkowski
Reported 2013-08-14 06:48:57 PDT
After tenth attempts of verifying the grammar marker, the tests call 'notifyDone' even if grammar marker was not be found. if (hasMarker || --retry == 0) testRunner.notifyDone(); That's why those tests pass on platforms that doesn't implement grammar checking.
Attachments
proposed patch (2.89 KB, patch)
2013-08-14 06:53 PDT, Grzegorz Czajkowski
no flags
apply Darin's review (8.77 KB, patch)
2013-08-20 08:05 PDT, Grzegorz Czajkowski
no flags
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (925.77 KB, application/zip)
2013-08-20 22:36 PDT, Build Bot
no flags
Patch (170.22 KB, patch)
2013-08-26 06:44 PDT, Grzegorz Czajkowski
no flags
apply Ryosuke's review. (169.88 KB, patch)
2013-08-27 03:51 PDT, Grzegorz Czajkowski
no flags
Grzegorz Czajkowski
Comment 1 2013-08-14 06:53:02 PDT
Created attachment 208723 [details] proposed patch
Darin Adler
Comment 2 2013-08-14 12:43:59 PDT
Comment on attachment 208723 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=208723&action=review > LayoutTests/editing/spelling/grammar-markers-hidpi.html:36 > + if (hasMarker && window.testRunner) > + testRunner.notifyDone(); Doesn’t make sense. If we never find the marker we still need to mark the test done, otherwise we’ll hang until we time out. We should write out whether we found the marker, not hang when we didn’t find it.
Grzegorz Czajkowski
Comment 3 2013-08-20 08:05:57 PDT
Created attachment 209197 [details] apply Darin's review
Ryosuke Niwa
Comment 4 2013-08-20 15:54:21 PDT
Comment on attachment 209197 [details] apply Darin's review View in context: https://bugs.webkit.org/attachment.cgi?id=209197&action=review > LayoutTests/editing/spelling/grammar-markers-hidpi.html:44 > + if (hasMarker) > + testPassed('text : "' + target.innerHTML + '" has grammar marker under a word "has"'); > + else > + testFailed('text : "' + target.innerHTML + '" does not have grammar marker under a word "has"'); Why don't we simply use shouldBeTrue? You can even use indexOf and length of "has" instead of magic numbers 4 and 3 to be more descriptive.
Build Bot
Comment 5 2013-08-20 22:36:34 PDT
Comment on attachment 209197 [details] apply Darin's review Attachment 209197 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1520427 New failing tests: editing/spelling/grammar-markers.html editing/spelling/grammar-markers-hidpi.html
Build Bot
Comment 6 2013-08-20 22:36:35 PDT
Created attachment 209250 [details] Archive of layout-test-results from webkit-ews-01 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-01 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Grzegorz Czajkowski
Comment 7 2013-08-21 02:30:41 PDT
(In reply to comment #4) > (From update of attachment 209197 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=209197&action=review > > > LayoutTests/editing/spelling/grammar-markers-hidpi.html:44 > > + if (hasMarker) > > + testPassed('text : "' + target.innerHTML + '" has grammar marker under a word "has"'); > > + else > > + testFailed('text : "' + target.innerHTML + '" does not have grammar marker under a word "has"'); > > Why don't we simply use shouldBeTrue? You can even use indexOf and length of "has" instead of magic numbers 4 and 3 to be more descriptive. That's good idea! I'll apply it before submitting. Mac Ews showed that the modified tests start failing. The pixel tests have a grammar marker under a word "has". It seems that the tests are still wrong. I'll check them as well.
Grzegorz Czajkowski
Comment 8 2013-08-26 06:44:54 PDT
Grzegorz Czajkowski
Comment 9 2013-08-26 06:48:15 PDT
Comment on attachment 209197 [details] apply Darin's review View in context: https://bugs.webkit.org/attachment.cgi?id=209197&action=review > LayoutTests/editing/spelling/grammar-markers-hidpi.html:34 > var hasMarker = internals.hasGrammarMarker(target, 4, 3); This method is able to check grammar marker for document object only. Changed this in next patch - it's needed to pass on Mac.
Ryosuke Niwa
Comment 10 2013-08-26 10:40:34 PDT
Comment on attachment 209646 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209646&action=review > LayoutTests/editing/spelling/grammar-markers-expected.txt:9 > +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > + > + > +PASS successfullyParsed is true > + > +TEST COMPLETE > +PASS hasMarker is true You're not setting jsTestIsAsync to true. TEST COMPLETE should show up at the end. > LayoutTests/editing/spelling/grammar-markers-hidpi.html:12 > + Whitespace. > LayoutTests/editing/spelling/grammar-markers-hidpi.html:27 > + Whitespace. > LayoutTests/editing/spelling/grammar-markers-hidpi.html:29 > + Whitespace. > LayoutTests/editing/spelling/grammar-markers-hidpi.html:33 > + Whitespace
Grzegorz Czajkowski
Comment 11 2013-08-27 03:51:36 PDT
Created attachment 209742 [details] apply Ryosuke's review.
WebKit Commit Bot
Comment 12 2013-08-27 05:08:29 PDT
Comment on attachment 209742 [details] apply Ryosuke's review. Clearing flags on attachment: 209742 Committed r154675: <http://trac.webkit.org/changeset/154675>
WebKit Commit Bot
Comment 13 2013-08-27 05:08:34 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.