Backed out changeset 48d2538788ec (bug 848489) for Marionette failures on a CLOSED TREE.

This commit is contained in:
Ryan VanderMeulen 2013-03-26 16:07:31 -04:00
parent f789208be8
commit 3a9b5cdcb3
3 changed files with 0 additions and 40 deletions

View File

@ -1,17 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import time
from marionette_test import MarionetteTestCase
from marionette import Actions
class testSingleFinger(MarionetteTestCase):
def test_chain(self):
testTouch = self.marionette.absolute_url("testAction.html")
self.marionette.navigate(testTouch)
button = self.marionette.find_element("id", "mozLinkCopy")
action = Actions(self.marionette)
action.press(button).wait(5).perform()
time.sleep(15)
self.assertEqual("Context", self.marionette.execute_script("return document.getElementById('mozLinkCopy').innerHTML;"))

View File

@ -37,8 +37,6 @@
// here is second for a tap
second.addEventListener("touchstart", function(){changePressText("mozLinkCopy")}, false);
second.addEventListener("touchend", function(){changeClickText("mozLinkCopy")}, false);
// change for contextmenu
second.addEventListener("contextmenu", onContextMenuChange, false);
// here is third for horizontal move
third.addEventListener("touchstart", function(){changePressText("mozLinkStart")}, false);
third.addEventListener("touchmove", changeHorizontalMove, false);
@ -131,11 +129,6 @@
document.getElementById("delayed").innerHTML = "End";
}
}
function onContextMenuChange() {
var context = document.getElementById("mozLinkCopy");
context.innerHTML = "Context";
}
</script>
</body>
</html>

View File

@ -965,14 +965,6 @@ function actions(finger, touchId, command_id, i){
touch = createATouch(el, corx, cory, touchId);
lastTouch = touch;
emitTouchEvent('touchstart', touch);
// check if it's a long press
// standard waiting time to fire contextmenu
let standard = Services.prefs.getIntPref("ui.click_hold_context_menus.delay");
// long press only happens when wait follows press
if (finger[i][0] == 'wait' && finger[i][1] != null && finger[i][1]*1000 >= standard) {
finger[i][1] = finger[i][1] - standard/1000;
finger.splice(i, 0, ['wait', standard/1000], ['longPress']);
}
actions(finger,touchId, command_id, i);
break;
case 'release':
@ -1035,14 +1027,6 @@ function actions(finger, touchId, command_id, i){
lastTouch = null;
actions(finger, touchId, command_id, i);
break;
case 'longPress':
let event = curWindow.document.createEvent('HTMLEvents');
event.initEvent('contextmenu',
true,
true);
lastTouch.target.dispatchEvent(event);
actions(finger, touchId, command_id, i);
break;
}
}