Fix line endings in these tests, no bug
authorGavin Sharp <gavin@gavinsharp.com>
Tue, 09 Oct 2012 14:44:49 +0200
changeset 109749 499af47f62ebf901d89477ab4aed6103b22b7665
parent 109748 73a42225bf227f73b9608686a69d21dcdf2f5541
child 109750 baefffd93dc19260751f98e0896128cdbfa22791
push id23652
push userryanvm@gmail.com
push dateWed, 10 Oct 2012 01:10:20 +0000
treeherdermozilla-central@5cca0408a73f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone19.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
Fix line endings in these tests, no bug
browser/base/content/test/browser_bug406216.js
browser/components/search/test/browser_addEngine.js
browser/components/tabview/test/browser_tabview_bug602432.js
browser/devtools/scratchpad/test/browser_scratchpad_bug_650760_help_key.js
--- a/browser/base/content/test/browser_bug406216.js
+++ b/browser/base/content/test/browser_bug406216.js
@@ -1,54 +1,54 @@
-/* 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/. */
-
-/*
- * "TabClose" event is possibly used for closing related tabs of the current.
- * "removeTab" method should work correctly even if the number of tabs are
- * changed while "TabClose" event.
- */
-
-var count = 0;
-const URIS = ["about:config",
-              "about:plugins",
-              "about:buildconfig",
-              "data:text/html,<title>OK</title>"];
-
-function test() {
-  waitForExplicitFinish();
-  URIS.forEach(addTab);
+/* 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/. */
+
+/*
+ * "TabClose" event is possibly used for closing related tabs of the current.
+ * "removeTab" method should work correctly even if the number of tabs are
+ * changed while "TabClose" event.
+ */
+
+var count = 0;
+const URIS = ["about:config",
+              "about:plugins",
+              "about:buildconfig",
+              "data:text/html,<title>OK</title>"];
+
+function test() {
+  waitForExplicitFinish();
+  URIS.forEach(addTab);
 }
-
-function addTab(aURI, aIndex) {
-  var tab = gBrowser.addTab(aURI);
-  if (aIndex == 0)
+
+function addTab(aURI, aIndex) {
+  var tab = gBrowser.addTab(aURI);
+  if (aIndex == 0)
     gBrowser.removeTab(gBrowser.tabs[0]);
-
-  tab.linkedBrowser.addEventListener("load", function (event) {
-    event.currentTarget.removeEventListener("load", arguments.callee, true);
-    if (++count == URIS.length)
-      executeSoon(doTabsTest);
-  }, true);
-}
-
-function doTabsTest() {
+
+  tab.linkedBrowser.addEventListener("load", function (event) {
+    event.currentTarget.removeEventListener("load", arguments.callee, true);
+    if (++count == URIS.length)
+      executeSoon(doTabsTest);
+  }, true);
+}
+
+function doTabsTest() {
   is(gBrowser.tabs.length, URIS.length, "Correctly opened all expected tabs");
-
-  // sample of "close related tabs" feature
-  gBrowser.tabContainer.addEventListener("TabClose", function (event) {
-    event.currentTarget.removeEventListener("TabClose", arguments.callee, true);
-    var closedTab = event.originalTarget;
-    var scheme = closedTab.linkedBrowser.currentURI.scheme;
-    Array.slice(gBrowser.tabs).forEach(function (aTab) {
+
+  // sample of "close related tabs" feature
+  gBrowser.tabContainer.addEventListener("TabClose", function (event) {
+    event.currentTarget.removeEventListener("TabClose", arguments.callee, true);
+    var closedTab = event.originalTarget;
+    var scheme = closedTab.linkedBrowser.currentURI.scheme;
+    Array.slice(gBrowser.tabs).forEach(function (aTab) {
       if (aTab != closedTab && aTab.linkedBrowser.currentURI.scheme == scheme)
-        gBrowser.removeTab(aTab);
-    });
-  }, true);
-
-  gBrowser.removeTab(gBrowser.tabs[0]);
-  is(gBrowser.tabs.length, 1, "Related tabs are not closed unexpectedly");
-
-  gBrowser.addTab("about:blank");
-  gBrowser.removeTab(gBrowser.tabs[0]);
-  finish();
-}
+        gBrowser.removeTab(aTab);
+    });
+  }, true);
+
+  gBrowser.removeTab(gBrowser.tabs[0]);
+  is(gBrowser.tabs.length, 1, "Related tabs are not closed unexpectedly");
+
+  gBrowser.addTab("about:blank");
+  gBrowser.removeTab(gBrowser.tabs[0]);
+  finish();
+}
--- a/browser/components/search/test/browser_addEngine.js
+++ b/browser/components/search/test/browser_addEngine.js
@@ -1,136 +1,136 @@
-/* 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/. */
-var gSS = Services.search;
-
-function observer(aSubject, aTopic, aData) {
-  if (!gCurrentTest) {
-    info("Observer called with no test active");
-    return;
-  }
-
-  let engine = aSubject.QueryInterface(Ci.nsISearchEngine);
-  info("Observer: " + aData + " for " + engine.name);
-  let method;
-  switch (aData) {
-    case "engine-added":
-      if (gCurrentTest.added)
-        method = "added"
-      break;
-    case "engine-current":
-      if (gCurrentTest.current)
-        method = "current";
-      break;
-    case "engine-removed":
-      if (gCurrentTest.removed)
-        method = "removed";
-      break;
-  }
-
-  if (method)
-    gCurrentTest[method](engine);
-}
-
-function checkEngine(checkObj, engineObj) {
-  info("Checking engine");
-  for (var prop in checkObj)
-    is(checkObj[prop], engineObj[prop], prop + " is correct");
-}
-
-var gTests = [
-  {
-    name: "opensearch install",
-    engine: {
-      name: "Foo",
-      alias: null,
-      description: "Foo Search",
-      searchForm: "http://mochi.test:8888/browser/browser/components/search/test/",
-      type: Ci.nsISearchEngine.TYPE_OPENSEARCH
-    },
-    run: function () {
-      gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml",
-                    Ci.nsISearchEngine.DATA_XML, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
-                    false);
-    },
-    added: function (engine) {
-      ok(engine, "engine was added.");
-
-      checkEngine(this.engine, engine);
-
-      let engineFromSS = gSS.getEngineByName(this.engine.name);
-      is(engine, engineFromSS, "engine is obtainable via getEngineByName");
-
-      let aEngine = gSS.getEngineByAlias("fooalias");
-      ok(!aEngine, "Alias was not parsed from engine description");
-
-      gSS.currentEngine = engine;
-    },
-    current: function (engine) {
-      let currentEngine = gSS.currentEngine;
-      is(engine, currentEngine, "engine is current");
-      is(engine.name, this.engine.name, "current engine was changed successfully");
-
-      gSS.removeEngine(engine);
-    },
-    removed: function (engine) {
-      let currentEngine = gSS.currentEngine;
-      ok(currentEngine, "An engine is present.");
-      isnot(currentEngine.name, this.engine.name, "Current engine reset after removal");
-
-      nextTest();
-    }
-  },
-  {
-    name: "sherlock install",
-    engine: {
-      name: "Test Sherlock",
-      alias: null,
-      description: "Test Description",
-      searchForm: "http://example.com/searchform",
-      type: Ci.nsISearchEngine.TYPE_SHERLOCK
-    },
-    run: function () {
-      gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.src",
-                    Ci.nsISearchEngine.DATA_TEXT, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
-                    false);
-    },
-    added: function (engine) {
-      ok(engine, "engine was added.");
-      checkEngine(this.engine, engine);
-
-      let engineFromSS = gSS.getEngineByName(this.engine.name);
-      is(engineFromSS, engine, "engine is obtainable via getEngineByName");
-
-      gSS.removeEngine(engine);
-    },
-    removed: function (engine) {
-      let currentEngine = gSS.currentEngine;
-      ok(currentEngine, "An engine is present.");
-      isnot(currentEngine.name, this.engine.name, "Current engine reset after removal");
-
-      nextTest();
-    }
-  }
-];
-
-var gCurrentTest = null;
-function nextTest() {
-  if (gTests.length) {
-    gCurrentTest = gTests.shift();
-    info("Running " + gCurrentTest.name);
-    gCurrentTest.run();
-  } else
-    executeSoon(finish);
-}
-
-function test() {
-  waitForExplicitFinish();
-  Services.obs.addObserver(observer, "browser-search-engine-modified", false);
-  registerCleanupFunction(cleanup);
-
-  nextTest();
-}
-
-function cleanup() {
-  Services.obs.removeObserver(observer, "browser-search-engine-modified");
-}
+/* 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/. */
+var gSS = Services.search;
+
+function observer(aSubject, aTopic, aData) {
+  if (!gCurrentTest) {
+    info("Observer called with no test active");
+    return;
+  }
+
+  let engine = aSubject.QueryInterface(Ci.nsISearchEngine);
+  info("Observer: " + aData + " for " + engine.name);
+  let method;
+  switch (aData) {
+    case "engine-added":
+      if (gCurrentTest.added)
+        method = "added"
+      break;
+    case "engine-current":
+      if (gCurrentTest.current)
+        method = "current";
+      break;
+    case "engine-removed":
+      if (gCurrentTest.removed)
+        method = "removed";
+      break;
+  }
+
+  if (method)
+    gCurrentTest[method](engine);
+}
+
+function checkEngine(checkObj, engineObj) {
+  info("Checking engine");
+  for (var prop in checkObj)
+    is(checkObj[prop], engineObj[prop], prop + " is correct");
+}
+
+var gTests = [
+  {
+    name: "opensearch install",
+    engine: {
+      name: "Foo",
+      alias: null,
+      description: "Foo Search",
+      searchForm: "http://mochi.test:8888/browser/browser/components/search/test/",
+      type: Ci.nsISearchEngine.TYPE_OPENSEARCH
+    },
+    run: function () {
+      gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml",
+                    Ci.nsISearchEngine.DATA_XML, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
+                    false);
+    },
+    added: function (engine) {
+      ok(engine, "engine was added.");
+
+      checkEngine(this.engine, engine);
+
+      let engineFromSS = gSS.getEngineByName(this.engine.name);
+      is(engine, engineFromSS, "engine is obtainable via getEngineByName");
+
+      let aEngine = gSS.getEngineByAlias("fooalias");
+      ok(!aEngine, "Alias was not parsed from engine description");
+
+      gSS.currentEngine = engine;
+    },
+    current: function (engine) {
+      let currentEngine = gSS.currentEngine;
+      is(engine, currentEngine, "engine is current");
+      is(engine.name, this.engine.name, "current engine was changed successfully");
+
+      gSS.removeEngine(engine);
+    },
+    removed: function (engine) {
+      let currentEngine = gSS.currentEngine;
+      ok(currentEngine, "An engine is present.");
+      isnot(currentEngine.name, this.engine.name, "Current engine reset after removal");
+
+      nextTest();
+    }
+  },
+  {
+    name: "sherlock install",
+    engine: {
+      name: "Test Sherlock",
+      alias: null,
+      description: "Test Description",
+      searchForm: "http://example.com/searchform",
+      type: Ci.nsISearchEngine.TYPE_SHERLOCK
+    },
+    run: function () {
+      gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.src",
+                    Ci.nsISearchEngine.DATA_TEXT, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
+                    false);
+    },
+    added: function (engine) {
+      ok(engine, "engine was added.");
+      checkEngine(this.engine, engine);
+
+      let engineFromSS = gSS.getEngineByName(this.engine.name);
+      is(engineFromSS, engine, "engine is obtainable via getEngineByName");
+
+      gSS.removeEngine(engine);
+    },
+    removed: function (engine) {
+      let currentEngine = gSS.currentEngine;
+      ok(currentEngine, "An engine is present.");
+      isnot(currentEngine.name, this.engine.name, "Current engine reset after removal");
+
+      nextTest();
+    }
+  }
+];
+
+var gCurrentTest = null;
+function nextTest() {
+  if (gTests.length) {
+    gCurrentTest = gTests.shift();
+    info("Running " + gCurrentTest.name);
+    gCurrentTest.run();
+  } else
+    executeSoon(finish);
+}
+
+function test() {
+  waitForExplicitFinish();
+  Services.obs.addObserver(observer, "browser-search-engine-modified", false);
+  registerCleanupFunction(cleanup);
+
+  nextTest();
+}
+
+function cleanup() {
+  Services.obs.removeObserver(observer, "browser-search-engine-modified");
+}
--- a/browser/components/tabview/test/browser_tabview_bug602432.js
+++ b/browser/components/tabview/test/browser_tabview_bug602432.js
@@ -1,45 +1,45 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function test() {
-  let checkUpdateTimes = function (groupItem) {
-    let children = groupItem.getChildren();
-    let earliestUpdateTime = children.shift()._testLastTabUpdateTime;
-
-    children.forEach(function (tabItem) {
-      let updateTime = tabItem._testLastTabUpdateTime;
-      ok(earliestUpdateTime <= updateTime, "Stacked group item update (" +
-         updateTime + ") > first item (" + earliestUpdateTime + ")");
-    });
-  }
-
-  waitForExplicitFinish();
-
-  newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
-
-    let numTabsToUpdate = 10;
-    let groupItem = createGroupItemWithBlankTabs(win, 150, 150, 100, numTabsToUpdate, false);
-    ok(groupItem.isStacked(), "groupItem is stacked");
-
-    let cw = win.TabView.getContentWindow();
-    cw.TabItems.pausePainting();
-
-    groupItem.getChildren().forEach(function (tabItem) {
-      tabItem.addSubscriber("updated", function onUpdated() {
-        tabItem.removeSubscriber("updated", onUpdated);
-        tabItem._testLastTabUpdateTime = tabItem._lastTabUpdateTime;
-
-        if (--numTabsToUpdate)
-          return;
-
-        checkUpdateTimes(groupItem);
-        finish();
-      });
-
-      cw.TabItems.update(tabItem.tab);
-    });
-
-    cw.TabItems.resumePainting();
-  });
-}
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function test() {
+  let checkUpdateTimes = function (groupItem) {
+    let children = groupItem.getChildren();
+    let earliestUpdateTime = children.shift()._testLastTabUpdateTime;
+
+    children.forEach(function (tabItem) {
+      let updateTime = tabItem._testLastTabUpdateTime;
+      ok(earliestUpdateTime <= updateTime, "Stacked group item update (" +
+         updateTime + ") > first item (" + earliestUpdateTime + ")");
+    });
+  }
+
+  waitForExplicitFinish();
+
+  newWindowWithTabView(function (win) {
+    registerCleanupFunction(function () win.close());
+
+    let numTabsToUpdate = 10;
+    let groupItem = createGroupItemWithBlankTabs(win, 150, 150, 100, numTabsToUpdate, false);
+    ok(groupItem.isStacked(), "groupItem is stacked");
+
+    let cw = win.TabView.getContentWindow();
+    cw.TabItems.pausePainting();
+
+    groupItem.getChildren().forEach(function (tabItem) {
+      tabItem.addSubscriber("updated", function onUpdated() {
+        tabItem.removeSubscriber("updated", onUpdated);
+        tabItem._testLastTabUpdateTime = tabItem._lastTabUpdateTime;
+
+        if (--numTabsToUpdate)
+          return;
+
+        checkUpdateTimes(groupItem);
+        finish();
+      });
+
+      cw.TabItems.update(tabItem.tab);
+    });
+
+    cw.TabItems.resumePainting();
+  });
+}
--- a/browser/devtools/scratchpad/test/browser_scratchpad_bug_650760_help_key.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_bug_650760_help_key.js
@@ -1,60 +1,60 @@
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function test()
-{
-  waitForExplicitFinish();
-
-  gBrowser.selectedTab = gBrowser.addTab();
-  content.location = "data:text/html,Test keybindings for opening Scratchpad MDN Documentation, bug 650760";
-  gBrowser.selectedBrowser.addEventListener("load", function onTabLoad() {
-    gBrowser.selectedBrowser.removeEventListener("load", onTabLoad, true);
-
-    ok(window.Scratchpad, "Scratchpad variable exists");
-
-    openScratchpad(runTest);
-  }, true);
-}
-
-function runTest()
-{
-  let sp = gScratchpadWindow.Scratchpad;
-  ok(sp, "Scratchpad object exists in new window");
-  ok(sp.editor.hasFocus(), "the editor has focus");
-
-  let keyid = gScratchpadWindow.document.getElementById("key_openHelp");
-  let modifiers = keyid.getAttribute("modifiers");
-
-  let key = null;
-  if (keyid.getAttribute("keycode"))
-    key = keyid.getAttribute("keycode");
-
-  else if (keyid.getAttribute("key"))
-    key = keyid.getAttribute("key");
-
-  isnot(key, null, "Successfully retrieved keycode/key");
-
-  var aEvent = {
-    shiftKey: modifiers.match("shift"),
-    ctrlKey: modifiers.match("ctrl"),
-    altKey: modifiers.match("alt"),
-    metaKey: modifiers.match("meta"),
-    accelKey: modifiers.match("accel")
-  }
-
-  info("check that the MDN page is opened on \"F1\"");
-  let linkClicked = false;
-  sp.openDocumentationPage = function(event) { linkClicked = true; };
-
-  EventUtils.synthesizeKey(key, aEvent, gScratchpadWindow);
-
-  is(linkClicked, true, "MDN page will open");
-  finishTest();
-}
-
-function finishTest()
-{
-  gScratchpadWindow.close();
-  finish();
-}
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function test()
+{
+  waitForExplicitFinish();
+
+  gBrowser.selectedTab = gBrowser.addTab();
+  content.location = "data:text/html,Test keybindings for opening Scratchpad MDN Documentation, bug 650760";
+  gBrowser.selectedBrowser.addEventListener("load", function onTabLoad() {
+    gBrowser.selectedBrowser.removeEventListener("load", onTabLoad, true);
+
+    ok(window.Scratchpad, "Scratchpad variable exists");
+
+    openScratchpad(runTest);
+  }, true);
+}
+
+function runTest()
+{
+  let sp = gScratchpadWindow.Scratchpad;
+  ok(sp, "Scratchpad object exists in new window");
+  ok(sp.editor.hasFocus(), "the editor has focus");
+
+  let keyid = gScratchpadWindow.document.getElementById("key_openHelp");
+  let modifiers = keyid.getAttribute("modifiers");
+
+  let key = null;
+  if (keyid.getAttribute("keycode"))
+    key = keyid.getAttribute("keycode");
+
+  else if (keyid.getAttribute("key"))
+    key = keyid.getAttribute("key");
+
+  isnot(key, null, "Successfully retrieved keycode/key");
+
+  var aEvent = {
+    shiftKey: modifiers.match("shift"),
+    ctrlKey: modifiers.match("ctrl"),
+    altKey: modifiers.match("alt"),
+    metaKey: modifiers.match("meta"),
+    accelKey: modifiers.match("accel")
+  }
+
+  info("check that the MDN page is opened on \"F1\"");
+  let linkClicked = false;
+  sp.openDocumentationPage = function(event) { linkClicked = true; };
+
+  EventUtils.synthesizeKey(key, aEvent, gScratchpadWindow);
+
+  is(linkClicked, true, "MDN page will open");
+  finishTest();
+}
+
+function finishTest()
+{
+  gScratchpadWindow.close();
+  finish();
+}