Bug 176142

Summary: Speedometer 2.0: Add dummy node to notify app is ready for Backbone suite
Product: WebKit Reporter: Shiyu Zhang <shiyu.zhang>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, lforschler, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=176017
Bug Depends on:    
Bug Blocks: 172339    
Attachments:
Description Flags
Patch
none
Patch none

Shiyu Zhang
Reported 2017-08-30 20:16:58 PDT
There's a chance for BackboneJS suite that Speedometer attempted to add items before app.js was loaded. The deleteButtons.length in resources/test.js for BackboneJS suite could be zero sometimes as I observed. What's worse, BackboneJS suite will just skip complete/delete-items steps and never crash if checkboxes/deleteButtons.length is zero, which makes this issue difficult to be detected.
Attachments
Patch (2.37 KB, patch)
2017-08-30 20:32 PDT, Shiyu Zhang
no flags
Patch (3.09 KB, patch)
2017-09-03 20:41 PDT, Shiyu Zhang
no flags
Shiyu Zhang
Comment 1 2017-08-30 20:32:42 PDT
Shiyu Zhang
Comment 2 2017-08-30 20:38:19 PDT
Comment on attachment 319437 [details] Patch A patch to fix this bug, PTAL.
Ryosuke Niwa
Comment 3 2017-09-01 11:42:43 PDT
Comment on attachment 319437 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319437&action=review > PerformanceTests/Speedometer/resources/tests.js:233 > + var newTodo = contentDocument.getElementsByClassName('new-todo'); > + newTodo[0].focus(); > + return newTodo[0]; I think it's cleaner to use querySelector here.
Ryosuke Niwa
Comment 4 2017-09-01 11:44:08 PDT
Comment on attachment 319437 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319437&action=review >> PerformanceTests/Speedometer/resources/tests.js:233 >> + return newTodo[0]; > > I think it's cleaner to use querySelector here. Can we also replace checkboxes.length and deleteButtons.length by numberOfItemsToAdd below so that we'd see a console error should this bug come back?
Shiyu Zhang
Comment 5 2017-09-03 20:41:22 PDT
Shiyu Zhang
Comment 6 2017-09-03 20:45:05 PDT
Comment on attachment 319831 [details] Patch Thanks for your advice! A new patch following your suggestion is here.
WebKit Commit Bot
Comment 7 2017-09-05 01:17:29 PDT
Comment on attachment 319831 [details] Patch Clearing flags on attachment: 319831 Committed r221611: <http://trac.webkit.org/changeset/221611>
WebKit Commit Bot
Comment 8 2017-09-05 01:17:30 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2017-09-27 12:47:54 PDT
Note You need to log in before you can comment on or make changes to this bug.