Closed Bug 570266 Opened 11 years ago Closed 7 years ago
Keyword For Search Field resolves form action URI incorrectly
It uses the document URI rather than the form's baseURI when calling newURI on the action attribute's value. (Also it can use the property rather than the attribute, since XPCNativeWrappers mean we don't need to worry about bug 264607.)
It can just use form.mozActionURI once the relevant patch in bug 566128 lands.
Whiteboard: [good first bug]
Target Milestone: --- → Firefox 4.0b4
Target Milestone: Firefox 4.0b4 → ---
(In reply to comment #1) > It can just use form.mozActionURI once the relevant patch in bug 566128 lands. FTR: form.mozActionUri was introduced and then removed through bug 607145.
Hey Gavin, this has been marked as a good first bug for some time now but no one's taken it up. Maybe it would do better if it were a mentored bug. What do you think?
Whiteboard: [good first bug] → [good first bug][mentor=gavin]
This could be a good opportunity to gain some test-writing experience! This is testable with a browser-chrome test, I think (https://developer.mozilla.org/en-US/docs/Browser_chrome_tests). An example of a test that loads a page and tests how chrome interacts with it is http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/browser_bug581947.js. You could create a new test next to that (maybe name it browser_addKeywordSearch.js), have it load a page with a form whose baseURI is non-default, then call AddKeywordForSearchField directly and check that it creates a keyword with the right URI. Ping me in person if you want to chat about this more!
New patch including tests.
Attachment #768297 - Flags: review?(gavin.sharp) → review+
Patch updated based on Gavin's review.
Attachment #768297 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
You need to log in before you can comment on or make changes to this bug.