Bug 1617887 - part2 - remove unnecessary getMail3PaneController. r=khushil

This commit is contained in:
Magnus Melin 2020-03-07 11:56:26 +02:00
Родитель a6f2ea9ec9
Коммит a35aabf842
3 изменённых файлов: 3 добавлений и 11 удалений

Просмотреть файл

@ -31,7 +31,7 @@ var {
close_compose_window,
open_compose_new_mail,
} = ChromeUtils.import("resource://testing-common/mozmill/ComposeHelpers.jsm");
var { close_popup } = ChromeUtils.import(
var { close_popup, mc } = ChromeUtils.import(
"resource://testing-common/mozmill/FolderDisplayHelpers.jsm"
);
@ -39,7 +39,6 @@ var { cloudFileAccounts } = ChromeUtils.import(
"resource:///modules/cloudFileAccounts.jsm"
);
var controller = mozmill.getMail3PaneController();
var kAttachmentItemContextID = "msgComposeAttachmentItemContext";
add_task(function setupModule(module) {
@ -66,7 +65,7 @@ add_task(function test_upload_cancel_repeat() {
let provider = new MockCloudfileAccount();
provider.init("someKey");
let cw = open_compose_new_mail(controller);
let cw = open_compose_new_mail(mc);
// We've got a compose window open, and our mock Filelink provider
// ready. Let's attach a file...

Просмотреть файл

@ -509,9 +509,7 @@ function checkAllowForHostsWithPerms(test) {
// Now check that the content hasn't been blocked.
if (
!test.checkForAllowed(
mozmill
.getMail3PaneController()
.window.content.document.getElementById("testelement")
mc.window.content.document.getElementById("testelement")
)
) {
throw new Error(

Просмотреть файл

@ -122,7 +122,6 @@ function checkJsInMail() {
assert_selected_and_displayed(gMsgNo);
let mc = mozmill.getMail3PaneController();
// This works because messagepane is type=content-primary in these tests.
if (typeof mc.window.content.wrappedJSObject.jsIsTurnedOn != "undefined") {
throw new Error("JS is turned on in mail - it shouldn't be.");
@ -145,8 +144,6 @@ function checkJsInNonMessageContent() {
// Deselect everything so we can load our content
select_none();
let mc = mozmill.getMail3PaneController();
// load something non-message-like in the message pane
mc.window.GetMessagePaneFrame().location.href =
"data:text/html;charset=utf-8,<script>var jsIsTurnedOn%3Dtrue%3B<%2Fscript>bar" +
@ -195,7 +192,6 @@ function checkJsInFeedContent() {
// The above just ensures local "inline" content have loaded. We need to wait
// for the remote content to load too before we check anything.
let mc = mozmill.getMail3PaneController();
let feedUrl = url + "remote-noscript.html";
mc.waitFor(
() =>
@ -298,7 +294,6 @@ function checkJsInRemoteContent() {
// Deselect everything so we can load our content
select_none();
let mc = mozmill.getMail3PaneController();
// load something non-message-like in the message pane
mc.window.GetMessagePaneFrame().location.href = url + "remote-noscript.html";
wait_for_message_display_completion();