зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1853546 - Remove dom.enable_window_print pref r=smaug,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D188789
This commit is contained in:
Родитель
374e0b9059
Коммит
27fa1ad977
|
@ -150,7 +150,6 @@ fail-if = xorigin
|
|||
[test_bug698061.html]
|
||||
[test_bug698551.html]
|
||||
[test_bug707749.html]
|
||||
[test_bug739038.html]
|
||||
[test_bug740811.html]
|
||||
[test_bug743615.html]
|
||||
[test_bug755320.html]
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=739038
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 739038</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=739038">Mozilla Bug 739038</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
/** Test for Bug 739038 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.enable_window_print", false]]}, function() {
|
||||
var ifr = document.createElement("iframe");
|
||||
ifr.onload = function() {
|
||||
var win = ifr.contentWindow;
|
||||
var caughtException = false;
|
||||
try {
|
||||
win.print();
|
||||
} catch (e) {
|
||||
caughtException = true;
|
||||
}
|
||||
ok(caughtException, "window.print() should throw an exception");
|
||||
is(win.print, undefined, "window.print shouldn't even exist");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
document.body.appendChild(ifr);
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -250,7 +250,7 @@ interface nsIPrintSettings;
|
|||
[Throws, NeedsSubjectPrincipal] undefined alert(DOMString message);
|
||||
[Throws, NeedsSubjectPrincipal] boolean confirm(optional DOMString message = "");
|
||||
[Throws, NeedsSubjectPrincipal] DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
|
||||
[Throws, Pref="dom.enable_window_print"]
|
||||
[Throws]
|
||||
undefined print();
|
||||
|
||||
// Returns a window that you can use for a print preview.
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
[DEFAULT]
|
||||
support-files =
|
||||
head.js
|
||||
prefs =
|
||||
dom.enable_window_print=true
|
||||
skip-if =
|
||||
os != 'android'
|
||||
[test_geckoview_actor_telemetry.html]
|
||||
|
|
|
@ -95,7 +95,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun windowDotPrintAvailableTest() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity {
|
||||
mainSession.loadTestPath(COLOR_ORANGE_BACKGROUND_HTML_PATH)
|
||||
mainSession.waitForPageStop()
|
||||
|
@ -193,7 +192,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun basicWindowDotPrintTest() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity { activity ->
|
||||
// CSS rules render this blue on screen and orange on print
|
||||
mainSession.loadTestPath(PRINT_CONTENT_CHANGE)
|
||||
|
@ -213,7 +211,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun statusWindowDotPrintTest() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity { activity ->
|
||||
// CSS rules render this blue on screen and orange on print
|
||||
mainSession.loadTestPath(PRINT_CONTENT_CHANGE)
|
||||
|
@ -245,7 +242,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun staticContextWindowDotPrintTest() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity { activity ->
|
||||
// CSS rules render this blue on screen and orange on print
|
||||
// Print button removes content after printing to test if it froze a static page for printing
|
||||
|
@ -266,7 +262,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun iframeWindowDotPrintTest() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity { activity ->
|
||||
// Main frame CSS rules render red on screen and green on print
|
||||
// iframe CSS rules render blue on screen and orange on print
|
||||
|
@ -288,7 +283,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun contentIframeWindowDotPrintTest() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity { activity ->
|
||||
// Main frame CSS rules render red on screen and green on print
|
||||
// iframe CSS rules render blue on screen and orange on print
|
||||
|
@ -306,7 +300,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun contentPDFWindowDotPrintTest() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity { activity ->
|
||||
// CSS rules render this blue on screen and orange on print
|
||||
mainSession.loadTestPath(ORANGE_PDF_PATH)
|
||||
|
@ -326,7 +319,6 @@ class PrintDelegateTest : BaseSessionTest() {
|
|||
@NullDelegate(Autofill.Delegate::class)
|
||||
@Test
|
||||
fun availableCanonicalBrowsingContext() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.enable_window_print" to true))
|
||||
activityRule.scenario.onActivity { activity ->
|
||||
// CSS rules render this blue on screen and orange on print
|
||||
mainSession.loadTestPath(ORANGE_PDF_PATH)
|
||||
|
|
|
@ -2347,11 +2347,6 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: dom.enable_window_print
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Only intended for fuzzing purposes, this will break mozPrintCallback, etc.
|
||||
- name: dom.window_print.fuzzing.block_while_printing
|
||||
type: bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче