Bug 1496618 - Restore the stubbed function at the end of the test. r=Felipe
authorJared Wein <jwein@mozilla.com>
Mon, 26 Nov 2018 20:45:17 +0000
changeset 504548 46bb2a2ba36f639a81098d8264b8a9d48dbbd315
parent 504547 f3849030a93c44b14343bae1cc70709b8a56fa71
child 504549 c8e417bfccfbba8bd7917368778939949d1126bd
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1496618
milestone65.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 1496618 - Restore the stubbed function at the end of the test. r=Felipe Differential Revision: https://phabricator.services.mozilla.com/D12952
browser/base/content/test/sync/browser_contextmenu_sendtab.js
--- a/browser/base/content/test/sync/browser_contextmenu_sendtab.js
+++ b/browser/base/content/test/sync/browser_contextmenu_sendtab.js
@@ -116,16 +116,20 @@ add_task(async function test_tab_context
 
   updateTabContextMenu(testTab);
   is(document.getElementById("context_sendTabToDevice").hidden, true, "Send tab to device is hidden");
 
   getter.restore();
   [...document.querySelectorAll(".sync-ui-item")].forEach(e => e.hidden = false);
 });
 
+add_task(async function teardown() {
+  Weave.Service.clientsEngine.getClientType.restore();
+});
+
 async function openTabContextMenu(openSubmenuId = null) {
   const contextMenu = document.getElementById("tabContextMenu");
   is(contextMenu.state, "closed", "checking if popup is closed");
 
   const awaitPopupShown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
   EventUtils.synthesizeMouseAtCenter(gBrowser.selectedTab, {type: "contextmenu", button: 2});
   await awaitPopupShown;