Closed Bug 668489 Opened 13 years ago Closed 13 years ago

Add method to retrieve add-ons src parameter of installation link

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vladmaniac, Assigned: whimboo)

References

Details

(Whiteboard: [lib])

Attachments

(1 file, 2 obsolete files)

This is the code we should wrap into a API method 

var addonUrl = addToFirefox.getNode().href;
  var addonSRC = addonUrl.indexOf("src=discovery-promo");
  var checkSRC = (addonSRC !== -1);

  controller.assert(function () {
    return checkSRC;
  }, "Add-on URL has an SRC value - got '" + checkSRC +
     "', expected 'true'");
We will have a method for the API which will return the value of the src parameter of the installation link. Checks have to be performed in the test.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86 → All
Summary: Add method to check Add-ons SRC attribute while installing addons → Add method to retrieve add-ons src parameter of installation link
Whiteboard: [shared module]
Attached patch Patch v1 (obsolete) — Splinter Review
Retrieves only the value of the src param which can then be used by tests to do direct comparison without knowing the details of the URL.

Geo, if that's ok please check the patch into all branches from default down to mozilla-release.
Attachment #543115 - Flags: review?(gmealer)
Attached patch Patch v1.1 (obsolete) — Splinter Review
I should do a qrefresh first. Sorry.
Attachment #543115 - Attachment is obsolete: true
Attachment #543116 - Flags: review?(gmealer)
Attachment #543115 - Flags: review?(gmealer)
Blocks: 657492
Blocks: 658365
Blocks: 664019
Blocks: 657497
Blocks: 657496
Blocks: 664018
Comment on attachment 543116 [details] [diff] [review]
Patch v1.1

Looks fine. 

Still encourage you to put comments above any regexes a la "src looks like 'src=######&'" or something so people know what you're trying to do, but I wouldn't block the patch on that. 

It's just really useful when it comes time to update the regex (or figure out why it's not doing what it's supposed to).

I'll land as requested.
Attachment #543116 - Flags: review?(gmealer) → review+
Geo, I will land and update the patch with the proposal you made.
Attached patch Patch v2Splinter Review
Updated patch with review comments.
Attachment #543116 - Attachment is obsolete: true
Attachment #543297 - Flags: review+
Component: Mozmill Tests → Mozmill Shared Modules
Component: Mozmill Shared Modules → Mozmill Tests
Whiteboard: [shared module] → [lib]
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: