Bug 194282

Summary: Web Inspector: Fix modify-css-property-race.html test failures
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, drousso, inspector-bugzilla-changes, joepeck, mattbaker, simon.fraser, sroberts, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
nvasilyev: commit-queue-
Patch
nvasilyev: commit-queue-
Patch
none
Patch
mattbaker: review+, mattbaker: commit-queue-
Patch
nvasilyev: commit-queue+
Patch none

Description Nikita Vasilyev 2019-02-05 00:09:11 PST
Introduced by Bug 192739: Web Inspector: Styles: fix race conditions when editing.
Comment 1 Nikita Vasilyev 2019-02-05 00:15:41 PST Comment hidden (obsolete)
Comment 2 Nikita Vasilyev 2019-02-05 00:21:21 PST Comment hidden (obsolete)
Comment 3 Nikita Vasilyev 2019-02-05 00:31:50 PST Comment hidden (obsolete)
Comment 4 Nikita Vasilyev 2019-02-05 00:45:44 PST
Created attachment 361169 [details]
Patch
Comment 5 Joseph Pecoraro 2019-02-05 10:38:47 PST
Comment on attachment 361169 [details]
Patch

This patch hasn't changed anything yet, right?
Comment 6 Nikita Vasilyev 2019-02-05 11:27:56 PST
(In reply to Joseph Pecoraro from comment #5)
> Comment on attachment 361169 [details]
> Patch
> 
> This patch hasn't changed anything yet, right?

It did!

expectGreaterThan(43, 42) logs "PASS: expectGreaterThan(43, 42)".

Imagine, the actual value would be 44 or 45. It would still pass the assertion, but it would log "PASS: expectGreaterThan(45, 42)", causing the test to fail.
Comment 7 Matt Baker 2019-02-05 12:05:42 PST
Comment on attachment 361169 [details]
Patch

rs=me
Comment 8 Matt Baker 2019-02-05 12:07:20 PST
Let's put a comment in the change log that this fixing a test failure introduced in https://trac.webkit.org/changeset/240946.
Comment 9 Nikita Vasilyev 2019-02-05 12:13:02 PST Comment hidden (obsolete)
Comment 10 Nikita Vasilyev 2019-02-05 12:19:09 PST
Created attachment 361209 [details]
Patch
Comment 11 WebKit Commit Bot 2019-02-05 12:35:16 PST
Comment on attachment 361209 [details]
Patch

Clearing flags on attachment: 361209

Committed r240989: <https://trac.webkit.org/changeset/240989>
Comment 12 WebKit Commit Bot 2019-02-05 12:35:18 PST
All reviewed patches have been landed.  Closing bug.
Comment 13 Radar WebKit Bug Importer 2019-02-05 12:36:29 PST
<rdar://problem/47827420>
Comment 14 Shawn Roberts 2019-02-05 18:12:53 PST
test is still a flaky failure on Mac WK2, WK1 Debug

Reproduced with:

run-webkit-tests t240999 inspector/css/modify-css-property-race.html --iterations 500 -f --debug -1

run-webkit-tests t240999 inspector/css/modify-css-property-race.html --iterations 500 -f --debug

run-webkit-tests t240999 inspector/css/modify-css-property-race.html --iterations 500 -f

Flakiness dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=inspector%2Fcss%2Fmodify-css-property-race.html

Diff: 

--- /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/inspector/css/modify-css-property-race-expected.txt
+++ /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/inspector/css/modify-css-property-race-actual.txt
@@ -3,9 +3,15 @@
 
 == Running test suite: ModifyCSSProperty
 -- Running test case: ModifyCSSPropertyRace.ChangeInlineStyle
-PASS: expectGreaterThan(43, 42)
-PASS: expectGreaterThan(43, 42)
-PASS: Value updated to "10px".
+FAIL: expectGreaterThan(42, 42)
+    Expected: greater than 42
+    Actual: 42
+FAIL: expectGreaterThan(42, 42)
+    Expected: greater than 42
+    Actual: 42
+FAIL: Value updated to "10px".
+    Expected: "10px"
+    Actual: "44px"
 PASS: CSSStyleDeclaration text should update.
-PASS: expectGreaterThanOrEqual(10, 10)
+PASS: expectGreaterThanOrEqual(44, 10)
Comment 15 Nikita Vasilyev 2019-02-05 18:20:14 PST
Thanks, I'm working on the fix in https://bugs.webkit.org/show_bug.cgi?id=194318.
Comment 16 Nikita Vasilyev 2019-02-05 23:25:35 PST
modify-css-property-race.html shouldn't be flaky after https://trac.webkit.org/changeset/241011