summaryrefslogtreecommitdiffstats
path: root/toolkit/components/printing
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:55:19 +0200
commiteb70e6e3d0bff11c25f14b1196025791bf2308fb (patch)
tree5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/components/printing
parent32ead795290b3399d56b4708fc75b77d296f6a1a (diff)
downloadUXP-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/components/printing')
-rw-r--r--toolkit/components/printing/moz.build7
-rw-r--r--toolkit/components/printing/tests/browser.ini5
-rw-r--r--toolkit/components/printing/tests/browser_page_change_print_original.js60
-rw-r--r--toolkit/components/printing/tests/file_page_change_print_original_1.html8
-rw-r--r--toolkit/components/printing/tests/file_page_change_print_original_2.html1
5 files changed, 0 insertions, 81 deletions
diff --git a/toolkit/components/printing/moz.build b/toolkit/components/printing/moz.build
index dc8204b8c..aac3a838c 100644
--- a/toolkit/components/printing/moz.build
+++ b/toolkit/components/printing/moz.build
@@ -5,10 +5,3 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn']
-
-BROWSER_CHROME_MANIFESTS += [
- 'tests/browser.ini'
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Printing')
diff --git a/toolkit/components/printing/tests/browser.ini b/toolkit/components/printing/tests/browser.ini
deleted file mode 100644
index 5f2867189..000000000
--- a/toolkit/components/printing/tests/browser.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[browser_page_change_print_original.js]
-support-files =
- file_page_change_print_original_1.html
- file_page_change_print_original_2.html
-skip-if = os == "mac"
diff --git a/toolkit/components/printing/tests/browser_page_change_print_original.js b/toolkit/components/printing/tests/browser_page_change_print_original.js
deleted file mode 100644
index 864150451..000000000
--- a/toolkit/components/printing/tests/browser_page_change_print_original.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Verify that if the page contents change after print preview is initialized,
- * and we re-initialize print preview (e.g. by changing page orientation),
- * we still show (and will therefore print) the original contents.
- */
-const TEST_PATH = getRootDirectory(gTestPath)
- .replace("chrome://mochitests/content", "http://example.com");
-
-add_task(function* pp_after_orientation_change() {
- const URI = TEST_PATH + "file_page_change_print_original_1.html";
- // Can only do something if we have a print preview UI:
- if (AppConstants.platform != "win" && AppConstants.platform != "linux") {
- ok(true, "Can't test if there's no print preview.");
- return;
- }
-
- // Ensure we get a browserStopped for this browser
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, URI, false, true);
- let browserToPrint = tab.linkedBrowser;
- let ppBrowser = PrintPreviewListener.getPrintPreviewBrowser();
-
- // Get a promise now that resolves when the original tab's location changes.
- let originalTabNavigated = BrowserTestUtils.browserStopped(browserToPrint);
-
- // Enter print preview:
- let printPreviewEntered = BrowserTestUtils.waitForMessage(ppBrowser.messageManager, "Printing:Preview:Entered");
- document.getElementById("cmd_printPreview").doCommand();
- yield printPreviewEntered;
-
- // Assert that we are showing the original page
- yield ContentTask.spawn(ppBrowser, null, function* () {
- is(content.document.body.textContent.trim(), "INITIAL PAGE", "Should have initial page print previewed.");
- });
-
- yield originalTabNavigated;
-
- // Change orientation and wait for print preview to re-enter:
- let orient = PrintUtils.getPrintSettings().orientation;
- let orientToSwitchTo = orient != Ci.nsIPrintSettings.kPortraitOrientation ?
- "portrait" : "landscape";
- let printPreviewToolbar = document.querySelector("toolbar[printpreview=true]");
-
- printPreviewEntered = BrowserTestUtils.waitForMessage(ppBrowser.messageManager, "Printing:Preview:Entered");
- printPreviewToolbar.orient(orientToSwitchTo);
- yield printPreviewEntered;
-
- // Check that we're still showing the original page.
- yield ContentTask.spawn(ppBrowser, null, function* () {
- is(content.document.body.textContent.trim(), "INITIAL PAGE", "Should still have initial page print previewed.");
- });
-
- // Check that the other tab is definitely showing the new page:
- yield ContentTask.spawn(browserToPrint, null, function* () {
- is(content.document.body.textContent.trim(), "REPLACED PAGE!", "Original page should have changed.");
- });
-
- PrintUtils.exitPrintPreview();
-
- yield BrowserTestUtils.removeTab(tab);
-});
diff --git a/toolkit/components/printing/tests/file_page_change_print_original_1.html b/toolkit/components/printing/tests/file_page_change_print_original_1.html
deleted file mode 100644
index 76e3be137..000000000
--- a/toolkit/components/printing/tests/file_page_change_print_original_1.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<script>
-window.onafterprint = function() {
- setTimeout(function() {
- window.location = "file_page_change_print_original_2.html"
- }, 0);
-}
-</script>
-<pre>INITIAL PAGE</pre>
diff --git a/toolkit/components/printing/tests/file_page_change_print_original_2.html b/toolkit/components/printing/tests/file_page_change_print_original_2.html
deleted file mode 100644
index 44f33281c..000000000
--- a/toolkit/components/printing/tests/file_page_change_print_original_2.html
+++ /dev/null
@@ -1 +0,0 @@
-REPLACED PAGE!