[webkit-reviews] review granted: [Bug 110708] Fix the tests based on computedStyleIncludingVisitedInfo for asynchronous update of the visited style : [Attachment 189960] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 26 21:14:13 PST 2013


Ryosuke Niwa <rniwa at webkit.org> has granted Benjamin Poulain
<benjamin at webkit.org>'s request for review:
Bug 110708: Fix the tests based on computedStyleIncludingVisitedInfo for
asynchronous update of the visited style
https://bugs.webkit.org/show_bug.cgi?id=110708

Attachment 189960: Patch
https://bugs.webkit.org/attachment.cgi?id=189960&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=189960&action=review


> LayoutTests/ChangeLog:11
> +	   WebKit because the list of visited URLs is maintained outside the
Web Process.

Nit: WebProcess.

> LayoutTests/fast/js/resources/js-test-pre.js:347
> +  if (typeof _a != "string" || typeof _b != "string")
> +    debug("WARN: shouldBecomeDifferent() expects string arguments");
> +  if (timeout === undefined)
> +    timeout = 500;
> +
> +  var condition = function() {
> +    var exception;
> +    var _av;
> +    try {
> +	 _av = eval(_a);
> +    } catch (e) {
> +	 exception = e;
> +    }
> +    var _bv = eval(_b);
> +    if (exception)
> +	 testFailed(_a + " should became not equal to " + _bv + ". Threw
exception " + exception);
> +    if (!isResultCorrect(_av, _bv)) {
> +	 testPassed(_a + " became different from " + _b);
> +	 return true;
> +    }
> +    return false;
> +  };

It's unfortunate that we have to duplicate so much code.

> LayoutTests/fast/js/resources/js-test-pre.js:348
> +  var failureTime = Date.now() + timeout;

We should probably call window.performance.now() when available so that we may
not get affected by the system clock being adjusted while we're running this
test.
But that should probably be done in a separate patch since we also want to fix
shouldBecomeEqual.


More information about the webkit-reviews mailing list