The recent failures all seem to be on the assertion that lastAccessed of tab 1 is
later than the test start time. It's possible that things happen so quickly that
lastAccessed of tab 1 is the same as the start time, so this patch changes the
comparison to be a <=.
MozReview-Commit-ID: 67CVQPj1ShM
--HG--
extra : rebase_source : c370422f3c9e54bbae8b4e7827c671c5a784ce7b
This includes removing the "web-extension-preferences-replacing" and "web-extension-preferences-replaced"
notifications as they are no longer needed.
MozReview-Commit-ID: IjNf4BImgas
--HG--
extra : rebase_source : a48e72c291ebd509d19e9e94196d3600eb7328c4
This code changes all of the functions in the ESS and the EPM to accept an extensionId rather than an
extension object, which is required for responding to the new onUpdate event.
MozReview-Commit-ID: FwMVa0fShGj
--HG--
extra : rebase_source : 6b17f729966b5f1c804fb50fe41459859ab3049b
When using WebExt messaging with Responsive Design Mode, message manager
messages traveling from content to parent such as "MessageChannel:Messages" are
received with `event.target` set to the <iframe mozbrowser> inside RDM that
hosts the content.
Here we change `getSender` processing for messages like this to also check HTML
iframes for related tabs, in addition to XUL elements as before.
MozReview-Commit-ID: 3qphe2W8jHM
--HG--
extra : rebase_source : 4b9f3bc930a57bda847cede0217af29d1692d852
This patch introduces two changes to the test:
1. It breaks apart the assertion that was combining three tests into individual assertions, so if this does
fail again in the future it will be easier to spot the actual problem.
2. It uses addTab and browserLoaded instead of openNewForegroundTab, which seems to allow the test to wait
long enough before starting the extension.
When I was able to reproduce the failure, after separating the assertions, I found the one that was failing
was the check that tab2.lastAccessed was less than the current time. I believe that the current time was being
recorded too soon, which is why I changed the test to not record the current time until after both tabs have
completed loading. This seems to fix the intermittent locally for me.
MozReview-Commit-ID: I3VoYODwjgz
--HG--
extra : rebase_source : 34729a3ae02e9266cf5aee63de293786403a46e9
This patch just forwards invocations of the bootstrap update() and
uninstall() methods to events that other parts of the WebExtension
framework can listen for. We have an existing event that fires while
an extension is being uninstalled. This event was named "uninstall"
but it gets renamed here to "onUninstalling" to disambiguate the two
events.
MozReview-Commit-ID: BIpIR8n9HBM
--HG--
extra : rebase_source : b191d43279129da6fc7f67b7e7960b8b20dca6b8
I spoke to Marco about this and it turns out the problem is due to using PlacesUtils.history.insertMany together with
PlacesTestUtils.visitsInDB. Calling the former to insert the visits and then immediately calling the latter to verify
them can result in the latter reading a snapshot of the places DB that is not up to date. The fix is to call
PlacesTestUtils.addVisits which will not return until everything is finished up and will therefore not cause
PlacesTestUtils.visitsInDB to possibly read an old snapshot.
MozReview-Commit-ID: GebqORQI0Co
--HG--
extra : rebase_source : a52b9354557f7bcf4f94ad2b06693ae8f81b87ab
When the New Tab page is opened, the browser object that is passed into the isArticleChangeListener
is not a valid browser from the perspective of tabbrowser.xml, so it is not able to find it in its
_tabForBrowser map. This causes undefined to be passed into tabManager.getWrapper(), which causes
the error.
This patch fixes this by not calling tabManager.getWrapper(), and subsequently firing the onUpdate
event, if the return value from gBrowser.getTabForBrowser() is undefined. Testing shows that that
is only the case when the New Tab page is opened, and that page is not, and is unlikely to be
readerable any time in the foreseeable future (confirmed on IRC), so ignoring this case in the
listener is acceptable.
MozReview-Commit-ID: D9LQRrPmCoU
--HG--
extra : rebase_source : da5c074c2e59babb5385d24a4f768aa4b7ae8997