Bug 1207491 - Part 19: Remove use of expression closure from browser/components/tabview/test/. r=Gijs
authorTooru Fujisawa <arai_a@mac.com>
Wed, 23 Sep 2015 18:36:23 +0900
changeset 264504 22b2b6e2f21f7409ea455f07d45defe9129c5c9c
parent 264503 6e75188eeab579934e37f268a07d897b67e8ffdc
child 264505 b38d6ae28083544b3951c1bd546923c4b2322af2
push id29444
push usercbook@mozilla.com
push dateMon, 28 Sep 2015 12:17:21 +0000
treeherdermozilla-central@031db40e2b55 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1207491
milestone44.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 1207491 - Part 19: Remove use of expression closure from browser/components/tabview/test/. r=Gijs
browser/components/tabview/test/browser_tabview_bug587503.js
browser/components/tabview/test/browser_tabview_bug587990.js
browser/components/tabview/test/browser_tabview_bug589324.js
browser/components/tabview/test/browser_tabview_bug591706.js
browser/components/tabview/test/browser_tabview_bug593283.js
browser/components/tabview/test/browser_tabview_bug595436.js
browser/components/tabview/test/browser_tabview_bug595560.js
browser/components/tabview/test/browser_tabview_bug595804.js
browser/components/tabview/test/browser_tabview_bug595930.js
browser/components/tabview/test/browser_tabview_bug597360.js
browser/components/tabview/test/browser_tabview_bug597980.js
browser/components/tabview/test/browser_tabview_bug598375.js
browser/components/tabview/test/browser_tabview_bug602432.js
browser/components/tabview/test/browser_tabview_bug607108.js
browser/components/tabview/test/browser_tabview_bug612470.js
browser/components/tabview/test/browser_tabview_bug616729.js
browser/components/tabview/test/browser_tabview_bug624692.js
browser/components/tabview/test/browser_tabview_bug624727_perwindowpb.js
browser/components/tabview/test/browser_tabview_bug624953.js
browser/components/tabview/test/browser_tabview_bug625269.js
browser/components/tabview/test/browser_tabview_bug626791.js
browser/components/tabview/test/browser_tabview_bug628061.js
browser/components/tabview/test/browser_tabview_bug628270.js
browser/components/tabview/test/browser_tabview_bug628887.js
browser/components/tabview/test/browser_tabview_bug629195.js
browser/components/tabview/test/browser_tabview_bug630102.js
browser/components/tabview/test/browser_tabview_bug630157.js
browser/components/tabview/test/browser_tabview_bug631752.js
browser/components/tabview/test/browser_tabview_bug633190.js
browser/components/tabview/test/browser_tabview_bug634085.js
browser/components/tabview/test/browser_tabview_bug635696.js
browser/components/tabview/test/browser_tabview_bug643392.js
browser/components/tabview/test/browser_tabview_bug644097.js
browser/components/tabview/test/browser_tabview_bug648882.js
browser/components/tabview/test/browser_tabview_bug649319.js
browser/components/tabview/test/browser_tabview_bug651311.js
browser/components/tabview/test/browser_tabview_bug654295.js
browser/components/tabview/test/browser_tabview_bug654721.js
browser/components/tabview/test/browser_tabview_bug654941.js
browser/components/tabview/test/browser_tabview_bug656913.js
browser/components/tabview/test/browser_tabview_bug662266.js
browser/components/tabview/test/browser_tabview_bug663421.js
browser/components/tabview/test/browser_tabview_bug665502.js
browser/components/tabview/test/browser_tabview_bug669694.js
browser/components/tabview/test/browser_tabview_bug673196.js
browser/components/tabview/test/browser_tabview_bug685476.js
browser/components/tabview/test/browser_tabview_bug697390.js
browser/components/tabview/test/browser_tabview_bug706430.js
browser/components/tabview/test/browser_tabview_bug707466.js
browser/components/tabview/test/browser_tabview_bug712203.js
browser/components/tabview/test/browser_tabview_dragdrop.js
browser/components/tabview/test/browser_tabview_expander.js
browser/components/tabview/test/browser_tabview_launch.js
browser/components/tabview/test/browser_tabview_startup_transitions.js
browser/components/tabview/test/head.js
--- a/browser/components/tabview/test/browser_tabview_bug587503.js
+++ b/browser/components/tabview/test/browser_tabview_bug587503.js
@@ -59,17 +59,17 @@ function test() {
 	closeGroupItem(aGroup, function() { hideTabView(finish) });
       });
     } else {
       closeGroupItem(aGroup, function() { hideTabView(finish) });
     }
   }
 
   function createGroup(win) {
-    registerCleanupFunction(function() win.close());
+    registerCleanupFunction(() => win.close());
     let cw = win.TabView.getContentWindow();
     let group = createGroupItemWithTabs(win, 400, 430, 100, [
       "about:blank#0", "about:blank#1", "about:blank#2", "about:blank#3",
       "about:blank#4", "about:blank#5", "about:blank#6"
     ]);
     let groupSize = group.getChildren().length;
 
     is(cw.GroupItems.groupItems.length, 2, "Validate group count in tab view.");
--- a/browser/components/tabview/test/browser_tabview_bug587990.js
+++ b/browser/components/tabview/test/browser_tabview_bug587990.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   let newTab;
 
   let onLoad = function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     newTab = win.gBrowser.addTab();
 
     let popup = win.document.getElementById("context_tabViewMenuPopup");
     win.TabView.updateContextMenu(newTab, popup);
   };
 
   let onShow = function (win) {
--- a/browser/components/tabview/test/browser_tabview_bug589324.js
+++ b/browser/components/tabview/test/browser_tabview_bug589324.js
@@ -53,17 +53,17 @@ function test() {
   testTabSwitchAfterRestore(function () {
     Services.prefs.setBoolPref("browser.sessionstore.restore_hidden_tabs", true);
     testTabSwitchAfterRestore(finish);
   });
 }
 
 function testTabSwitchAfterRestore(callback) {
   newWindowWithState(state, function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let [firstTab, secondTab] = win.gBrowser.tabs;
     is(firstTab.linkedBrowser.currentURI.spec, DUMMY_PAGE_URL,
        "The url of first tab url is dummy_page.html");
 
     // check the hidden state of both tabs.
     ok(firstTab.hidden, "The first tab is hidden");
     ok(!secondTab.hidden, "The second tab is not hidden");
--- a/browser/components/tabview/test/browser_tabview_bug591706.js
+++ b/browser/components/tabview/test/browser_tabview_bug591706.js
@@ -18,30 +18,30 @@ function onTabViewWindowLoaded() {
 
   let contentWindow = document.getElementById("tab-view").contentWindow;
   let [originalTab] = gBrowser.visibleTabs;
 
   // Create a first tab and orphan it
   let firstTab = gBrowser.loadOneTab("about:blank#1", {inBackground: true});
   let firstTabItem = firstTab._tabViewTabItem;
   let currentGroup = contentWindow.GroupItems.getActiveGroupItem();
-  ok(currentGroup.getChildren().some(function(child) child == firstTabItem),"The first tab was made in the current group");
+  ok(currentGroup.getChildren().some(child => child == firstTabItem),"The first tab was made in the current group");
   contentWindow.GroupItems.getActiveGroupItem().remove(firstTabItem);
-  ok(!currentGroup.getChildren().some(function(child) child == firstTabItem),"The first tab was orphaned");
+  ok(!currentGroup.getChildren().some(child => child == firstTabItem),"The first tab was orphaned");
 
   // Create a group and make it active
   let box = new contentWindow.Rect(10, 10, 300, 300);
   let group = new contentWindow.GroupItem([], { bounds: box });
   ok(group.isEmpty(), "This group is empty");
   contentWindow.UI.setActive(group);
   
   // Create a second tab in this new group
   let secondTab = gBrowser.loadOneTab("about:blank#2", {inBackground: true});
   let secondTabItem = secondTab._tabViewTabItem;
-  ok(group.getChildren().some(function(child) child == secondTabItem),"The second tab was made in our new group");
+  ok(group.getChildren().some(child => child == secondTabItem),"The second tab was made in our new group");
   is(group.getChildren().length, 1, "Only one tab in the first group");
   isnot(firstTab.linkedBrowser.currentURI.spec, secondTab.linkedBrowser.currentURI.spec, "The two tabs must have different locations");
 
   // Add the first tab to the group *programmatically*, without specifying a dropPos
   group.add(firstTabItem);
   is(group.getChildren().length, 2, "Two tabs in the group");
 
   is(group.getChildren()[0].tab.linkedBrowser.currentURI.spec, secondTab.linkedBrowser.currentURI.spec, "The second tab was there first");
--- a/browser/components/tabview/test/browser_tabview_bug593283.js
+++ b/browser/components/tabview/test/browser_tabview_bug593283.js
@@ -47,17 +47,17 @@ var state = {
     }, sizemode:"normal"
   }]
 };
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithState(state, function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     showTabView(function() {
       let cw = win.TabView.getContentWindow();
       let groupItems = cw.GroupItems.groupItems;
       let groupOne = groupItems[0];
       let groupTwo = groupItems[1];
 
       // check the active tab of each group
--- a/browser/components/tabview/test/browser_tabview_bug595436.js
+++ b/browser/components/tabview/test/browser_tabview_bug595436.js
@@ -31,17 +31,17 @@ function test() {
 
     EventUtils.synthesizeKey("VK_ESCAPE", {}, cw);
     assertSearchIsDisabled();
   }
 
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     cw = win.TabView.getContentWindow();
     search = cw.document.getElementById("search");
     searchButton = cw.document.getElementById("searchbutton");
 
     SimpleTest.waitForFocus(function () {
       assertSearchIsDisabled();
 
--- a/browser/components/tabview/test/browser_tabview_bug595560.js
+++ b/browser/components/tabview/test/browser_tabview_bug595560.js
@@ -4,17 +4,17 @@
 var win;
 var cw;
 
 function test() {
   waitForExplicitFinish();
 
   let onLoad = function (tvwin) {
     win = tvwin;
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
     win.gBrowser.loadOneTab("http://mochi.test:8888/", {inBackground: true});
   };
 
   let onShow = function () {
     cw = win.TabView.getContentWindow();
     ok(win.TabView.isVisible(), "Tab View is visible");
     afterAllTabItemsUpdated(testOne, win);
   };
--- a/browser/components/tabview/test/browser_tabview_bug595804.js
+++ b/browser/components/tabview/test/browser_tabview_bug595804.js
@@ -1,16 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 var prefsBranch = Cc["@mozilla.org/preferences-service;1"].
                   getService(Ci.nsIPrefService).
                   getBranch("browser.panorama.");
 
-function animateZoom() prefsBranch.getBoolPref("animate_zoom");
+function animateZoom() {
+  return prefsBranch.getBoolPref("animate_zoom");
+}
 
 var contentWindow = null;
 
 registerCleanupFunction(function() {
   // reset to default: true
   prefsBranch.setBoolPref("animate_zoom", true);
 });
 
--- a/browser/components/tabview/test/browser_tabview_bug595930.js
+++ b/browser/components/tabview/test/browser_tabview_bug595930.js
@@ -18,17 +18,17 @@ function onTabViewWindowLoaded() {
 
   // create group which we'll close
   let box1 = new contentWindow.Rect(310, 10, 300, 300);
   let group1 = new contentWindow.GroupItem([], { bounds: box1 });
   ok(group1.isEmpty(), "This group is empty");
   contentWindow.UI.setActive(group1);
   let tab1 = gBrowser.loadOneTab("about:blank#1", {inBackground: true});
   let tab1Item = tab1._tabViewTabItem;
-  ok(group1.getChildren().some(function(child) child == tab1Item), "The tab was made in our new group");
+  ok(group1.getChildren().some(child => child == tab1Item), "The tab was made in our new group");
   is(group1.getChildren().length, 1, "Only one tab in the first group");
 
   group1.addSubscriber("close", function onClose() {
     group1.removeSubscriber("close", onClose);
 
     let onTabViewHidden = function() {
       window.removeEventListener("tabviewhidden", onTabViewHidden, false);
       // assert that we're no longer in tab view
--- a/browser/components/tabview/test/browser_tabview_bug597360.js
+++ b/browser/components/tabview/test/browser_tabview_bug597360.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let groupItems = cw.GroupItems.groupItems;
     let groupItem = groupItems[0];
 
     is(groupItems.length, 1, "There is one group item on startup");
 
     whenTabViewIsHidden(function () {
--- a/browser/components/tabview/test/browser_tabview_bug597980.js
+++ b/browser/components/tabview/test/browser_tabview_bug597980.js
@@ -3,17 +3,17 @@
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(part1);
 }
 
 function part1(win) {
-  registerCleanupFunction(function() win.close());
+  registerCleanupFunction(() => win.close());
 
   let contentWindow = win.TabView.getContentWindow();
   is(contentWindow.GroupItems.groupItems.length, 1, "Has only one group");
 
   let originalTab = win.gBrowser.selectedTab;
   let originalGroup = contentWindow.GroupItems.groupItems[0];
   let newTab = win.gBrowser.loadOneTab("about:blank", {inBackground: true});
   
@@ -56,17 +56,17 @@ function part1(win) {
         win.close();
         newWindowWithTabView(part2);
       });
     }, 490);
   }, 10)
 }
 
 function part2(win) {
-  registerCleanupFunction(function() win.close());
+  registerCleanupFunction(() => win.close());
 
   let newTab = win.gBrowser.loadOneTab("about:blank", {inBackground: true});
   hideTabView(function() {
     let selectedTab = win.gBrowser.selectedTab;
     isnot(selectedTab, newTab, "They are different tabs");
 
     // switch the selected tab to new tab
     win.gBrowser.selectedTab = newTab;
--- a/browser/components/tabview/test/browser_tabview_bug598375.js
+++ b/browser/components/tabview/test/browser_tabview_bug598375.js
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let groupItem = cw.GroupItems.groupItems[0];
     groupItem.setBounds(new cw.Rect(cw.innerWidth - 200, 0, 200, 200));
 
-    whenTabViewIsHidden(function () waitForFocus(finish), win);
+    whenTabViewIsHidden(() => waitForFocus(finish), win);
 
     waitForFocus(function () {
       let button = cw.document.getElementById("exit-button");
       EventUtils.synthesizeMouseAtCenter(button, {}, cw);
     }, cw);
   });
 
   // This test relies on the test timing out in order to indicate failure so
--- a/browser/components/tabview/test/browser_tabview_bug602432.js
+++ b/browser/components/tabview/test/browser_tabview_bug602432.js
@@ -11,17 +11,17 @@ function test() {
       ok(earliestUpdateTime <= updateTime, "Stacked group item update (" +
          updateTime + ") > first item (" + earliestUpdateTime + ")");
     });
   }
 
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => 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();
 
--- a/browser/components/tabview/test/browser_tabview_bug607108.js
+++ b/browser/components/tabview/test/browser_tabview_bug607108.js
@@ -51,17 +51,17 @@ function test() {
     EventUtils.synthesizeKey("VK_RETURN", {}, cw);
 
     groupItem = cw.GroupItems.groupItems[1];
     is(groupItem.getTitle(), "t", "new groupItem's title is correct");
     closeGroupItem(groupItem, callback);
   };
 
   let onLoad = function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     for (let i = 0; i < 2; i++)
       win.gBrowser.addTab();
   };
 
   let onShow = function (win) {
     cw = win.TabView.getContentWindow();
     assertNumberOfGroupItems(1);
--- a/browser/components/tabview/test/browser_tabview_bug612470.js
+++ b/browser/components/tabview/test/browser_tabview_bug612470.js
@@ -3,17 +3,17 @@
 
 // Tests that groups behave properly when closing all tabs but app tabs.
 
 function test() {
   let cw, win, groupItem;
 
   let onLoad = function (tvwin) {
     win = tvwin;
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
     win.gBrowser.pinTab(win.gBrowser.tabs[0]);
     win.gBrowser.loadOneTab("about:blank", {inBackground: true});
   };
 
   let onShow = function () {
     cw = win.TabView.getContentWindow();
     is(cw.GroupItems.groupItems.length, 1, "There's only one group");
 
--- a/browser/components/tabview/test/browser_tabview_bug616729.js
+++ b/browser/components/tabview/test/browser_tabview_bug616729.js
@@ -47,24 +47,24 @@ function test() {
       let test = tests.shift();
 
       // prepare
       let items = groupItem.getChildren();
       while (test.length < items.length)
         items[items.length-1].close();
 
       let orig = cw.Utils.copy(items);
-      items.sort(function (a, b) test.indexOf(a) - test.indexOf(b));
+      items.sort((a, b) => test.indexOf(a) - test.indexOf(b));
 
       // order and check
       groupItem.reorderTabsBasedOnTabItemOrder();
       assertCorrectItemOrder(items);
 
       // revert to original item order
-      items.sort(function (a, b) orig.indexOf(a) - orig.indexOf(b));
+      items.sort((a, b) => orig.indexOf(a) - orig.indexOf(b));
       groupItem.reorderTabsBasedOnTabItemOrder();
     }
 
     testMoveBetweenGroups();
   }
 
   let testMoveBetweenGroups = function () {
     let groupItem = createGroupItem();
--- a/browser/components/tabview/test/browser_tabview_bug624692.js
+++ b/browser/components/tabview/test/browser_tabview_bug624692.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   requestLongerTimeout(2);
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let groupItem = cw.GroupItems.groupItems[0];
     let tabItem = groupItem.getChild(0);
 
     hideGroupItem(groupItem, function () {
       unhideGroupItem(groupItem, function () {
         let bounds = tabItem.getBounds();
--- a/browser/components/tabview/test/browser_tabview_bug624727_perwindowpb.js
+++ b/browser/components/tabview/test/browser_tabview_bug624727_perwindowpb.js
@@ -106,17 +106,17 @@ function test() {
     win.addEventListener("load", function onLoad() {
       win.removeEventListener("load", onLoad, false);
       executeSoon(function() { aCallback(win) });
     }, false);
   }
 
   waitForExplicitFinish();
   testOnWindow(false, function(publicWindow) {
-    registerCleanupFunction(function () publicWindow.TabView.hide());
+    registerCleanupFunction(() => publicWindow.TabView.hide());
     assertValidPrerequisites(publicWindow, 'start');
 
     showTabView(function () {
       let cw = publicWindow.TabView.getContentWindow();
       assertNumberOfGroups(cw, 'start', 1);
       createGroupItem(publicWindow);
 
       afterAllTabsLoaded(function () {
--- a/browser/components/tabview/test/browser_tabview_bug624953.js
+++ b/browser/components/tabview/test/browser_tabview_bug624953.js
@@ -13,11 +13,11 @@ function test() {
 
     groupItem.setSize(100, 100, true);
     groupItem.setUserSize();
     ok(!groupItem.isStacked(), 'groupItem is still not stacked');
 
     cw.GroupItems.resumeArrange();
     ok(groupItem.isStacked(), 'groupItem is now stacked');
 
-    closeGroupItem(groupItem, function () hideTabView(finish));
+    closeGroupItem(groupItem, () => hideTabView(finish));
   });
 }
--- a/browser/components/tabview/test/browser_tabview_bug625269.js
+++ b/browser/components/tabview/test/browser_tabview_bug625269.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
   newWindowWithTabView(onTabViewShown, null, 850);
 }
 
 function onTabViewShown(win) {
-  registerCleanupFunction(function () win.close());
+  registerCleanupFunction(() => win.close());
 
   let contentWindow = win.TabView.getContentWindow();
   let currentGroup = contentWindow.GroupItems.getActiveGroupItem();
 
   function checkResized(diffX, diffY, shouldResize, text, callback) {
     let {width: origWidth, height: origHeight} = currentGroup.getBounds();
 
     resizeWindow(win, diffX, diffY, function () {
--- a/browser/components/tabview/test/browser_tabview_bug626791.js
+++ b/browser/components/tabview/test/browser_tabview_bug626791.js
@@ -87,17 +87,17 @@ function test() {
 
       next();
     }, win);
   }
 
   let testDragToCreateOrphan = function (tab) {
     if (!tab) {
       let tab = win.gBrowser.loadOneTab('about:blank', {inBackground: true});
-      afterAllTabsLoaded(function () testDragToCreateOrphan(tab), win);
+      afterAllTabsLoaded(() => testDragToCreateOrphan(tab), win);
       return;
     }
 
     prefix = 'drag-to-create-orphan';
     assertNumberOfTabs(2);
     assertToolbarButtonNotExists();
 
     let width = cw.innerWidth;
--- a/browser/components/tabview/test/browser_tabview_bug628061.js
+++ b/browser/components/tabview/test/browser_tabview_bug628061.js
@@ -31,23 +31,23 @@ function test() {
 
 function testOne() {
   newWindowWithTabView(
     function(win) {
       testTwo();
       win.close();
     },
     function(win) {
-      registerCleanupFunction(function() win.close());
+      registerCleanupFunction(() => win.close());
       is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
          "1", "There is one group");
     });
 }
 
 function testTwo() {
   newWindowWithState(state, function(win) {
-    registerCleanupFunction(function() win.close());
+    registerCleanupFunction(() => win.close());
 
     is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
        "2", "There are two groups");
     waitForFocus(finish);
   });
 }
--- a/browser/components/tabview/test/browser_tabview_bug628270.js
+++ b/browser/components/tabview/test/browser_tabview_bug628270.js
@@ -88,17 +88,17 @@ function test() {
         gBrowser.removeTab(gBrowser.tabs[1]);
         hideTabView(finishTest);
       });
     });
   }
 
   waitForExplicitFinish();
   assertTabViewIsHidden();
-  registerCleanupFunction(function () TabView.hide());
+  registerCleanupFunction(() => TabView.hide());
 
   showTabView(function () {
     cw = TabView.getContentWindow();
     assertValidPrerequisites();
 
     createGroupItem();
     afterAllTabsLoaded(testRestoreTabFromInactiveGroup);
   });
--- a/browser/components/tabview/test/browser_tabview_bug628887.js
+++ b/browser/components/tabview/test/browser_tabview_bug628887.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(function(win) {
-    registerCleanupFunction(function() win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let groupItemOne = cw.GroupItems.groupItems[0];
 
     let groupItemTwo = createGroupItemWithBlankTabs(win, 100, 100, 40, 2);
     ok(groupItemTwo.isStacked(), "groupItem is now stacked");
 
     is(win.gBrowser.tabs.length, 3, "There are three tabs");
--- a/browser/components/tabview/test/browser_tabview_bug629195.js
+++ b/browser/components/tabview/test/browser_tabview_bug629195.js
@@ -14,17 +14,17 @@ function test() {
 
       contentWindow = win.document.getElementById("tab-view").contentWindow;
       is(contentWindow.GroupItems.groupItems.length, 1, "There is one group");
       is(contentWindow.GroupItems.groupItems[0].getChildren().length, 1,
          "The group has only one tab item");
 
       // show the undo close group button
       let group = contentWindow.GroupItems.groupItems[0];
-      hideGroupItem(group, function () restore(group.id));
+      hideGroupItem(group, () => restore(group.id));
     },
     function(newWin) {
       win = newWin;
       originalTab = win.gBrowser.visibleTabs[0];
       win.gBrowser.addTab();
       win.gBrowser.pinTab(originalTab);
     }
   );
--- a/browser/components/tabview/test/browser_tabview_bug630102.js
+++ b/browser/components/tabview/test/browser_tabview_bug630102.js
@@ -26,17 +26,17 @@ function test() {
     is(tabItems[1].tab, win.gBrowser.tabs[1], "The second tab item is linked to the second tab");
     is(tabItems[2].tab, win.gBrowser.tabs[2], "The third tab item is linked to the third tab");
 
     finish();
   };
 
   let onLoad = function (tvwin) {
     win = tvwin;
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     for (let i = 0; i < 2; i++)
       win.gBrowser.loadOneTab("about:blank", {inBackground: true});
 
     [originalTab, newTab1, newTab2] = win.gBrowser.tabs;
     win.gBrowser.pinTab(newTab1);
   };
 
--- a/browser/components/tabview/test/browser_tabview_bug630157.js
+++ b/browser/components/tabview/test/browser_tabview_bug630157.js
@@ -65,15 +65,15 @@ function test() {
     simulateDoubleClick(container, 2);
     assertNumberOfTabs(1);
 
     groupItem.close();
     hideTabView(finishTest);
   }
 
   waitForExplicitFinish();
-  registerCleanupFunction(function () TabView.hide());
+  registerCleanupFunction(() => TabView.hide());
 
   showTabView(function () {
     cw = TabView.getContentWindow();
     testDoubleClick();
   });
 }
--- a/browser/components/tabview/test/browser_tabview_bug631752.js
+++ b/browser/components/tabview/test/browser_tabview_bug631752.js
@@ -47,34 +47,34 @@ function test() {
       groupItem.removeSubscriber("expanded", onExpanded);
       dragTabItem();
     });
 
     groupItem.addSubscriber("collapsed", function onCollapsed() {
       groupItem.removeSubscriber("collapsed", onCollapsed);
 
       let secondGroup = cw.GroupItems.groupItems[1];
-      closeGroupItem(secondGroup, function () hideTabView(finishTest));
+      closeGroupItem(secondGroup, () => hideTabView(finishTest));
     });
 
     groupItem.expand();
   }
 
   let finishTest = function () {
     is(cw.GroupItems.groupItems.length, 1, "there is one groupItem");
     is(gBrowser.tabs.length, 1, "there is one tab");
     ok(!TabView.isVisible(), "tabview is hidden");
 
     finish();
   }
 
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     cw = win.TabView.getContentWindow();
 
     groupItem = cw.GroupItems.groupItems[0];
     groupItem.setSize(200, 200, true);
 
     for (let i = 0; i < 9; i++)
       win.gBrowser.addTab();
--- a/browser/components/tabview/test/browser_tabview_bug633190.js
+++ b/browser/components/tabview/test/browser_tabview_bug633190.js
@@ -7,17 +7,17 @@ var contentWindow;
 function test() {
   waitForExplicitFinish();
 
   test1();
 }
 
 // Open a new tab when the active tab item belongs to a group item.
 function test1() {
-  registerCleanupFunction(function () TabView.hide());
+  registerCleanupFunction(() => TabView.hide());
 
   showTabView(function() {
     ok(origTab._tabViewTabItem.parent, "The original tab belongs to a group");
 
     contentWindow = TabView.getContentWindow();
     contentWindow.UI.setActive(origTab._tabViewTabItem);
 
     testCreateTabAndThen(test2);
@@ -64,17 +64,17 @@ function testCreateTabAndThen(callback) 
 
     // ensure that the default tabview listener is called before so the 
     // tab._tabViewTabItem exists
     executeSoon(function() {
       let tab = event.target;
       tabItem = tab._tabViewTabItem;
       ok(tabItem, "Tab item is available after tab open");
 
-      registerCleanupFunction(function () gBrowser.removeTab(tab))
+      registerCleanupFunction(() => gBrowser.removeTab(tab))
 
       tabItem.addSubscriber("zoomedIn", function onZoomedIn() {
         tabItem.removeSubscriber("zoomedIn", onZoomedIn);
 
         is(gBrowser.selectedTab, tab,
           "The selected tab is the same as the newly opened tab");
         executeSoon(callback);
       });
--- a/browser/components/tabview/test/browser_tabview_bug634085.js
+++ b/browser/components/tabview/test/browser_tabview_bug634085.js
@@ -30,17 +30,17 @@ function test() {
   }
 
   waitForExplicitFinish();
 
   showTabView(function () {
     let groupItem = createGroupItemWithBlankTabs(window, 150, 150, 10, numChildren);
 
     registerCleanupFunction(function () {
-      closeGroupItem(groupItem, function () TabView.hide());
+      closeGroupItem(groupItem, () => TabView.hide());
     });
 
     testTopOfStack(groupItem.getChild(1), function () {
       testTopOfStack(groupItem.getChild(6), function () {
         closeGroupItem(groupItem, function () {
           hideTabView(finishTest);
         });
       });
--- a/browser/components/tabview/test/browser_tabview_bug635696.js
+++ b/browser/components/tabview/test/browser_tabview_bug635696.js
@@ -65,13 +65,13 @@ function test() {
     ok(!TabView.isVisible(), "tabview is hidden");
 
     finish();
   }
 
   waitForExplicitFinish();
 
   showTabView(function () {
-    registerCleanupFunction(function () TabView.hide());
+    registerCleanupFunction(() => TabView.hide());
     cw = TabView.getContentWindow();
     next();
   });
 }
--- a/browser/components/tabview/test/browser_tabview_bug643392.js
+++ b/browser/components/tabview/test/browser_tabview_bug643392.js
@@ -21,17 +21,17 @@ var state = {
     }
   }]
 };
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithState(state, function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     is(win.gBrowser.tabs.length, 2, "two tabs");
 
     let opts = {animate: true, byMouse: true};
     win.gBrowser.removeTab(win.gBrowser.visibleTabs[0], opts);
 
     let checkTabCount = function () {
       if (win.gBrowser.tabs.length > 1) {
--- a/browser/components/tabview/test/browser_tabview_bug644097.js
+++ b/browser/components/tabview/test/browser_tabview_bug644097.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let groupItem = cw.GroupItems.groupItems[0];
 
     // create some tabs with favIcons
     for (let i = 0; i < 3; i++)
       win.gBrowser.loadOneTab("http://mochi.test:8888/browser/browser/components/tabview/test/test_bug644097.html", {inBackground: true});
 
--- a/browser/components/tabview/test/browser_tabview_bug648882.js
+++ b/browser/components/tabview/test/browser_tabview_bug648882.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let tab = win.gBrowser.tabs[0];
     let tabItem = tab._tabViewTabItem;
     let isIdle = false;
 
     // We replace UI.isIdle() here to not rely on setTimeout(). While this
     // function returns false (busy) we expect no tabItem updates to happen.
--- a/browser/components/tabview/test/browser_tabview_bug649319.js
+++ b/browser/components/tabview/test/browser_tabview_bug649319.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
-    waitForFocus(function () testScenarios(win));
+    registerCleanupFunction(() => win.close());
+    waitForFocus(() => testScenarios(win));
   });
 }
 
 function testScenarios(win) {
   let simulateDragDrop = function (target) {
     EventUtils.synthesizeMouseAtCenter(target, {type: "mousedown"}, cw);
     EventUtils.synthesizeMouse(target, 40, 20, {type: "mousemove"}, cw);
     EventUtils.synthesizeMouse(target, 80, 20, {type: "mouseup"}, cw);
--- a/browser/components/tabview/test/browser_tabview_bug651311.js
+++ b/browser/components/tabview/test/browser_tabview_bug651311.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   let callCount = 0;
 
   newWindow(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     win.TabView._initFrame(function () {
       is(callCount++, 0, "call count is zero");
       ok(win.TabView.getContentWindow().UI, "content window is loaded");
     });
 
     win.TabView._initFrame(function () {
       is(callCount++, 1, "call count is one");
--- a/browser/components/tabview/test/browser_tabview_bug654295.js
+++ b/browser/components/tabview/test/browser_tabview_bug654295.js
@@ -41,17 +41,17 @@ function test() {
           '"2":{"bounds":{"left":309,"top":5,"width":267,"height":226},' +
           '"userSize":null,"title":"","id":2}}',
         "tabview-ui": '{"pageBounds":{"left":0,"top":0,"width":788,"height":548}}'
       }, sizemode:"normal"
     }]
   };
 
   newWindowWithState(newState, function(win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     whenTabViewIsShown(function() {
       let contentWindow = win.TabView.getContentWindow();
 
       is(contentWindow.GroupItems.groupItems.length, 2, "There are still two groups");
       is(win.gBrowser.tabs.length, 1, "There is only one tab");
 
       finish();
--- a/browser/components/tabview/test/browser_tabview_bug654721.js
+++ b/browser/components/tabview/test/browser_tabview_bug654721.js
@@ -22,17 +22,17 @@ var state = {
     }
   }]
 };
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithState(state, function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     showTabView(function () {
       let cw = win.TabView.getContentWindow();
       let groupItems = cw.GroupItems.groupItems;
       is(groupItems.length, 2, "two groupItems");
 
       let [group1, group2] = groupItems;
 
--- a/browser/components/tabview/test/browser_tabview_bug654941.js
+++ b/browser/components/tabview/test/browser_tabview_bug654941.js
@@ -6,17 +6,17 @@ function test() {
 
   let compareCanvasSize = function (prefix, width, height, tabItem) {
     let canvas = tabItem.$canvas[0];
     is(canvas.width, width, prefix + ": canvas widths are equal (" + width + "px)");
     is(canvas.height, height, prefix + ": canvas heights are equal (" + height + "px)");
   };
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let groupItem = cw.GroupItems.groupItems[0];
     let tabItem = groupItem.getChild(0);
 
     afterAllTabItemsUpdated(function () {
       let {width, height} = tabItem.$canvas[0];
 
--- a/browser/components/tabview/test/browser_tabview_bug656913.js
+++ b/browser/components/tabview/test/browser_tabview_bug656913.js
@@ -15,17 +15,17 @@ function test() {
   });
 
   afterAllTabsLoaded(function() {
     showTabView(function() {
       hideTabView(function() {
         newTab.linkedBrowser.loadURI(urlBase + "dummy_page.html");
 
         newWindowWithTabView(function(win) {
-          registerCleanupFunction(function() win.close());
+          registerCleanupFunction(() => win.close());
 
           let contentWindow = win.TabView.getContentWindow();
 
           EventUtils.synthesizeKey("d", { }, contentWindow);
           EventUtils.synthesizeKey("u", { }, contentWindow);
           EventUtils.synthesizeKey("m", { }, contentWindow);
 
           let resultsElement = contentWindow.document.getElementById("results");
--- a/browser/components/tabview/test/browser_tabview_bug662266.js
+++ b/browser/components/tabview/test/browser_tabview_bug662266.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithTabView(function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     for (let i = 0; i < 4; i++)
       win.gBrowser.loadOneTab("about:blank", {inBackground: true});
 
     let cw = win.TabView.getContentWindow();
     let groupItem = cw.GroupItems.groupItems[0];
     let children = groupItem.getChildren();
 
--- a/browser/components/tabview/test/browser_tabview_bug663421.js
+++ b/browser/components/tabview/test/browser_tabview_bug663421.js
@@ -71,17 +71,17 @@ function test() {
     }, win);
   }
 
   let tests = [test1, test2, test3, test4];
 
   waitForExplicitFinish();
 
   newWindowWithTabView(function (aWin) {
-    registerCleanupFunction(function () aWin.close());
+    registerCleanupFunction(() => aWin.close());
 
     win = aWin;
     cw = win.TabView.getContentWindow();
     groupItem = createEmptyGroupItem(cw, 200, 200, 20);
 
     checkNumberOfGroupItems(2);
     next();
   });
--- a/browser/components/tabview/test/browser_tabview_bug665502.js
+++ b/browser/components/tabview/test/browser_tabview_bug665502.js
@@ -5,17 +5,17 @@ function test() {
   waitForExplicitFinish();
 
   let onLoad = function (win) {
     for (let i = 0; i < 2; i++)
       win.gBrowser.addTab();
   };
 
   let onShow = function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let cw = win.TabView.getContentWindow();
     let groupItem = cw.GroupItems.groupItems[0];
 
     groupItem.setSize(400, 200, true);
 
     let tabItem = groupItem.getChild(0);
     let bounds = tabItem.getBounds();
--- a/browser/components/tabview/test/browser_tabview_bug669694.js
+++ b/browser/components/tabview/test/browser_tabview_bug669694.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   function onLoad(win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let tab = win.gBrowser.addTab();
     win.gBrowser.pinTab(tab);
   }
 
   function onShow(win) {
     let tabs = win.gBrowser.tabs;
 
--- a/browser/components/tabview/test/browser_tabview_bug673196.js
+++ b/browser/components/tabview/test/browser_tabview_bug673196.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   function onLoad(win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
     win.gBrowser.addTab();
   }
 
   function onShow(win) {
     let cw = win.TabView.getContentWindow();
     let group = cw.GroupItems.groupItems[0];
 
     // shrink the group to make some room for dragging
--- a/browser/components/tabview/test/browser_tabview_bug685476.js
+++ b/browser/components/tabview/test/browser_tabview_bug685476.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   waitForExplicitFinish();
 
   showTabView(function () {
     let tab = gBrowser.addTab();
-    registerCleanupFunction(function () gBrowser.removeTab(tab));
+    registerCleanupFunction(() => gBrowser.removeTab(tab));
 
     let cw = TabView.getContentWindow();
     whenAppTabIconAdded(cw.GroupItems.groupItems[0], function() {
       let body = cw.document.body;
       let appTabIcon = cw.iQ(".appTabTray .appTabIcon")[0];
 
       EventUtils.synthesizeMouseAtCenter(appTabIcon, {type: "mousedown"}, cw);
       EventUtils.synthesizeMouse(body, 500, 100, {type: "mousemove"}, cw);
--- a/browser/components/tabview/test/browser_tabview_bug697390.js
+++ b/browser/components/tabview/test/browser_tabview_bug697390.js
@@ -21,17 +21,17 @@ var state = {
     }
   }]
 };
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithState(state, function(win) {
-    registerCleanupFunction(function() win.close());
+    registerCleanupFunction(() => win.close());
 
     win.gBrowser.addTab();
 
     ok(win.gBrowser.tabs[0].hidden, "The first tab is hidden");
     win.gBrowser.selectedTab = win.gBrowser.tabs[0];
 
     function onTabViewFrameInitialized() {
       win.removeEventListener(
--- a/browser/components/tabview/test/browser_tabview_bug706430.js
+++ b/browser/components/tabview/test/browser_tabview_bug706430.js
@@ -34,17 +34,17 @@ var state2 = {
 
 var ss = Cc["@mozilla.org/browser/sessionstore;1"]
          .getService(Ci.nsISessionStore);
 
 function test() {
   waitForExplicitFinish();
 
   newWindowWithState(state1, function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     showTabView(function () {
       let cw = win.TabView.getContentWindow();
       let [group1, group2] = cw.GroupItems.groupItems;
       let [tab1, tab2] = win.gBrowser.tabs;
 
       checkUrl(group1.getChild(0), "about:robots#1", "tab1 is in first group");
       checkUrl(group2.getChild(0), "about:robots#2", "tab2 is in second group");
--- a/browser/components/tabview/test/browser_tabview_bug707466.js
+++ b/browser/components/tabview/test/browser_tabview_bug707466.js
@@ -38,17 +38,17 @@ function test() {
           '"2":{"bounds":{"left":309,"top":5,"width":267,"height":226},' +
           '"userSize":null,"title":"","id":2}}',
         "tabview-ui": '{"pageBounds":{"left":0,"top":0,"width":788,"height":548}}'
       }, sizemode:"normal"
     }]
   };
 
   newWindowWithState(newState, function(win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     whenTabViewIsShown(function() {
       let cw = win.TabView.getContentWindow();
 
       is(cw.GroupItems.groupItems.length, 2, "There are still two groups");
       is(win.gBrowser.tabs.length, 1, "There is only one tab");
       is(cw.UI.getActiveTab(), win.gBrowser.selectedTab._tabViewTabItem, "The last tab is selected");
 
--- a/browser/components/tabview/test/browser_tabview_bug712203.js
+++ b/browser/components/tabview/test/browser_tabview_bug712203.js
@@ -39,17 +39,17 @@ function test() {
           '"2":{"bounds":{"left":309,"top":5,"width":267,"height":226},' +
           '"userSize":null,"title":"","id":2}}',
         "tabview-ui": '{"pageBounds":{"left":0,"top":0,"width":788,"height":548}}'
       }, sizemode:"normal"
     }]
   };
 
   newWindowWithState(newState, function(win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     let selectedTab = win.gBrowser.selectedTab;
 
     win.addEventListener("tabviewframeinitialized", function onInit() {
       win.removeEventListener("tabviewframeinitialized", onInit, false);
       // ensure the TabView.contentWindow is set.
       executeSoon(function() {
         let cw = win.TabView.getContentWindow();
--- a/browser/components/tabview/test/browser_tabview_dragdrop.js
+++ b/browser/components/tabview/test/browser_tabview_dragdrop.js
@@ -54,17 +54,17 @@ function addTest(contentWindow, groupOne
     groupTwo.removeSubscriber("childAdded", endGame);
 
     is(groupOne.getChildren().length, --groupOneTabItemCount,
        "The number of children in group one is decreased by 1");
     is(groupTwo.getChildren().length, ++groupTwoTabItemCount,
        "The number of children in group two is increased by 1");
 
     closeGroupItem(groupOne, function () {
-      closeGroupItem(groupTwo, function () hideTabView(finish));
+      closeGroupItem(groupTwo, () => hideTabView(finish));
     });
   }
 
   groupTwo.addSubscriber("childAdded", endGame);
   simulateDragDrop(tabItem.container, offsetX, offsetY, contentWindow);
 }
 
 function simulateDragDrop(element, offsetX, offsetY, contentWindow) {
--- a/browser/components/tabview/test/browser_tabview_expander.js
+++ b/browser/components/tabview/test/browser_tabview_expander.js
@@ -191,31 +191,31 @@ function onTabViewWindowLoaded(win) {
       let overlay = contentWindow.document.getElementById("expandedTray");
       ok(overlay, "The expanded tray exists.");
       
       let activeTab = contentWindow.UI.getActiveTab();
       ok(activeTab, "There is an active tab.");
       let originalTabItem = originalTab._tabViewTabItem;
 
       isnot(activeTab, originalTabItem, "But it's not what it was a moment ago.");
-      let someChildIsActive = group.getChildren().some(function(child)
+      let someChildIsActive = group.getChildren().some(child =>
                               child == activeTab);
       ok(someChildIsActive, "Now one of the children in the group is active.");
             
       // now activate Panorama...
       win.addEventListener("tabviewhidden", stage4hidden, false);
       win.TabView.toggle();
     };
   
     let stage4hidden = function() {
       win.removeEventListener("tabviewhidden", stage4hidden, false);
       
       isnot(win.gBrowser.selectedTab, originalTab, "We did not enter the original tab.");
 
-      let someChildIsSelected = group.getChildren().some(function(child)
+      let someChildIsSelected = group.getChildren().some(child =>
                                   child.tab == win.gBrowser.selectedTab);
       ok(someChildIsSelected, "Instead we're in one of the stack's children.");
       
       win.addEventListener("tabviewshown", stage4shown, false);
       win.TabView.toggle();
     };
     
     let stage4shown = function() {
--- a/browser/components/tabview/test/browser_tabview_launch.js
+++ b/browser/components/tabview/test/browser_tabview_launch.js
@@ -3,20 +3,20 @@
 
 var newWin;
 
 // ----------
 function test() {
   waitForExplicitFinish();
 
   let panelSelected = false;
-  registerCleanupFunction(function () ok(panelSelected, "panel is selected"));
+  registerCleanupFunction(() => ok(panelSelected, "panel is selected"));
 
   let onLoad = function (win) {
-    registerCleanupFunction(function () win.close());
+    registerCleanupFunction(() => win.close());
 
     newWin = win;
 
     let onSelect = function(event) {
       if (deck != event.target)
         return;
 
       let iframe = win.document.getElementById("tab-view");
--- a/browser/components/tabview/test/browser_tabview_startup_transitions.js
+++ b/browser/components/tabview/test/browser_tabview_startup_transitions.js
@@ -1,16 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 var prefsBranch = Cc["@mozilla.org/preferences-service;1"].
                   getService(Ci.nsIPrefService).
                   getBranch("browser.panorama.");
 
-function animateZoom() prefsBranch.getBoolPref("animate_zoom");
+function animateZoom() {
+  return prefsBranch.getBoolPref("animate_zoom");
+}
 
 function test() {
   waitForExplicitFinish();
 
   let win = window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no",
                               "about:blank", null, null, null, true);
 
   registerCleanupFunction(function() {
--- a/browser/components/tabview/test/head.js
+++ b/browser/components/tabview/test/head.js
@@ -108,17 +108,17 @@ function newWindowWithTabView(shownCallb
                               ",width=" + winWidth, "about:blank");
 
   whenWindowLoaded(win, function () {
     if (loadCallback)
       loadCallback(win);
   });
 
   whenDelayedStartupFinished(win, function () {
-    showTabView(function () shownCallback(win), win);
+    showTabView(() => shownCallback(win), win);
   });
 }
 
 // ----------
 function afterAllTabsLoaded(callback, win) {
   const TAB_STATE_NEEDS_RESTORE = 1;
 
   win = win || window;
@@ -360,17 +360,17 @@ function newWindowWithState(state, callb
 // ----------
 function restoreTab(callback, index, win) {
   win = win || window;
 
   let tab = win.undoCloseTab(index || 0);
   let tabItem = tab._tabViewTabItem;
 
   let finalize = function () {
-    afterAllTabsLoaded(function () callback(tab), win);
+    afterAllTabsLoaded(() => callback(tab), win);
   };
 
   if (tabItem._reconnected) {
     finalize();
     return;
   }
 
   tab._tabViewTabItem.addSubscriber("reconnected", function onReconnected() {