Bug 1423331: Tests. r=mats
☠☠ backed out by 89d7ac0fbdc8 ☠ ☠
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 17 Dec 2017 02:48:49 +0100
changeset 452644 b047f4782ae2050665e5d958202a0f42d070fbbb
parent 452643 17660bff0c23f8fa046c368ee6c3eb50afe1a7ce
child 452645 0e8f44c99aa652be77516ba3a6a3c4eafddcb985
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1423331
milestone59.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 1423331: Tests. r=mats MozReview-Commit-ID: Ay4tUwSH0Iq
layout/base/tests/bug1423331-1-ref.html
layout/base/tests/bug1423331-1.html
layout/base/tests/bug1423331-2-ref.html
layout/base/tests/bug1423331-2.html
layout/base/tests/bug1423331-3.html
layout/base/tests/bug1423331-4.html
layout/base/tests/mochitest.ini
layout/base/tests/test_reftests_with_caret.html
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1423331-1-ref.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Test reference for bug 1423331: Contenteditable insertion with pseudo-elements</title>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<style>
+#editable {
+  outline: 1px solid black;
+  width: 300px;
+  height: 100px;
+}
+#editable::before {
+  content: "Write here";
+}
+</style>
+<div id="editable" contenteditable></div>
+<script>
+SimpleTest.waitForFocus(function() {
+  document.getElementById("editable").focus();
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1423331-1.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Test for bug 1423331: Contenteditable insertion with pseudo-elements</title>
+<script src="/tests/SimpleTest/EventUtils.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<style>
+#editable {
+  outline: 1px solid black;
+  width: 300px;
+  height: 100px;
+}
+#editable::before {
+  content: "Write here";
+}
+</style>
+<div id="editable" contenteditable></div>
+<script>
+SimpleTest.waitForFocus(function() {
+  let div = document.getElementById("editable");
+  synthesizeMouseAtCenter(div, {});
+  synthesizeMouseAtCenter(div, {});
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1423331-2-ref.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Test reference for bug 1423331: Contenteditable insertion with pseudo-elements</title>
+<script src="/tests/SimpleTest/EventUtils.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<style>
+#editable {
+  outline: 1px solid black;
+  width: 300px;
+  height: 100px;
+}
+</style>
+<div id="editable" contenteditable></div>
+<script>
+SimpleTest.waitForFocus(function() {
+  let div = document.getElementById("editable");
+  div.focus();
+  synthesizeKey("x", {});
+  synthesizeKey("x", {});
+  synthesizeKey("x", {});
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1423331-2.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Test for bug 1423331: Contenteditable insertion with pseudo-elements</title>
+<script src="/tests/SimpleTest/EventUtils.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<style>
+#editable {
+  outline: 1px solid black;
+  width: 300px;
+  height: 100px;
+}
+#editable:empty::before {
+  content: "Write here";
+}
+</style>
+<div id="editable" contenteditable></div>
+<script>
+SimpleTest.waitForFocus(function() {
+  let div = document.getElementById("editable");
+  synthesizeMouseAtCenter(div, {});
+  synthesizeMouseAtCenter(div, {});
+  synthesizeKey("x", {});
+  synthesizeKey("x", {});
+  synthesizeKey("x", {});
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1423331-3.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Test for bug 1423331: Contenteditable insertion with pseudo-elements</title>
+<script src="/tests/SimpleTest/EventUtils.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<style>
+#editable {
+  outline: 1px solid black;
+  width: 300px;
+  height: 100px;
+}
+#editable::before {
+  content: "Write here";
+}
+</style>
+<div id="editable" contenteditable></div>
+<script>
+SimpleTest.waitForFocus(function() {
+  let div = document.getElementById("editable");
+  synthesizeMouse(div, 2, 2, {});
+  synthesizeMouse(div, 2, 2, {});
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1423331-4.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Test for bug 1423331: Contenteditable insertion with pseudo-elements</title>
+<script src="/tests/SimpleTest/EventUtils.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<style>
+#editable {
+  outline: 1px solid black;
+  width: 300px;
+  height: 100px;
+}
+#editable:empty::before {
+  content: "Write here";
+}
+</style>
+<div id="editable" contenteditable></div>
+<script>
+SimpleTest.waitForFocus(function() {
+  let div = document.getElementById("editable");
+  synthesizeMouse(div, 2, 2, {});
+  synthesizeMouse(div, 2, 2, {});
+  synthesizeKey("x", {});
+  synthesizeKey("x", {});
+  synthesizeKey("x", {});
+});
+</script>
--- a/layout/base/tests/mochitest.ini
+++ b/layout/base/tests/mochitest.ini
@@ -302,16 +302,22 @@ support-files =
   bug1354478-4.html
   bug1354478-4-ref.html
   bug1354478-5.html
   bug1354478-5-ref.html
   bug1354478-6.html
   bug1354478-6-ref.html
   bug1359411.html
   bug1359411-ref.html
+  bug1423331-1.html
+  bug1423331-1-ref.html
+  bug1423331-2.html
+  bug1423331-2-ref.html
+  bug1423331-3.html
+  bug1423331-4.html
   image_rgrg-256x256.png
   input-invalid-ref.html
   input-maxlength-invalid-change.html
   input-maxlength-ui-invalid-change.html
   input-maxlength-ui-valid-change.html
   input-maxlength-valid-before-change.html
   input-maxlength-valid-change.html
   input-minlength-invalid-change.html
--- a/layout/base/tests/test_reftests_with_caret.html
+++ b/layout/base/tests/test_reftests_with_caret.html
@@ -166,17 +166,17 @@ var tests = [
     [ 'bug989012-2.html' , 'bug989012-2-ref.html' ] ,
     [ 'bug989012-3.html' , 'bug989012-3-ref.html' ] ,
     [ 'bug1007065-1.html' , 'bug1007065-1-ref.html' ] ,
     [ 'bug1007067-1.html' , 'bug1007067-1-ref.html' ] ,
     [ 'bug1061468.html'  , 'bug1061468-ref.html'  ] ,
     [ 'bug1097242-1.html', 'bug1097242-1-ref.html'] ,
     [ 'bug1109968-1.html', 'bug1109968-1-ref.html'] ,
     [ 'bug1109968-2.html', 'bug1109968-2-ref.html'] ,
-    // [ 'bug1123067-1.html' , 'bug1123067-ref.html'  ] , TODO: bug 1129205
+    [ 'bug1123067-1.html' , 'bug1123067-ref.html'  ] ,
     [ 'bug1123067-2.html' , 'bug1123067-ref.html'  ] ,
     [ 'bug1123067-3.html' , 'bug1123067-ref.html'  ] ,
     [ 'bug1132768-1.html' , 'bug1132768-1-ref.html'] ,
     [ 'bug1237236-1.html' , 'bug1237236-1-ref.html' ] ,
     [ 'bug1237236-2.html' , 'bug1237236-2-ref.html' ] ,
     [ 'bug1258308-2.html' , 'bug1258308-2-ref.html' ] ,
     [ 'bug1259949-1.html' , 'bug1259949-1-ref.html'] ,
     [ 'bug1259949-2.html' , 'bug1259949-2-ref.html'] ,
@@ -188,16 +188,20 @@ var tests = [
     [ 'bug1263357-5.html' , 'bug1263357-5-ref.html'] ,
     [ 'bug1354478-1.html' , 'bug1354478-1-ref.html'] ,
     [ 'bug1354478-2.html' , 'bug1354478-2-ref.html'] ,
     [ 'bug1354478-3.html' , 'bug1354478-3-ref.html'] ,
     [ 'bug1354478-4.html' , 'bug1354478-4-ref.html'] ,
     [ 'bug1354478-5.html' , 'bug1354478-5-ref.html'] ,
     [ 'bug1354478-6.html' , 'bug1354478-6-ref.html'] ,
     [ 'bug1359411.html'   , 'bug1359411-ref.html' ] ,
+    [ 'bug1423331-1.html' , 'bug1423331-1-ref.html' ] ,
+    [ 'bug1423331-2.html' , 'bug1423331-2-ref.html' ] ,
+    [ 'bug1423331-3.html' , 'bug1423331-1-ref.html' ] ,
+    [ 'bug1423331-4.html' , 'bug1423331-2-ref.html' ] ,
     function() {SpecialPowers.pushPrefEnv({'clear': [['layout.accessiblecaret.enabled']]}, nextTest);} ,
 ];
 
 if (navigator.appVersion.indexOf("Android") == -1) {
   tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]);
   tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]);
   tests.push([ 'bug923376.html'   , 'bug923376-ref.html'   ]);
   tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['layout.css.overflow-clip-box.enabled', true]]}, nextTest);});