Bug 1495184 - Follow-up: Remove unneeded comments in nsMsgCompose.cpp, fix four tests, update XML files. r=aceman
authorJorg K <jorgk@jorgk.com>
Sat, 29 Sep 2018 22:37:41 +0200
changeset 33272 ae62e27f1265371d93dd0707edcaa6fa4ae1fedb
parent 33271 f1d5e317265924cd927819b3eb5b2a27b57b0cd1
child 33273 390588f44e2bb7b269c20a44b90cefe121e9adaf
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersaceman
bugs1495184
Bug 1495184 - Follow-up: Remove unneeded comments in nsMsgCompose.cpp, fix four tests, update XML files. r=aceman
chat/content/convbrowser.xml
mail/base/content/tabmail.xml
mailnews/compose/src/nsMsgCompose.cpp
mailnews/compose/test/unit/head_compose.js
mailnews/compose/test/unit/test_temporaryFilesRemoved.js
mailnews/imap/test/unit/test_offlineDraftDataloss.js
mailnews/imap/test/unit/test_saveImapDraft.js
--- a/chat/content/convbrowser.xml
+++ b/chat/content/convbrowser.xml
@@ -993,17 +993,19 @@
         <parameter name="aRequest"/>
         <parameter name="aStatus"/>
         <parameter name="aMessage"/>
       </method>
 
       <method name="onSecurityChange">
         <parameter name="aProgress"/>
         <parameter name="aRequest"/>
+        <parameter name="aOldState"/>
         <parameter name="aState"/>
+        <parameter name="aContentBlockingLogJSON"/>
       </method>
 
 
       <!-- autoscroll stuff -->
       <field name="_AUTOSCROLL_SPEED">3</field>
       <field name="_AUTOSCROLL_SNAP">10</field>
       <field name="_scrollingView">null</field>
       <field name="_autoScrollTimer">null</field>
--- a/mail/base/content/tabmail.xml
+++ b/mail/base/content/tabmail.xml
@@ -1741,17 +1741,19 @@
                                     .sameTypeRootTreeItem
                                     .chromeEventHandler;
           this._callTabListeners("onStatusChange", [browser, ...arguments]);
         ]]></body>
       </method>
       <method name="onSecurityChange">
         <parameter name="aWebProgress"/>
         <parameter name="aRequest"/>
+        <parameter name="aOldState"/>
         <parameter name="aState"/>
+        <parameter name="aContentBlockingLogJSON"/>
         <body><![CDATA[
           let browser = aWebProgress.QueryInterface(Ci.nsIDocShellTreeItem)
                                     .sameTypeRootTreeItem
                                     .chromeEventHandler;
           this._callTabListeners("onSecurityChange", [browser, ...arguments]);
         ]]></body>
       </method>
       <method name="onRefreshAttempted">
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -4055,38 +4055,34 @@ NS_IMETHODIMP nsMsgComposeSendListener::
       msgCompose->GetMessageSend(getter_AddRefs(msgSend));
       if (msgSend)
         msgSend->Abort();
     }
   }
   return NS_OK;
 }
 
-/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
 NS_IMETHODIMP nsMsgComposeSendListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress)
 {
   /* Ignore this call */
   return NS_OK;
 }
 
-/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */
 NS_IMETHODIMP nsMsgComposeSendListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags)
 {
   /* Ignore this call */
   return NS_OK;
 }
 
-/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
 NS_IMETHODIMP nsMsgComposeSendListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage)
 {
   /* Ignore this call */
   return NS_OK;
 }
 
-/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
 NS_IMETHODIMP nsMsgComposeSendListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
                                                          uint32_t aOldState, uint32_t aState,
                                                          const nsAString& aContentBlockingLogJSON) {
   /* Ignore this call */
   return NS_OK;
 }
 
 nsresult
--- a/mailnews/compose/test/unit/head_compose.js
+++ b/mailnews/compose/test/unit/head_compose.js
@@ -101,17 +101,17 @@ var progressListener = {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
       this.resolve(mailTestUtils.firstMsgHdr(gDraftFolder));
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress,
     aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, state) {},
+  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 function createMessage(aAttachment) {
   let fields = Cc["@mozilla.org/messengercompose/composefields;1"]
                  .createInstance(Ci.nsIMsgCompFields);
--- a/mailnews/compose/test/unit/test_temporaryFilesRemoved.js
+++ b/mailnews/compose/test/unit/test_temporaryFilesRemoved.js
@@ -15,17 +15,17 @@ var progressListener = {
   onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
       do_timeout(0, check_result);
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, state) {},
+  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 function get_temporary_files_for(name) {
   let file = Services.dirsvc.get("TmpD", Ci.nsIFile);
   file.append(name);
--- a/mailnews/imap/test/unit/test_offlineDraftDataloss.js
+++ b/mailnews/imap/test/unit/test_offlineDraftDataloss.js
@@ -163,17 +163,17 @@ var progressListener = {
     }
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress,
                              aMaxSelfProgress, aCurTotalProgress,
                              aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, state) {},
+  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 /*
  * helper functions
  */
--- a/mailnews/imap/test/unit/test_saveImapDraft.js
+++ b/mailnews/imap/test/unit/test_saveImapDraft.js
@@ -130,17 +130,17 @@ var progressListener = {
       dl('onStateChange');
       async_driver();
     }
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, state) {},
+  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 /*
  * helper functions
  */