summaryrefslogtreecommitdiffstats
path: root/layout/reftests/forms/textarea
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/forms/textarea')
-rw-r--r--layout/reftests/forms/textarea/in-dynamic-rtl-doc.html18
-rw-r--r--layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/ltr-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/ltr.html10
-rw-r--r--layout/reftests/forms/textarea/no-resize.html10
-rw-r--r--layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html51
-rw-r--r--layout/reftests/forms/textarea/padding-scrollbar-placement.html44
-rw-r--r--layout/reftests/forms/textarea/reftest-stylo.list23
-rw-r--r--layout/reftests/forms/textarea/reftest.list14
-rw-r--r--layout/reftests/forms/textarea/resize-background-ref.html30
-rw-r--r--layout/reftests/forms/textarea/resize-background.html3
-rw-r--r--layout/reftests/forms/textarea/resize-ref.html3
-rw-r--r--layout/reftests/forms/textarea/resize.html3
-rw-r--r--layout/reftests/forms/textarea/rtl-dynamic-attr.html18
-rw-r--r--layout/reftests/forms/textarea/rtl-dynamic-style.html18
-rw-r--r--layout/reftests/forms/textarea/rtl-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/rtl.html10
-rw-r--r--layout/reftests/forms/textarea/setvalue-framereconstruction-1.html50
-rw-r--r--layout/reftests/forms/textarea/setvalue-framereconstruction-ref.html17
-rw-r--r--layout/reftests/forms/textarea/various-cols-ref.html4
-rw-r--r--layout/reftests/forms/textarea/various-cols.html4
22 files changed, 370 insertions, 0 deletions
diff --git a/layout/reftests/forms/textarea/in-dynamic-rtl-doc.html b/layout/reftests/forms/textarea/in-dynamic-rtl-doc.html
new file mode 100644
index 000000000..c8afa20cf
--- /dev/null
+++ b/layout/reftests/forms/textarea/in-dynamic-rtl-doc.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body style="text-align: left">
+ <textarea cols=20 rows=4></textarea>
+ <script>
+ onload = function() {
+ setTimeout(function() {
+ document.dir = "rtl";
+ document.documentElement.removeAttribute("class");
+ });
+ };
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html b/layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html
new file mode 100644
index 000000000..e6b14358e
--- /dev/null
+++ b/layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html dir="ltr">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4 style="overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html b/layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html
new file mode 100644
index 000000000..8c915b5ee
--- /dev/null
+++ b/layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4 style="float: left; overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/ltr-scrollbar.html b/layout/reftests/forms/textarea/ltr-scrollbar.html
new file mode 100644
index 000000000..927fbede6
--- /dev/null
+++ b/layout/reftests/forms/textarea/ltr-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea dir="ltr" cols=20 rows=4 style="overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/ltr.html b/layout/reftests/forms/textarea/ltr.html
new file mode 100644
index 000000000..c7e84be0e
--- /dev/null
+++ b/layout/reftests/forms/textarea/ltr.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/no-resize.html b/layout/reftests/forms/textarea/no-resize.html
new file mode 100644
index 000000000..fbf879653
--- /dev/null
+++ b/layout/reftests/forms/textarea/no-resize.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4 style="resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html b/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html
new file mode 100644
index 000000000..30928bbd7
--- /dev/null
+++ b/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Padding and Scrollbar Placement Test Reference</title>
+ <style>input, textarea { border-radius:0; background:none; border:none; }</style>
+ <style type="text/css">
+ #t {
+ display: block;
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ padding: 50px;
+ width: 300px;
+ height: 100px;
+ border: 5px solid red;
+ margin: 10px;
+ overflow: scroll;
+ font-family: verdana;
+ white-space: pre-wrap;
+ z-index: 0; /* force a stacking context */
+ }
+ #cover {
+ position: absolute;
+ left: 400px;
+ top: 50px;
+ width: 100px;
+ height: 300px;
+ background: black;
+ }
+ #cover2 { /* corresponds to the bottom padding inside the textarea */
+ position: absolute;
+ left: 0px;
+ bottom: 0px;
+ width: 100%;
+ height: 50px;
+ background: white;
+ }
+ </style>
+ </head>
+ <body>
+ <script>
+ var ss = [];
+ for (var i = 0; i < 1000; ++i) {
+ ss.push(i);
+ }
+ document.write("<div id='t'><div id=cover2></div>" + ss.join(" ") + "</div>");
+ </script>
+ <div id="cover"></div>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/padding-scrollbar-placement.html b/layout/reftests/forms/textarea/padding-scrollbar-placement.html
new file mode 100644
index 000000000..e1b0d7d67
--- /dev/null
+++ b/layout/reftests/forms/textarea/padding-scrollbar-placement.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Padding and Scrollbar Placement Test</title>
+ <style>input, textarea { border-radius:0; background:none; border:none; }</style>
+ <style type="text/css">
+ #t {
+ display: block;
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ padding: 50px;
+ width: 300px;
+ height: 100px;
+ border: 5px solid red;
+ margin: 10px;
+ overflow: scroll;
+ font-family: verdana;
+ resize: none;
+ color: black;
+ z-index: 0; /* force a stacking context */
+ }
+ #cover {
+ position: absolute;
+ left: 400px;
+ top: 50px;
+ width: 100px;
+ height: 300px;
+ background: black;
+ }
+ </style>
+ </head>
+ <body>
+ <script>
+ var ss = [];
+ for (var i = 0; i < 1000; ++i) {
+ ss.push(i);
+ }
+ document.write("<textarea id='t'>" + ss.join(" ") + "</textarea>");
+ </script>
+ <div id="cover"></div>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/reftest-stylo.list b/layout/reftests/forms/textarea/reftest-stylo.list
new file mode 100644
index 000000000..0a050f16b
--- /dev/null
+++ b/layout/reftests/forms/textarea/reftest-stylo.list
@@ -0,0 +1,23 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+skip-if(B2G||Mulet||Android) == resize.html resize.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+# an offset seems to apply to the native resizer on windows so skip this test for now
+fails skip-if(B2G||Mulet||Android) skip-if(winWidget) fuzzy-if(cocoaWidget,1,33) fuzzy-if(skiaContent&&!winWidget,5,10) == resize-background.html resize-background.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet||Android) == ltr.html ltr.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet||Android) == ltr-scrollbar.html ltr-scrollbar.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip == in-ltr-doc-scrollbar.html in-ltr-doc-scrollbar.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet||Android) == ltr.html ltr.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet||Android) fails-if(xulRuntime.widgetToolkit=="gtk2") == rtl.html rtl.html
+# bug 834724
+# Initial mulet triage: parity with B2G/B2G Desktop
+== rtl.html rtl.html
+== rtl.html rtl.html
+== rtl.html rtl.html
+fuzzy-if(skiaContent,1,3) == setvalue-framereconstruction-1.html setvalue-framereconstruction-1.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,102,4168) == padding-scrollbar-placement.html padding-scrollbar-placement.html
+== various-cols.html various-cols.html
diff --git a/layout/reftests/forms/textarea/reftest.list b/layout/reftests/forms/textarea/reftest.list
new file mode 100644
index 000000000..aee3654cb
--- /dev/null
+++ b/layout/reftests/forms/textarea/reftest.list
@@ -0,0 +1,14 @@
+skip-if(Android) == resize.html resize-ref.html
+# an offset seems to apply to the native resizer on windows so skip this test for now
+skip-if(Android) skip-if(winWidget) fuzzy-if(cocoaWidget,1,33) fuzzy-if(skiaContent&&!winWidget&&!Android,5,10) == resize-background.html resize-background-ref.html
+skip-if(Android) != ltr.html rtl.html
+skip-if(Android) != ltr-scrollbar.html rtl-scrollbar.html
+skip-if(Android) != in-ltr-doc-scrollbar.html in-rtl-doc-scrollbar.html
+skip-if(Android) != ltr.html no-resize.html
+skip-if(Android) fails-if(xulRuntime.widgetToolkit=="gtk2") != rtl.html no-resize.html # bug 834724
+== rtl.html rtl-dynamic-attr.html
+== rtl.html rtl-dynamic-style.html
+== rtl.html in-dynamic-rtl-doc.html
+fuzzy-if(skiaContent,1,3) == setvalue-framereconstruction-1.html setvalue-framereconstruction-ref.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,102,4168) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html
+== various-cols.html various-cols-ref.html
diff --git a/layout/reftests/forms/textarea/resize-background-ref.html b/layout/reftests/forms/textarea/resize-background-ref.html
new file mode 100644
index 000000000..c0a97fb63
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-background-ref.html
@@ -0,0 +1,30 @@
+<html>
+<script>
+function sizeResizer() {
+ // reference resizer
+ var img = document.getElementsByTagName("img")[0];
+ // hidden textarea
+ var textarea = document.getElementsByTagName("textarea")[0];
+ var width = 200 - textarea.clientWidth;
+ var height = 200 - textarea.clientHeight;
+ // (Leave test failing if a scrollbar is missing)
+ if (width != 0 && height != 0) {
+ img.style.width = width + "px";
+ img.style.left = textarea.clientWidth + "px";
+ img.style.height = height + "px";
+ img.style.top = textarea.clientHeight + "px";
+ }
+}
+</script>
+<body onload="sizeResizer()">
+<textarea style="width: 200px; height: 200px; margin: 0; border: none;
+ background: red; font-size: 400px;">
+M
+</textarea>
+<div style="position: relative; top: -200px;
+ width: 200px; height: 200px; margin: 0; border: none;
+ background: lightgreen">
+ <img style="position: relative;" src="chrome://global/skin/icons/resizer.png">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/forms/textarea/resize-background.html b/layout/reftests/forms/textarea/resize-background.html
new file mode 100644
index 000000000..24c6f70d8
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-background.html
@@ -0,0 +1,3 @@
+<html><body>
+<textarea style="width: 200px; height: 200px; margin: 0; background: lightgreen; border: none;"></textarea>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize-ref.html b/layout/reftests/forms/textarea/resize-ref.html
new file mode 100644
index 000000000..5d3334889
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-ref.html
@@ -0,0 +1,3 @@
+<html><body>
+<div style="overflow: auto; resize: both; background: white; -moz-appearance: none; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;"></div>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize.html b/layout/reftests/forms/textarea/resize.html
new file mode 100644
index 000000000..f513b4634
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize.html
@@ -0,0 +1,3 @@
+<html><body>
+<textarea style="-moz-appearance: none; background: white; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;" resizable="false" multiline="true" width="100" height="100"></textarea>
+</body></html>
diff --git a/layout/reftests/forms/textarea/rtl-dynamic-attr.html b/layout/reftests/forms/textarea/rtl-dynamic-attr.html
new file mode 100644
index 000000000..47f97baa7
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl-dynamic-attr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4></textarea>
+ <script>
+ onload = function() {
+ setTimeout(function() {
+ document.querySelector("textarea").setAttribute("dir", "rtl");
+ document.documentElement.removeAttribute("class");
+ });
+ };
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/rtl-dynamic-style.html b/layout/reftests/forms/textarea/rtl-dynamic-style.html
new file mode 100644
index 000000000..8997e31c0
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl-dynamic-style.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4></textarea>
+ <script>
+ onload = function() {
+ setTimeout(function() {
+ document.querySelector("textarea").style.direction = "rtl";
+ document.documentElement.removeAttribute("class");
+ });
+ };
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/rtl-scrollbar.html b/layout/reftests/forms/textarea/rtl-scrollbar.html
new file mode 100644
index 000000000..2770dc694
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea dir="rtl" cols=20 rows=4 style="overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/rtl.html b/layout/reftests/forms/textarea/rtl.html
new file mode 100644
index 000000000..984f9d9aa
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea dir="rtl" cols=20 rows=4></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/setvalue-framereconstruction-1.html b/layout/reftests/forms/textarea/setvalue-framereconstruction-1.html
new file mode 100644
index 000000000..dd8f1d2c0
--- /dev/null
+++ b/layout/reftests/forms/textarea/setvalue-framereconstruction-1.html
@@ -0,0 +1,50 @@
+<!--
+
+This test is mostly a copy of layout/forms/crashtests/373586-1.xhtml,
+and it makes sure that the value setter works correctly when setting
+the value causes the frame to be reconstructed.
+
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+<head>
+
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="foo">
+ <content>
+ <children xmlns="http://www.mozilla.org/xbl" />
+ </content>
+ </binding>
+</bindings>
+
+<script>
+function boom()
+{
+ document.getElementById("div").style.MozBinding = "url('#foo')";
+
+ var opt1 = document.getElementById("opt1");
+ opt1.removeChild(opt1.firstChild);
+
+ document.getElementById("textarea").value += " y";
+
+ document.getElementById("div").style.MozBinding = "";
+ document.documentElement.removeAttribute("class")
+}
+
+window.addEventListener("MozReftestInvalidate", boom, false);
+</script>
+
+</head>
+
+<body>
+
+<div id="div">
+ <textarea rows="3" cols="5" id="textarea">x</textarea>
+</div>
+
+<select style="-moz-appearance:none">
+ <option id="opt1">opt1</option>
+</select>
+
+</body>
+</html>
+
diff --git a/layout/reftests/forms/textarea/setvalue-framereconstruction-ref.html b/layout/reftests/forms/textarea/setvalue-framereconstruction-ref.html
new file mode 100644
index 000000000..3f5108815
--- /dev/null
+++ b/layout/reftests/forms/textarea/setvalue-framereconstruction-ref.html
@@ -0,0 +1,17 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+</head>
+
+<body>
+
+<div id="div">
+ <textarea rows="3" cols="5" id="textarea">x y</textarea>
+</div>
+
+<select style="-moz-appearance:none">
+ <option id="opt1"></option>
+</select>
+
+</body>
+</html>
+
diff --git a/layout/reftests/forms/textarea/various-cols-ref.html b/layout/reftests/forms/textarea/various-cols-ref.html
new file mode 100644
index 000000000..7ba962e61
--- /dev/null
+++ b/layout/reftests/forms/textarea/various-cols-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<textarea cols="20"></textarea><br>
+<textarea cols="20"></textarea><br>
+<textarea cols="20"></textarea>
diff --git a/layout/reftests/forms/textarea/various-cols.html b/layout/reftests/forms/textarea/various-cols.html
new file mode 100644
index 000000000..dc62941d8
--- /dev/null
+++ b/layout/reftests/forms/textarea/various-cols.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<textarea></textarea><br>
+<textarea cols="0"></textarea><br>
+<textarea cols="-1"></textarea>