Bug 838256 - Reftests and crashtests for <input type=range>. r=dholbert.
authorJonathan Watt <jwatt@jwatt.org>
Sat, 16 Feb 2013 17:57:21 +0000
changeset 132017 5e660787834c2a572725cdbd1126f8f4e7f80aef
parent 132016 7db39954cc10715894f490c509bc755b300b0a97
child 132018 75cef52e6f7e4b6b9170384689d2641c50f47261
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs838256
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 838256 - Reftests and crashtests for <input type=range>. r=dholbert.
content/html/content/crashtests/838256-1.html
content/html/content/crashtests/crashtests.list
layout/reftests/forms/input/range/input-from-range-to-other-type-unthemed-1-ref.html
layout/reftests/forms/input/range/input-from-range-to-other-type-unthemed-1.html
layout/reftests/forms/input/range/input-range-different-fraction-of-range-unthemed-1-notref.html
layout/reftests/forms/input/range/input-range-different-fraction-of-range-unthemed-1.html
layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1.html
layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1a-notref.html
layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1b-notref.html
layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1c-notref.html
layout/reftests/forms/input/range/input-range-same-fraction-of-range-unthemed-1-ref.html
layout/reftests/forms/input/range/input-range-same-fraction-of-range-unthemed-1.html
layout/reftests/forms/input/range/input-to-range-from-other-type-unthemed-1-ref.html
layout/reftests/forms/input/range/input-to-range-from-other-type-unthemed-1.html
layout/reftests/forms/input/range/reftest.list
layout/reftests/forms/input/reftest.list
new file mode 100644
--- /dev/null
+++ b/content/html/content/crashtests/838256-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<style>
+
+::-moz-range-track {
+  display: none ! important;
+}
+
+::-moz-range-thumb {
+  display: none ! important;
+}
+
+</style>
+</head>
+<body>
+<input type="range">
+</body>
+</html>
--- a/content/html/content/crashtests/crashtests.list
+++ b/content/html/content/crashtests/crashtests.list
@@ -44,8 +44,10 @@ load 795221-4.html
 load 795221-5.xml
 load 798802-1.html
 load 811226.html
 load 819745.html
 pref(dom.experimental_forms,true) load 828472.html
 load 828180.html
 load 832011.html
 load 837033.html
+pref(dom.experimental_forms_range,true) load 838256-1.html
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-from-range-to-other-type-unthemed-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="checkbox" style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-from-range-to-other-type-unthemed-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <!-- Test: when switching to another type, the input element should look
+             like that type (not like an input range element) -->
+  <script type="text/javascript">
+    function setToCheckbox()
+    {
+      document.getElementById('i').type='checkbox';
+    }
+    function disableReftestWait()
+    {
+      document.documentElement.className = '';
+    }
+  </script>
+
+  <body onload="setToCheckbox(); disableReftestWait();">
+    <input type='range' id='i' style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-different-fraction-of-range-unthemed-1-notref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="range" style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-different-fraction-of-range-unthemed-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+  <!-- Test: that range with value=70 is different to the default value=50. -->
+  <body>
+    <input type='range' style="-moz-appearance:none;" value=90 min=20 max=120>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="range" style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1a-notref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="text" style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1b-notref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="text" value="50" style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-not-other-type-unthemed-1c-notref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="checkbox" style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-same-fraction-of-range-unthemed-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="range" value=70 style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-range-same-fraction-of-range-unthemed-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <!-- Test: that range with value=90,min=90,max=120 looks the same as range
+       with value=70 (also tests that it doesn't look like type=text, since the
+       text displayed would be different in the type=text case). -->
+  <body>
+    <input type='range' style="-moz-appearance:none;" value=90 min=20 max=120>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-to-range-from-other-type-unthemed-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <input type="range" style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/input-to-range-from-other-type-unthemed-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <!-- Test: input element changed to range state doesn't look like checkbox state -->
+  <script type="text/javascript">
+    function setToRange()
+    {
+      document.getElementById('i').type='range';
+    }
+    function disableReftestWait()
+    {
+      document.documentElement.className = '';
+    }
+  </script>
+
+  <body onload="setToRange(); disableReftestWait();">
+    <input type='checkbox' id='i' style="-moz-appearance:none;">
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/range/reftest.list
@@ -0,0 +1,16 @@
+
+default-preferences pref(dom.experimental_forms_range,true)
+
+# sanity checks:
+!= input-range-not-other-type-unthemed-1.html input-range-not-other-type-unthemed-1a-notref.html
+!= input-range-not-other-type-unthemed-1.html input-range-not-other-type-unthemed-1b-notref.html
+!= input-range-not-other-type-unthemed-1.html input-range-not-other-type-unthemed-1c-notref.html
+
+# dynamic type changes:
+== input-to-range-from-other-type-unthemed-1.html input-to-range-from-other-type-unthemed-1-ref.html
+== input-from-range-to-other-type-unthemed-1.html input-from-range-to-other-type-unthemed-1-ref.html
+
+# for different values:
+!= input-range-different-fraction-of-range-unthemed-1.html input-range-different-fraction-of-range-unthemed-1-notref.html
+== input-range-same-fraction-of-range-unthemed-1.html input-range-same-fraction-of-range-unthemed-1-ref.html
+
--- a/layout/reftests/forms/input/reftest.list
+++ b/layout/reftests/forms/input/reftest.list
@@ -1,4 +1,6 @@
 include email/reftest.list
 include tel/reftest.list
 include search/reftest.list
 include url/reftest.list
+include range/reftest.list
+