mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
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
This commit is contained in:
parent
349b408597
commit
2865a66cc7
@ -183,6 +183,7 @@ _TEST_FILES = test_bug589.html \
|
||||
test_bug567938-2.html \
|
||||
test_bug567938-3.html \
|
||||
test_bug567938-4.html \
|
||||
test_bug569955.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
35
content/html/content/test/test_bug569955.html
Normal file
35
content/html/content/test/test_bug569955.html
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user