This moves AboutNewTab.init from nsBrowserGlue.js handling of "browser-delayed-startup-finished" into aboutNewTabService.js so that when the service is loaded once from the main thread probably by browser.js towards the beginning of _delayedStartup just before potentially calling gBrowser.loadTabs, the service triggers the attaching of RemotePages(about:newtab) before any about:newtab pages load. Additionally even when RemotePages starts early enough, Activity Stream might not borrow the RemotePages instance early enough to catch the RemotePage:Load message, so to simulate that, RemotePages now remembers when a port has been loaded for consumers to check. Adds tests to confirm the expected properties on the port and value of loaded at the various RemotePage:* messages. MozReview-Commit-ID: IXJLvFCgbEH
activity-stream
This system add-on replaces the new tab page in Firefox with a new design and functionality as part of the Activity Stream project. It can be enabled (or disabled) via the browser.newtabpage.activity-stream.enabled pref.
The files in this directory, including vendor dependencies, are imported from the system-addon directory in https://github.com/mozilla/activity-stream.
Read docs/v2-system-addon for more detail.