You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



You are here: Mozilla MailNews Functional / UI Tests > Mail & News: Mime Parts on Demand

Feature Test Spec: Mail and News Component

Mail and News Component: Mime Parts on Demand (MPOD)

Written by Peter Mock
Updated by Esther Goes
Reviewed by Chris Fuchs

References

UI Specification: IMAP Mime Parts on Demand

Description

This is an IMAP only feature. The IMAP protocol lets us selectively download parts of a message. When displaying messages that have large attachments, it is more efficient to download and display just the message body. The user can download the file attachment at any time. This feature is refer to as "MIME parts on demand," or MPOD. No functional changes expected according to developer.

Perquisite: the file attachment you use should not be files that are normally displayed in line such as Text, Gif, JPEG, and BMP. I suggest using MS Office documents for file attachments.

  1. Verify the default MPOD preferences
    1. Verify the default state for MPOD is to be enabled. Send yourself a message that has a large word document greater than 30k. The attachment should not be downloaded.
    2. Verify you can disable MPOD by adding the following user preference to the pref.js file. "mail.imap.mime_parts_on_demand" - TRUE if enabled (default); if FALSE, we never do it
    3. Verify the default attachment size before MPOD takes effect is 30K.
      1. Send a attachment less than 30k. The attachment should be downloaded
      2. Send a attachment greater than or equal to 30K. The attachment should not be downloaded.
    4. Verify you can change the default MPOD threshold. You want to add the following user preference. "mail.imap.mime_parts_on_demand_threshold" (message size, in bytes, above which we try using MIME parts on demand. Default is 30k.)
      1. Change the size to 100k then test the new setting
      2. Change the size to 1 MB then test the new setting
    5. Verify you can change the maximum depth of a message which we will try to parse and use MPOD. You want to add the following user preference "mail.imap.mime_parts_on_demand_max_depth" - (The maximum depth of a message which we will try to parse and use MPOD for. Depth is defined as how many layers of forwarding there are. Default is 15. If we are trying to parse the body structure of a message which goes deeper than this, we will stop parsing and revert back to a normal full message fetch. This is to prevent attacks with malicious, extremely complex messages.)
      1. Send a sample MS Outlook message to test the default. You may need to look at the IMAP protocol log (Need to create a MS test message)
      2. Send a sample MS Express message to test the default. You may need to look at the IMAP protocol log (Need to create a MS test message)
  2. Verify the feedback given in the message that contains an attachment.
    1. Verify that the attachment description text read, "Not downloaded with message" or a similar phase
    2. Verify that the View | Page Source reads, "This body part will be downloaded on demand." or a similar phase
    3. Add the easter egg user preference which will enable you to see if the attachment has been downloaded. Add the following preference, "mailnews.color_tag_attachments" (FALSE by default; if TRUE, we attach a colored tag to each attachment in the message to indicate whether or not it has been downloaded as part of the message. green = downloaded, orange = not downloaded. This pref. can be useful for testing.)
      1. Send a attachment less than 30k. The attachment should be downloaded and display a green bar.
      2. Send a attachment greater than or equal to 30K. The attachment should not be downloaded and display a orange bar.
    4. Expand the Size column in the Thread pane
      1. Verify that attachments that are automatically downloaded have a file size less than 30k
      2. Verify that attachments that are not automatically downloaded greater or equal to 30k
  3. Verify you can save the file attachment that has not been downloaded. Perform these tests in the Message pane.
    1. Verify you can click on attachment link to download and save the attachment
    2. Verify you can right click on the attachment link and use the context menu "save link as" to download and save the attachment
    3. Verify you can open the attachment pane (bottom of the message) and double click on the attachment link to download and save the attachment
    4. Verify you can open the attachment pane (bottom of the message) and right click on the attachment link and use the context menu "Save Attachment As" to download and save the attachment
    5. Verify you can open the attachment pane (bottom of the message) and right click on the attachment link and use the context menu "Open Attachment" to download and save the attachment
  4. Repeat the above section but perform the tests in the Message Window
  5. Verify the following Message actions which does not require the file attachment to be downloaded (it uses a shell). To verify, it may require looking at the IMAP Protocol log. Assume that the file attachment is greater than the default setting. Perform these tests in the Message pane.
    1. Set the View message option to view attachments in line. Verify that has a file attachment (not downloaded) does not automatically download
    2. Set the View message option to not view attachments in line.
      1. Receive a message that has a plain text attachment and verify the entire message including text attachment was not downloaded
      2. Receive a message that has a message body which is a multipart type (multipart/mixed, multipart/related, etc.) and verify that we download that multipart's first part. For example, attach a web page to produce a multipart/mixed message.
    3. Verify viewing a message page source (View | Page Source) that has a file attachment (not downloaded) does not automatically download
    4. Verify Quoting
      1. With automatically quoting enable, reply to a message that has a file attachment and verify that the attachment was not downloaded.
      2. Forward quote a message that has a file attachment and verify that the attachment was not downloaded
      3. Forward in line a message that has a file attachment and verify that the attachment was not downloaded
      4. With automatically quoting disable, reply to a message then press the quote button located on the toolbar. Verify that the attachment was not downloaded.
    5. Verify when you print a message that has a file attachment, the attachment was not downloaded
  6. Repeat the above section but perform the tests in the Message Window
  7. Verify the following Messenger actions which should always read the entire message including attachments. Assume message has a file attachment.
    1. Forward a message as attachment and verify that the attachment was downloaded
    2. Synchronize and Go Offline then verify messages that has file attachment was downloaded
    3. Move/Copy to Offline Folder then Synchronize and verify messages that has file attachment were all downloaded
    4. Save Message and verify the attachment was downloaded
    5. Edit Message and verify the attachment was downloaded
  8. Verifying if the message shell and attachment has been cached (Use IMAP Protocol logging). Verify the IMAP log to verify that the attachment was not downloaded again.
    1. Receive a message with an attach Word document (less than 30K). Select another message then re-select this message and verify that the shell and file attachment was not downloaded again
    2. Receive a message with an attach Word document (greater than 30K and less than 1 MB)
      1. Select another message then re-select this message and verify that the shell was not downloaded again
      2. Forward this message as a file attachment and verify the shell and attachment was downloaded from the server
    3. Receive a message with an attach Word document greater than 1 MB
      1. Select another message then re-select this message and verify that the shell was not downloaded again
      2. Save the attachment. Select another message then re-select this message and verify that the attachment may have been downloaded again
  9. Verify Signed & Encrypted messages (tbd)
    1. Verify encrypted message are always downloaded in full. (It is assumed from the outset that encrypted messages cannot benefit from this feature because their MIME structure is hidden from us before they are decrypted.)
    2. Verify signed messages that if there are any parts of the message that are not downloaded, the signature will check out as invalid since it uses all the parts to compute the signature. (Note: instead of displaying this as invalid, we will display it as "Unverified Signature." If the user chooses to verify the signature by clicking on the signature icon, we will re-download the whole message and display the correct signature information.)
  10. Verify MPOD works with multiple attachments. Suggestion: use MS Office document greater than 30k but less than 1MB
    1. Send a message to yourself with 2 or more file attachments, verify neither attachments are downloaded
    2. Verify you save both attachments one at a time
    3. Forward the message as an attachment and verify all attachments are downloaded
    4. Deselect the mail message and re-select the message. Verify the attachment is cached
  11. Verify MPOD works with complex body structures. Verify MPOD functions as expected.
    1. Send a message that has a double forwarded message with one external attachment on each
    2. Send a message that has a double forwarded message with one in line attachment on each and one external attachment on each
    3. Send a message that has a triple-forwarded message with one external attachment on each
    4. Send a message that has a triple-forwarded message with one in line attachment on each and with one external attachment on each
    5. Send a message that has been forwarded 10 times message with one external attachment on each
    6. Send a message that has been forwarded 10 times message with one in line attachment on each and with one external attachment on each