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 > Cookies

Feature Test Spec: Mail and News Component

Mail and News Component: Cookies

Written by Stephen Donner

Overview

A cookie is information that a website puts on your hard disk so that it can remember something about you at a later time. (More technically, it is information for future use that is stored by the server on the client side of a client/server communication.)

Feature implementation bug: bug 22994

GENERAL UI

1. Migrate from a 4.x profile.

  • Verify that the pref "Disable cookies in Mail & Newsgroups" is checked.

2. Create a new profile.

  • Verify that the pref "Disable cookies in Mail & Newsgroups" is checked.

3. When "Disable Cookies" is checked, the following checkboxes should be disabled:

  • Disable cookies in Mail & Newsgroups
  • Ask me before storing a cookie
  • Limit maximum lifetime of cookies to:
    • (radio button) current session(radio button with field) xx days

4. If any other radio button is checked, all of the following checkboxes/radio buttons become enabled:

  • Disable cookies in Mail & Newsgroups
  • Ask me before storing a cookie
  • Limit maximum lifetime of cookies to:
    • (radio button) current session
    • (radio button with field) xx days

COOKIES DISABLED FOR MAIL & NEWSGROUPS, NO PROMPT

5. Check "Enable all cookies", but also check "Disable cookies in Mail & Newsgroups".

  • Go to Tools | Cookie Manager in Navigator, and select "Manage stored cookies".
  • Under the "Stored cookies" tab, click "Remove All Cookies". Click OK.
  • Create a webpage with this source:
    <html>
    <head>
    <body>
    This is an image coming from an img src tag
    <img src="http://10.169.103.61/scripts/nph-cookie_with_jpg.pl">
    </body>
    </head>
    </html>
    
  • Load the page and do File | Send Page. By default, we will render the HTML inline, causing the <img src> tag to pull that image with a cookie from the server.
  • Verify after viewing the test message that you don't see under "Site": 10.169.103.61 and under "Cookie Name": name2.

COOKIES ENABLED FOR MAIL & NEWSGROUPS, NO PROMPT

6. Check only "Enable all cookies".

  • Go to Tools | Cookie Manager in Navigator, and select "Manage stored cookies".
  • Under the "Stored cookies" tab, click "Remove All Cookies". Click OK.
  • Create a webpage with this source:
    <html>
    <head>
    <body>
    This is an image coming from an img src tag
    <img src="http://10.169.103.61/scripts/nph-cookie_with_jpg.pl">
    </body>
    </head>
    </html>
    
  • Load the page and do File | Send Page. By default, we will render the HTML inline, causing the <img src> tag to pull that image with a cookie from the server.
  • Verify after viewing the test message that you see under "Site": 10.169.103.61 and under "Cookie Name": name2.

COOKIES ENABLED FOR MAIL & NEWSGROUPS, WITH PROMPT

7. Check "Enable all cookies" and "Ask me before storing a cookie".

  • Go to Tools | Cookie Manager in Navigator, and select "Manage stored cookies".
  • Under the "Stored cookies" tab, click "Remove All Cookies". Click OK.
  • Create a webpage with this source:
    <html>
    <head>
    <body>
    This is an image coming from an img src tag
    <img src="http://10.169.103.61/scripts/nph-cookie_with_jpg.pl">
    </body>
    </head>
    </html>
    
  • Load the page and do File | Send Page. By default, we will render the HTML inline, causing the <img src> tag to pull that image with a cookie from the server.
  • Ensure that before you are able to see the image, you get a prompt "The site 10.169.103.61 wants to set a cookie. Do you want to allow it?".
    • Choose "No".
      • Also enable the checkbox "Remember this decision".
        • Verify the image is still rendered, but there isn't a cookie present in Cookie Manager under Site: 10.169.103.61 and Cookie Name: name2.
        • Choose the message with the testcase again. Verify no cookie is set, and you don't get prompted to accept/deny the cookie.
      • Disable the checkbox "Remember this decision".
        • Verify the image is still rendered, but there isn't a cookie present in Cookie Manager under Site: 10.169.103.61 and Cookie Name: name2.
        • Choose the message with the testcase again. Verify you get prompted to accept/deny the cookie.
    • Choose "Yes".
      • Also enable the checkbox "Remember this decision".
        • Verify the image is rendered, and there is a cookie of Site: 10.169.103.61 and Cookie Name: name2 in Cookie Manager.
        • Choose the message with the testcase again. Verify you don't get prompted, and the cookie is set.
      • Disable the checkbox "Remember this decision".
        • Verify the image is rendered and a cookie is present in Cookie Manager under Site: 10.169.103.61 and Cookie Name: name2.
        • Choose the message with the testcase again. Verify you get prompted to accept/deny the cookie.

COOKIES DISABLED FOR MAIL & NEWSGROUPS (ORIGINATING WEB SITE ONLY), WITH PROMPT

8. Check "Enable cookies from the originating web site only" and "Ask me before storing a cookie".

  • Go to Tools | Cookie Manager in Navigator, and select "Manage stored cookies".
  • Under the "Stored cookies" tab, click "Remove All Cookies". Click OK.
  • Create a webpage with this source:
    <html>
    <head>
    <body>
    This is an image coming from an img src tag
    <img src="http://10.169.103.61/scripts/nph-cookie_with_jpg.pl">
    </body>
    </head>
    </html>
    
  • Load the page and do File | Send Page. By default, we will render the HTML inline, causing the <img src> tag to pull that image with a cookie from the server.
  • Ensure that before you are able to see the image, you get a prompt "The site 10.169.103.61 wants to set a cookie. Do you want to allow it?".
    • Choose "No".
      • Also enable the checkbox "Remember this decision".
        • Verify the image is still rendered, but there isn't a cookie present in Cookie Manager under Site: 10.169.103.61 and Cookie Name: name2.
        • Choose the message with the testcase again. Verify no cookie is set, and you don't get prompted to accept/deny the cookie.
      • Disable the checkbox "Remember this decision".
        • Verify the image is still rendered, but there isn't a cookie present in Cookie Manager under Site: 10.169.103.61 and Cookie Name: name2.
        • Choose the message with the testcase again. Verify you get prompted to accept/deny the cookie.
    • Choose "Yes".
      • Also enable the checkbox "Remember this decision".
      • Verify the image is rendered, and there is a cookie of Site: 10.169.103.61 and Cookie Name: name2 in Cookie Manager.
      • Choose the message with the testcase again. Verify you don't get prompted, and the cookie is set.
    • Disable the checkbox "Remember this decision".
      • Verify the image is rendered and a cookie is present in Cookie Manager under Site: 10.169.103.61 and Cookie Name: name2.
        Choose the message with the testcase again. Verify you get prompted to accept/deny the cookie.