Closed Bug 513822 Opened 16 years ago Closed 16 years ago

[mozmill] - Disable Cookies

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aakashd, Assigned: aakashd)

References

Details

Attachments

(2 files, 5 obsolete files)

Attached patch patch (obsolete) — Splinter Review
The testscript disables cookie saving via the preferences dialog, goes to mozilla.org and then checks that cookies are not saved on the cookies manager. Litmus Testcases Represented: * Testcase ID #8053 - Disabling Cookies * Testcase ID #6011 - Disabling Cookies
Attachment #397754 - Flags: review?(hskupin)
Attachment #397754 - Flags: review?(hskupin)
There's an issue with windows xp.
Attached patch patch to review (obsolete) — Splinter Review
This patch works on WinXP due to an added sleep(500) and sleep(gDelay) when accessing the privacyPane HistoryMode and cookies' manager.
Assignee: nobody → adesai
Attachment #397754 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #397883 - Flags: review?(hskupin)
Attachment #397883 - Attachment is obsolete: true
Attachment #398512 - Flags: review?(hskupin)
Attachment #397883 - Flags: review?(hskupin)
Comment on attachment 398512 [details] [diff] [review] patch with changes made to preference dialog handler >+ module.cm = Cc["@mozilla.org/cookiemanager;1"] >+ .getService(Ci.nsICookieManager2); Nit: indentation >+var teardownModule = function(module) >+{ >+ PrefsAPI.preferences.branch.clearUserPref("network.cookie.cookieBehavior"); >+ cm.removeAll(); Please encapsulate it in try/catch. It's easier for me to remove for 1.9.2 as to add each time. >+ var historyMode = new elementslib.ID(controller.window.document, "historyMode"); >+ controller.waitForElement(historyMode); click directly >+ if (PrefsAPI.preferences.getPref("network.cookie.cookieBehavior", "") != 2) >+ { >+ controller.click(new elementslib.ID(controller.window.document, "acceptCookies")); >+ } Check the boxes via getNode.check. >+ // Fails due to bug 513820 Just write it like: "// XXX: Bug 513820 + short description >+ // Close the cookies manager and the preferences dialog >+ cmController.keypress(null, "w", {accelKey: true}); Please add a short timeout. Otherwise it looks good too. r=me with this changes.
Attachment #398512 - Flags: review?(hskupin) → review+
Attached patch patch_disableCookies (obsolete) — Splinter Review
This patch contains fixes for the comments made in the previous review.
Attachment #398512 - Attachment is obsolete: true
Attachment #399763 - Flags: review?(hskupin)
Comment on attachment 399763 [details] [diff] [review] patch_disableCookies Disregard the patch comment #5, this is a WIP.
Attachment #399763 - Flags: review?(hskupin)
Attached patch patch_disableCookies (obsolete) — Splinter Review
Ok, so changes were made form the previous review and I had to add the waitForElement back to historyMode as the testscript failed when it was removed on OSX for Fx3.5.3.
Attachment #399763 - Attachment is obsolete: true
Attachment #399862 - Flags: review?(hskupin)
Sorry, for the extra patch...I forgot the summary in bug 513820's comment.
Attachment #399862 - Attachment is obsolete: true
Attachment #399862 - Flags: review?(hskupin)
Comment on attachment 399865 [details] [diff] [review] patch_disableCookies >+ module.cm = Cc["@mozilla.org/cookiemanager;1"] >+ .getService(Ci.nsICookieManager2); The indentation is still wrong. I assume that you are using tabs in your editor? Please make sure to switch to 2 blanks. >+ PrefsAPI.preferences.branch.clearUserPref("network.cookie.cookieBehavior"); Please always wrap it into try/catch. I will remove it later before checking into trunk. Adding them for myself is more work for me. >+ * prefDisableCookieDialogCallback - Goes to the privacy pane disables cookie saving You don't have to call the function name. The description is enough. >+ // Go to custom history settings and click on the show cookies button >+ var historyMode = new elementslib.ID(controller.window.document, "historyMode"); >+ controller.waitForElement(historyMode); Mmh. I don't understand why we have to wait here. It should not be necessary. But ok, lets use waitForElement. Please make sure to always pass gTimeout to the function call in the future. >+ if (acceptCookiesPref.getNode().checked==true) '==true' is not necessary. I'll make those changes and check it in. Thanks.
Attachment #399865 - Flags: review+
Mass move of Mozmill Test related project bugs to newly created components. You can filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Component: Networking: Cookies → Mozmill Tests
Product: Core → Mozilla QA
QA Contact: networking.cookies → mozmill-tests
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: