Bug 665677, remove frequently failing test as what it is testing is already done within the main focus test, f=masayuki

This commit is contained in:
Neil Deakin 2012-05-16 19:55:08 -04:00
parent cbf8f0a3d6
commit 65c16f8e8d
3 changed files with 2 additions and 51 deletions

View File

@ -50,7 +50,6 @@ _TEST_FILES = \
$(NULL)
_CHROME_FILES = \
test_bug330705-2.xul \
test_bug233643.xul \
test_bug398289.html \
398289-resource.xul \

View File

@ -1,50 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
title="Test for Bug 330705">
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=330705
-->
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body xmlns="http://www.w3.org/1999/xhtml">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=330705">Mozilla Bug 330705</a>
<p id="display">
<box tabindex="1" style="-moz-user-focus:normal;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>
<box tabindex="1" style="-moz-user-focus:normal;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>
</p>
<div id="content" style="display: none">
<script class="testbody" type="text/javascript">
<![CDATA[
SimpleTest.waitForExplicitFinish();
var isFocused = false;
function doTest() {
document.getElementsByTagName('box')[1].blur();
setTimeout(function () {
ok(isFocused,
"The first box element is still focused after blur() has been called on the second box element");
SimpleTest.finish();
}, 0);
}
function onLoad() {
var box = document.getElementsByTagName('box')[0];
box.addEventListener('focus', function() {
isFocused = true;
setTimeout(doTest, 0);
box.removeEventListener('focus', arguments.callee, true);
}, true);
box.addEventListener('blur', function() { isFocused = false;}, true);
box.focus();
}
addLoadEvent(onLoad);
]]>
</script>
<pre id="test">
</pre>
</div>
</body>
</window>

View File

@ -491,7 +491,9 @@ function startTest()
ok(gEvents === "", "focusing element that is already focused");
$("t2").blur();
$("t7").blur();
ok(gEvents === "", "blurring element that is not focused");
is(document.activeElement, $("t1"), "old element still focused after blur() on another element");
// focus() method on elements that are not tabbable
for (idx = 1; idx <= kFocusSteps; idx++) {