Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input-crash.html

Issue 2270833002: Fix the crash of issue 2209773002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indentation Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b9e9261768a118f6006d283c19e5178638b74345
--- /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 03:40:07 indentation is inconsistent with other functions,
+ testSliderNoCrash.done();
+ }
+ var slider = document.getElementById('slider');
+ const touchSourceType = 1;
+ var w = slider.clientWidth;
+ 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() {}, touchSourceType);
tkent 2016/08/25 03:40:07 Why did you remove .done() call?
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698