Fix the tests based on computedStyleIncludingVisitedInfo for asynchronous update of the visited style
Created attachment 189960 [details] Patch
Comment on attachment 189960 [details] Patch 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.
Committed r144152: <http://trac.webkit.org/changeset/144152>