Closed Bug 678748 Opened 9 years ago Closed 9 years ago
Add tests for textbox context menu
We don't currently test for the various states of a textbox contextmneu. The clipboard and text selection mode can cause various different modes to interact. This patch passed on Android and Maemo on Try and for Linux desktop locally. Note, the double "input-text" entry might be caused by the <input> and inner anonymous elements. We should look into that bug too. I just ran out of time and wanted to get this code in a bug.
I know why "input-text" is added twice. We push it here: http://hg.mozilla.org/mozilla-central/diff/7134694f4edf/mobile/chrome/content/content.js and it's pushed as a registered handler here: http://hg.mozilla.org/mozilla-central/diff/c0d2d5c50984/mobile/chrome/content/content.js registered here: http://hg.mozilla.org/mozilla-central/diff/7134694f4edf/mobile/chrome/content/content.js We could remove the registration, or we could move the code in onContextMenu into the registered handler. All the other handlers are lightweight and don't really add anything to the "state". They also don't push any extra types into the "state" - like "copy", "select-all", etc I suppose we could consider the textbox code in onContextMennu to be fundamental, like the link and image code. Thoughts? I can put up a patch to remove the registered handler. I am leaning to that solution.
(In reply to Mark Finkle (:mfinkle) from comment #1) > I suppose we could consider the textbox code in onContextMennu to be > fundamental, like the link and image code. Thoughts? Yes, that sounds fine. > I can put up a patch to remove the registered handler. I am leaning to that > solution. I agree.
This patch removes the "registerHandler" for input-text and also tries very hard to keep existing clipboard contents from screwing up the test. Honestly, | edit.readOnly = true | is the only sure fire way. Trying to empty the clipboard wasn't working well enough. A timing issue I suppose.
Attachment #554670 - Flags: review?(mbrubeck) → review+
Backed out on inbound because the test is failing: https://hg.mozilla.org/integration/mozilla-inbound/rev/dddbe27e21a8
pushed again since the clipboard issue was fixed http://hg.mozilla.org/integration/mozilla-inbound/rev/0c9fda3714fb the run was green
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 9
You need to log in before you can comment on or make changes to this bug.