Bug 692123 - browser-chrome test for bug 692123 [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 05 Oct 2011 15:12:02 -0700
changeset 78178 4831f64bc4ad
parent 78177 0e2a6ed2d6c0
child 78179 42fef1d287a5
push id21275
push userbmo@edmorley.co.uk
push date2011-10-06 10:15 +0000
treeherdermozilla-central@f107192c7d59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs692123
milestone10.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
Bug 692123 - browser-chrome test for bug 692123 [r=mfinkle]
mobile/chrome/tests/browser_escape.js
--- 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 {