author | Matt Brubeck <mbrubeck@mozilla.com> |
Wed, 05 Oct 2011 15:12:02 -0700 | |
changeset 78178 | 4831f64bc4adec6ce07e90c775ce60e9d9c5a94e |
parent 78177 | 0e2a6ed2d6c054299e94108922ab2438e59f200c |
child 78179 | 42fef1d287a5f2c24b6d6dff7b87789ff16c23e2 |
push id | 21275 |
push user | bmo@edmorley.co.uk |
push date | Thu, 06 Oct 2011 10:15:46 +0000 |
treeherder | mozilla-central@f107192c7d59 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mfinkle |
bugs | 692123 |
milestone | 10.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/mobile/chrome/tests/browser_escape.js +++ b/mobile/chrome/tests/browser_escape.js @@ -96,16 +96,30 @@ function testGoBack() { function testReturnToOwner() { tab1 = Browser.addTab("about:blank", true); tab2 = Browser.addTab("about:blank", true, tab1); is(Browser.selectedTab, tab2, "tab2 is selected"); EventUtils.sendKey("ESCAPE", window); is(Browser.selectedTab, tab1, "tab1 is selected"); closeTabs(); + testContextMenu(); +} + +function testContextMenu() { + ContextHelper.showPopup({ + json: { + types: ['link'] + }, + target: Browser.selectedBrowser + }); + ok(ContextHelper.popupState, "Context menu is shown"); + Browser.selectedBrowser.focus(); + EventUtils.synthesizeKey("VK_ESCAPE", {type: "keypress"}, window); + ok(!ContextHelper.popupState, "Context menu is dismissed"); finish(); } function closeTabs() { try { Browser.closeTab(tab1); Browser.closeTab(tab2); } finally {