[Webkit-unassigned] [Bug 133939] New: shouldBecomeEqual() behaves as shouldBe() if the tested expression returns the expected value

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 16 06:44:32 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=133939

           Summary: shouldBecomeEqual() behaves as shouldBe() if the
                    tested expression returns the expected value
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: g.czajkowski at samsung.com


Once the tested expression returns different value than expected one, shouldBecomeEqual() properly waits until the expression becomes the expected one.

In case when the tested expression returns the same value as expected one, shouldBecomeEqual() reports PASS. However, there are some cases when we should wait weather the tested expression remains the expected value. Let me give an example:

shouldBecomeEqual("internals.hasSpellingMarker(...)", "false");

is always reporting PASS which is not true (assuming asynchronous path of spellchecking is turned on). The spelling marker may appear after a while.

The reason for that is we are checking a condition at the beginning of shouldBecomeEqual(), before calling a timer. As a result, queued asynchronous events doesn't effect on this checking.

How should we handle this? If I we moved checking values to the timer shouldBecomeEqual would be more reliable IMHO. However, one timer execution does not guarantee that the expression will remain the tested value. We could consider checking at few attempts or adding an additional timer.

What's your opinion on that? Thanks

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list