Backout changeset 46dc0fb0b1cb (bug 674770) because of yet another mochitest-3 Windows failure

--HG--
extra : rebase_source : a0739cd5d2eb66015d785c107151507f8a8113e3
This commit is contained in:
Ehsan Akhgari 2011-08-18 16:25:11 -04:00
Родитель 6c7260ce7e
Коммит eb0c0c8650
5 изменённых файлов: 1 добавлений и 88 удалений

Просмотреть файл

@ -389,16 +389,6 @@ nsEditorEventListener::MouseClick(nsIDOMEvent* aMouseEvent)
// IME to commit before we change the cursor position
mEditor->ForceCompositionEnd();
nsCOMPtr<nsIDOMEventTarget> target;
aMouseEvent->GetTarget(getter_AddRefs(target));
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(target);
NS_ENSURE_TRUE(node, NS_ERROR_FAILURE);
if (!mEditor->IsModifiableNode(node)) {
// We shouldn't handle the event for non-editable content.
return NS_OK;
}
PRUint16 button = (PRUint16)-1;
mouseEvent->GetButton(&button);
// middle-mouse click (paste);

Просмотреть файл

@ -84,8 +84,6 @@ _TEST_FILES = \
test_bug629845.html \
test_bug640321.html \
test_bug668599.html \
test_bug674770.html \
file_bug674770.html \
test_bug674861.html \
test_bug676401.html \
test_CF_HTML_clipboard.html \

Просмотреть файл

@ -1,5 +0,0 @@
<!DOCTYPE>
<script>
localStorage["clicked"] = "true";
close();
</script>

Просмотреть файл

@ -1,70 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=674770
-->
<head>
<title>Test for Bug 674770</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=674770">Mozilla Bug 674770</a>
<p id="display"></p>
<div id="content">
<a href="file_bug674770.html" id="link1">test</a>
<div contenteditable>
<a href="file_bug674770.html" id="link2">test</a>
</div>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 674770 **/
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
SpecialPowers.setBoolPref("middlemouse.paste", true);
localStorage.removeItem("clicked");
window.linkWasClicked = false;
var link = document.querySelector("#link1");
addEventListener("storage", function(e) {
is(e.key, "clicked", "Correct event");
is(e.newValue, "true", "Correct value");
window.linkWasClicked = true;
}, false);
synthesizeMouseAtCenter(link, {button: 1});
hitEventLoop(function() {
ok(window.linkWasClicked, "The click operation worked successfully");
window.linkWasClicked = false;
link = document.querySelector("#link2");
localStorage.removeItem("clicked");
synthesizeMouseAtCenter(link, {button: 1});
hitEventLoop(function() {
ok(!window.linkWasClicked, "The click operation shouldn't work in the contenteditable area");
localStorage.removeItem("clicked");
SpecialPowers.clearUserPref("middlemouse.paste");
focus(); // reset focus
SimpleTest.finish();
}, 100);
}, 100);
});
function hitEventLoop(func, times) {
if (times > 0) {
setTimeout(hitEventLoop, 0, func, times - 1);
} else {
setTimeout(func, 0);
}
}
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -24,7 +24,7 @@ line3
/** Test for Bug 597331 **/
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
addLoadEvent(function() {
var t = document.querySelector("textarea");
t.focus();
t.selectionStart = 4;