From 8148615da179fdd60f19018e13b4e94b95609cc6 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 3 Feb 2018 06:00:38 -0500 Subject: Remove browser tests - Part 1: The Tests (except for experiments) --- .../base/content/test/general/browser_bug623893.js | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 browser/base/content/test/general/browser_bug623893.js (limited to 'browser/base/content/test/general/browser_bug623893.js') diff --git a/browser/base/content/test/general/browser_bug623893.js b/browser/base/content/test/general/browser_bug623893.js deleted file mode 100644 index fa6da1b22..000000000 --- a/browser/base/content/test/general/browser_bug623893.js +++ /dev/null @@ -1,37 +0,0 @@ -add_task(function* test() { - yield BrowserTestUtils.withNewTab("data:text/plain;charset=utf-8,1", function* (browser) { - BrowserTestUtils.loadURI(browser, "data:text/plain;charset=utf-8,2"); - yield BrowserTestUtils.browserLoaded(browser); - - BrowserTestUtils.loadURI(browser, "data:text/plain;charset=utf-8,3"); - yield BrowserTestUtils.browserLoaded(browser); - - yield duplicate(0, "maintained the original index"); - yield BrowserTestUtils.removeTab(gBrowser.selectedTab); - - yield duplicate(-1, "went back"); - yield duplicate(1, "went forward"); - yield BrowserTestUtils.removeTab(gBrowser.selectedTab); - yield BrowserTestUtils.removeTab(gBrowser.selectedTab); - }); -}); - -function promiseGetIndex(browser) { - return ContentTask.spawn(browser, null, function() { - let shistory = docShell.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsISHistory); - return shistory.index; - }); -} - -let duplicate = Task.async(function* (delta, msg, cb) { - var startIndex = yield promiseGetIndex(gBrowser.selectedBrowser); - - duplicateTabIn(gBrowser.selectedTab, "tab", delta); - - let tab = gBrowser.selectedTab; - yield BrowserTestUtils.waitForEvent(tab, "SSTabRestored"); - - let endIndex = yield promiseGetIndex(gBrowser.selectedBrowser); - is(endIndex, startIndex + delta, msg); -}); -- cgit v1.2.3