Bug 1450055 - Part 2. Add mochitest whether rendering caret or not. r=masayuki
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 08 Jan 2019 14:52:12 +0900
changeset 510114 85fda059ef060d64b39848b3897e313e1e9b4900
parent 510113 5c4619332810e4b9595ead4df95dd1ddbfee2acc
child 510115 a6cc9b822c1c1051961f8a293bc3e0331b8739d6
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1450055
milestone66.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 1450055 - Part 2. Add mochitest whether rendering caret or not. r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D15924
layout/base/tests/input-stoppropagation-ref.html
layout/base/tests/input-stoppropagation.html
layout/base/tests/mochitest.ini
layout/base/tests/test_reftests_with_caret.html
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/input-stoppropagation-ref.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<html>
+<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+<script>
+function onLoad() {
+  document.getElementById("input1").focus();
+  synthesizeKey("KEY_Tab");
+  synthesizeKey("KEY_Tab", {shiftKey: true});
+  synthesizeKey("KEY_Tab");
+}
+</script>
+<body onload="onLoad()">
+  <input type="text" id="input1"></input>
+  <input type="text" id="input2"></input>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/input-stoppropagation.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html>
+<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+<script>
+function onLoad() {
+  let input2 = document.getElementById("input2");
+  input2.addEventListener("focus", e => {
+    e.stopImmediatePropagation();
+  });
+  document.getElementById("input1").focus();
+  synthesizeKey("KEY_Tab");
+  synthesizeKey("KEY_Tab", {shiftKey: true});
+  synthesizeKey("KEY_Tab");
+}
+</script>
+<body onload="onLoad()">
+  <input type="text" id="input1"></input>
+  <input type="text" id="input2"></input>
+</body>
+</html>
--- a/layout/base/tests/mochitest.ini
+++ b/layout/base/tests/mochitest.ini
@@ -334,16 +334,18 @@ support-files =
   input-maxlength-ui-valid-change.html
   input-maxlength-valid-before-change.html
   input-maxlength-valid-change.html
   input-minlength-invalid-change.html
   input-minlength-ui-invalid-change.html
   input-minlength-ui-valid-change.html
   input-minlength-valid-before-change.html
   input-minlength-valid-change.html
+  input-stoppropagation.html
+  input-stoppropagation-ref.html
   input-valid-ref.html
   multi-range-script-select.html
   multi-range-script-select-ref.html
   multi-range-user-select.html
   multi-range-user-select-ref.html
   textarea-invalid-ref.html
   textarea-maxlength-invalid-change.html
   textarea-maxlength-ui-invalid-change.html
--- a/layout/base/tests/test_reftests_with_caret.html
+++ b/layout/base/tests/test_reftests_with_caret.html
@@ -143,16 +143,17 @@ var tests = [
     [ 'input-maxlength-invalid-change.html', 'input-invalid-ref.html'] ,
     [ 'input-minlength-valid-before-change.html', 'input-valid-ref.html'] ,
     [ 'input-minlength-valid-change.html', 'input-valid-ref.html'] ,
     [ 'input-minlength-invalid-change.html', 'input-invalid-ref.html'] ,
     [ 'input-maxlength-ui-valid-change.html', 'input-valid-ref.html'] ,
     [ 'input-maxlength-ui-invalid-change.html', 'input-invalid-ref.html'] ,
     [ 'input-minlength-ui-valid-change.html', 'input-valid-ref.html'] ,
     [ 'input-minlength-ui-invalid-change.html', 'input-invalid-ref.html'] ,
+    [ 'input-stoppropagation.html', 'input-stoppropagation-ref.html'] ,
     [ 'textarea-maxlength-valid-before-change.html', 'textarea-valid-ref.html'] ,
     [ 'textarea-maxlength-valid-change.html', 'textarea-valid-ref.html'] ,
     [ 'textarea-maxlength-invalid-change.html', 'textarea-invalid-ref.html'] ,
     [ 'textarea-minlength-valid-before-change.html', 'textarea-valid-ref.html'] ,
     [ 'textarea-minlength-valid-change.html', 'textarea-valid-ref.html'] ,
     [ 'textarea-minlength-invalid-change.html', 'textarea-invalid-ref.html'] ,
     [ 'textarea-maxlength-ui-valid-change.html', 'textarea-valid-ref.html'] ,
     [ 'textarea-maxlength-ui-invalid-change.html', 'textarea-invalid-ref.html'] ,