Closed Bug 1500240 Opened 2 years ago Closed 2 years ago
Stop relying on get
Element By ID for anonymous search-suggestions-change-settings element in test
Bug 1500240 - Use getAnonymousElementByAttribute instead of getElementByID for XBL anonymous search element;r=dao
46 bytes, text/x-phabricator-request
|Details | Review|
This returns null in browser.xhtml: https://searchfox.org/mozilla-central/rev/c56977420df7a1b692ce0f7e499ddb364d9fd7b2/browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-out.js#58. I was surprised that this works at all inside of XBL anon content in browser.xul, but I think it's happening at https://searchfox.org/mozilla-central/rev/c56977420df7a1b692ce0f7e499ddb364d9fd7b2/dom/xul/XULDocument.cpp#929. This is done only in the test (https://searchfox.org/mozilla-central/search?q=search-suggestions-change-settings&path=) so I think this would be safe to use `document.getAnonymousElementByAttribute` instead.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/53abc33e3e38 Use getAnonymousElementByAttribute instead of getElementByID for XBL anonymous search element;r=dao
You need to log in before you can comment on or make changes to this bug.