diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:55:19 +0200 |
commit | eb70e6e3d0bff11c25f14b1196025791bf2308fb (patch) | |
tree | 5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/content/tests/browser/browser_bug982298.js | |
parent | 32ead795290b3399d56b4708fc75b77d296f6a1a (diff) | |
download | UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.gz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.lz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.xz UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.zip |
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/content/tests/browser/browser_bug982298.js')
-rw-r--r-- | toolkit/content/tests/browser/browser_bug982298.js | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/toolkit/content/tests/browser/browser_bug982298.js b/toolkit/content/tests/browser/browser_bug982298.js deleted file mode 100644 index 047340c5c..000000000 --- a/toolkit/content/tests/browser/browser_bug982298.js +++ /dev/null @@ -1,70 +0,0 @@ -const scrollHtml = - "<textarea id=\"textarea1\" row=2>Firefox\n\nFirefox\n\n\n\n\n\n\n\n\n\n" + - "</textarea><a href=\"about:blank\">blank</a>"; - -add_task(function*() { - let url = "data:text/html;base64," + btoa(scrollHtml); - yield BrowserTestUtils.withNewTab({gBrowser, url}, function*(browser) { - let awaitFindResult = new Promise(resolve => { - let listener = { - onFindResult(aData) { - info("got find result"); - browser.finder.removeResultListener(listener); - - ok(aData.result == Ci.nsITypeAheadFind.FIND_FOUND, "should find string"); - resolve(); - }, - onCurrentSelection() {}, - onMatchesCountResult() {} - }; - info("about to add results listener, open find bar, and send 'F' string"); - browser.finder.addResultListener(listener); - }); - gFindBar.onFindCommand(); - EventUtils.sendString("F"); - info("added result listener and sent string 'F'"); - yield awaitFindResult; - - let awaitScrollDone = BrowserTestUtils.waitForMessage(browser.messageManager, "ScrollDone"); - // scroll textarea to bottom - const scrollTest = - "var textarea = content.document.getElementById(\"textarea1\");" + - "textarea.scrollTop = textarea.scrollHeight;" + - "sendAsyncMessage(\"ScrollDone\", { });" - browser.messageManager.loadFrameScript("data:text/javascript;base64," + - btoa(scrollTest), false); - yield awaitScrollDone; - info("got ScrollDone event"); - yield BrowserTestUtils.loadURI(browser, "about:blank"); - yield BrowserTestUtils.browserLoaded(browser); - - ok(browser.currentURI.spec == "about:blank", "got load event for about:blank"); - - let awaitFindResult2 = new Promise(resolve => { - let listener = { - onFindResult(aData) { - info("got find result #2"); - browser.finder.removeResultListener(listener); - resolve(); - }, - onCurrentSelection() {}, - onMatchesCountResult() {} - }; - - browser.finder.addResultListener(listener); - info("added result listener"); - }); - // find again needs delay for crash test - setTimeout(function() { - // ignore exception if occured - try { - info("about to send find again command"); - gFindBar.onFindAgainCommand(false); - info("sent find again command"); - } catch (e) { - info("got exception from onFindAgainCommand: " + e); - } - }, 0); - yield awaitFindResult2; - }); -}); |