Bug 569955 - Add a test to make sure that autofocus on input elements does not work if they don't have a frame; r=ehsan
authorMounir Lamouri <mounir.lamouri@gmail.com>
Fri, 04 Jun 2010 13:25:54 -0400
changeset 43095 db50c47cb0bd5762347a6c916cfc10a9a46a792c
parent 43094 4f8458252dac2c09f1bd7ea4e82eb822bd771968
child 43096 b2a130aa75bac0128c039ccde90b7b015c9eb667
push id13614
push usereakhgari@mozilla.com
push dateFri, 04 Jun 2010 17:26:25 +0000
treeherdermozilla-central@db50c47cb0bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs569955
milestone1.9.3a5pre
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 569955 - Add a test to make sure that autofocus on input elements does not work if they don't have a frame; r=ehsan
content/html/content/test/Makefile.in
content/html/content/test/test_bug569955.html
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -178,12 +178,13 @@ include $(topsrcdir)/config/rules.mk
 		test_bug377624.html \
 		test_bug562932.html \
 		test_bug551846.html \
 		test_bug566046.html \
 		test_bug567938-1.html \
 		test_bug567938-2.html \
 		test_bug567938-3.html \
 		test_bug567938-4.html \
+		test_bug569955.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
new file mode 100644
--- /dev/null
+++ b/content/html/content/test/test_bug569955.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=569955
+-->
+<head>
+  <title>Test for Bug 569955</title>
+  <script type="application/javascript" src="/MochiKit/packed.js"></script>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body onload="SimpleTest.executeSoon(runTests);">
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=569955">Mozilla Bug 569955</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+  <input id='i' autofocus>
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 569955 **/
+
+SimpleTest.waitForExplicitFinish();
+
+function runTests()
+{
+  isnot(document.activeElement, document.getElementById('i'),
+        "not rendered elements can't be autofocused");
+  SimpleTest.finish();
+}
+
+</script>
+</pre>
+</body>
+</html>