I'd like to write a browser_test which triggers a context menu on an image and chooses the "Save Image As" option.Does any mechanism exist for this?
I saw webkit/glue/context_menu_unittest, which simulates mouse events to trigger it, but am concerned that this will be fragile. For example, on Win we show the context menu at mouse up, but on Mac/Lin we show at mouse down. We'd also have to get the correct screen coordinates for the image, and I also want to choose a particular item from the list.If nothing exists I'll try to figure out how to do this.
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
On Thu, Feb 2, 2012 at 4:13 PM, Chris Bentzel <cben...@chromium.org> wrote:I'd like to write a browser_test which triggers a context menu on an image and chooses the "Save Image As" option.Does any mechanism exist for this?
In chrome/browser/extensions/extension_webnavigation_apitest.cc I create a fake (ui-less) context menu and trigger a command on it to test "open link in new tab"