Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input-crash.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input-crash.html b/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cda1a5747714557f89305c0c1d2a745ef83cf7a9 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input-crash.html |
| @@ -0,0 +1,43 @@ |
| +<!DOCTYPE html> |
| +<script src='../../../resources/testharness.js'></script> |
| +<script src='../../../resources/testharnessreport.js'></script> |
| + |
| +<style type='text/css'> |
| +*:before{-webkit-appearance:slider-vertical;} |
| +</style> |
| + |
| +<select multiple='multiple'> |
| +<optgroup> |
| +<option>c</option> |
| +</optgroup> |
| +</select> |
| + |
| +<input type='range' id='slider' step='any' min = '0' max = '100' oninput='destroyLayout()'></input> |
| + |
| +<script> |
| +var isMac = navigator.platform.indexOf('Mac') == 0; |
| +function destroyLayout() { |
| + var slider = document.getElementById('slider'); |
| + slider.style = "display:none"; |
| +} |
| + |
| +function forceLayoutUpdate() { |
| + document.body.offsetTop; |
| +} |
| + |
| +forceLayoutUpdate(); |
| + |
| +var testSliderNoCrash = async_test('Does not crash when <input type="range"> has no layoutObject and when a non-element node has "slider-vertical" appearance.'); |
| +testSliderNoCrash.step(function () { |
| + if (isMac) { |
|
tkent
2016/08/25 00:43:56
Why do you exclude Mac?
|
| + return; |
| + } |
| + var slider = document.getElementById('slider'); |
| + const touchSourceType = 1; |
| + var w = slider.clientWidth; |
|
tkent
2016/08/25 00:43:56
Wrong indentation.
|
| + var h = slider.clientHeight; |
| + var x = slider.offsetLeft + w / 2; |
| + var y = slider.offsetTop + h / 2; |
| + chrome.gpuBenchmarking.smoothDrag(x, y, x + w, y, function() {testSliderNoCrash.done()}, touchSourceType); |
| +}); |
| +</script> |