- From: Ryosuke Niwa <rniwa@webkit.org>
- Date: Tue, 18 Apr 2017 23:59:30 -0700
- To: Koji Ishii <kojii@chromium.org>
- Cc: public-test-infra <public-test-infra@w3.org>
On Tue, Apr 18, 2017 at 10:06 PM, Koji Ishii <kojii@chromium.org> wrote: > Hi all, > > Sorry if this was discussed before, but is there a recommended way to force > layout in a test? This came up during a F2F meeting we had in Mountain View a couple of months ago. We thought it would be a good idea to add a new JS helper file which contains a list of common operations like this, and let each UA override its functions in their (potentially private) test environment to ensure the desired effect. For example, we can add style-helper.js with code like this: StyleHelper = { updateStyle: (element) => { element.getBoundingClientRect() } } If we let UA test environment override StyleHelper, each engine can use its own proprietary test-enviornment-only mechanism to force a style update on the element. - R. Niwa
Received on Wednesday, 19 April 2017 07:00:24 UTC