RESOLVED INVALID 62703
Web Inspector: [Qt] almost all styles tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=62703
Summary Web Inspector: [Qt] almost all styles tests are flaky
Ilya Tikhonovsky
Reported 2011-06-15 01:33:25 PDT
Many styles tests assign a test function as a sniffer for WebInspector.StylesSidebarPane.prototype._rebuildUpdate function but sometimes not all the information is received/processed properly when test function is called. It'd be nice to run the next step a little bit later.
Attachments
[patch] initial version (18.20 KB, patch)
2011-06-15 01:48 PDT, Ilya Tikhonovsky
pfeldman: review-
pfeldman: commit-queue-
[patch] second version (27.32 KB, patch)
2011-06-17 10:49 PDT, Ilya Tikhonovsky
pfeldman: review-
[patch] third version (27.33 KB, patch)
2011-06-20 04:57 PDT, Ilya Tikhonovsky
no flags
Ilya Tikhonovsky
Comment 1 2011-06-15 01:48:48 PDT
Created attachment 97257 [details] [patch] initial version
Pavel Feldman
Comment 2 2011-06-15 02:03:45 PDT
Comment on attachment 97257 [details] [patch] initial version We should instead add a sniffer prior to selecting node + make selectNode force synchronous styles update.
Ilya Tikhonovsky
Comment 3 2011-06-17 10:49:58 PDT
Created attachment 97618 [details] [patch] second version
Pavel Feldman
Comment 4 2011-06-17 11:10:33 PDT
Comment on attachment 97618 [details] [patch] second version View in context: https://bugs.webkit.org/attachment.cgi?id=97618&action=review > LayoutTests/inspector/styles/styles-add-invalid-property.html:13 > + InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step0); I don't see why this dispatch is necessary. _rebuildUpdate sniffer should take care of things. I thought we agreed to force synchronous styles recalc. You could make a utility showElementsPanelAndUpdateStyles method for that. > LayoutTests/inspector/styles/styles-update-from-js.html:45 > +console.trace(); This is probably not intentional > Source/WebCore/inspector/front-end/StylesSidebarPane.js:241 > + _reloadAllStylesDelayed: function() _reloadAllStyles > Source/WebCore/inspector/front-end/StylesSidebarPane.js:254 > + _reloadAllStyles: function() _scheduleReloadAllStyles
Ilya Tikhonovsky
Comment 5 2011-06-17 12:05:10 PDT
Comment on attachment 97618 [details] [patch] second version View in context: https://bugs.webkit.org/attachment.cgi?id=97618&action=review >> LayoutTests/inspector/styles/styles-add-invalid-property.html:13 >> + InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step0); > > I don't see why this dispatch is necessary. _rebuildUpdate sniffer should take care of things. I thought we agreed to force synchronous styles recalc. You could make a utility showElementsPanelAndUpdateStyles method for that. There are two different things here. 1) we want to switch the active panel _rebuildUpdate sniffer can't be used as the initiator of the first and next steps directly because it is called first time as a result of showPanel and second time as result of selectNodeWithId (asynchronously). We need to count such calls or assign this sniffer only when we have a guarantee that it will not be called second time for some reason. I decided to use second approach because it is more stable. BTW as I know you r- the patch with counter prepared by apavlov. 2) we want to make styles recalculation synchronous Unfortunately we have at least two async call to backend and at least one setTimeout call between the moment when we modify styles at frontend and the moment when new styles are received and applied to the UI. I removed setTimeout call for the tests and found that some tests got broken because it's test steps have no direct correlation with _rebuildUpdate.
Ilya Tikhonovsky
Comment 6 2011-06-20 04:57:18 PDT
Created attachment 97779 [details] [patch] third version
Note You need to log in before you can comment on or make changes to this bug.