Test case for focusing readonly elements
authorjpfau@apple.com <jpfau@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 May 2012 22:21:06 +0000 (22:21 +0000)
committerjpfau@apple.com <jpfau@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 May 2012 22:21:06 +0000 (22:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87429

Reviewed by Joseph Pecoraro.

* fast/forms/input-readonly-focus-expected.txt: Added.
* fast/forms/input-readonly-focus.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@118428 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/forms/input-readonly-focus-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/input-readonly-focus.html [new file with mode: 0644]

index 5bae5f9..36f5bc8 100644 (file)
@@ -1,3 +1,13 @@
+2012-05-24  Jeffrey Pfau  <jpfau@apple.com>
+
+        Test case for focusing readonly elements
+        https://bugs.webkit.org/show_bug.cgi?id=87429
+
+        Reviewed by Joseph Pecoraro.
+
+        * fast/forms/input-readonly-focus-expected.txt: Added.
+        * fast/forms/input-readonly-focus.html: Added.
+
 2012-05-24  Levi Weintraub  <leviw@chromium.org>
 
         Avoid creating InlineBoxes for floating and positioned objects in isolates.
diff --git a/LayoutTests/fast/forms/input-readonly-focus-expected.txt b/LayoutTests/fast/forms/input-readonly-focus-expected.txt
new file mode 100644 (file)
index 0000000..7ef22e9
--- /dev/null
@@ -0,0 +1 @@
+PASS
diff --git a/LayoutTests/fast/forms/input-readonly-focus.html b/LayoutTests/fast/forms/input-readonly-focus.html
new file mode 100644 (file)
index 0000000..7a9be65
--- /dev/null
@@ -0,0 +1,25 @@
+<html>
+<head>
+<script>
+function runTest() {
+  window.layoutTestController.dumpAsText();
+
+  var input = document.getElementById('i');
+  eventSender.mouseMoveTo(input.offsetLeft + input.offsetWidth / 2, input.offsetTop + input.offsetHeight / 2);
+  eventSender.mouseDown();
+  eventSender.mouseUp();
+}
+window.onload = function() {
+  var input = document.getElementById('i');
+  input.onfocus = function(e) {
+    document.body.innerHTML = 'PASS';
+  }
+  if (window.layoutTestController)
+    runTest();
+}
+</script>
+</head>
+<body>
+<input id="i" readonly>
+</body>
+</html>