Commit 4b37da46 authored by rbpotter's avatar rbpotter Committed by Commit Bot

CrSlider test: Move into fixed width wrapper to prevent flakes

Certain widths of the slider resulted in rounding errors when computing
the value of the slider based on simulated pointer events at different
locations. Put the slider in a 200px width wrapper so that the test
always behaves the same way.

Bug: 984919
Change-Id: I1e6292cba02c1949bd4739a48ad90bd0cbfbcc55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2012908Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733775}
parent 02ec6bed
......@@ -14,7 +14,16 @@ suite('cr-slider', function() {
setup(function() {
PolymerTest.clearBody();
document.body.innerHTML = '<cr-slider min="0" max="100"></cr-slider>';
document.body.innerHTML = `
<style>
#wrapper {
width: 200px;
}
</style>
<div id="wrapper">
<cr-slider min="0" max="100"></cr-slider>
</div>
`;
crSlider = document.body.querySelector('cr-slider');
crSlider.value = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment