 +
 +  _onTargetDestroyed(targetInfo) {
 +    this._session.emitEvent('Target.targetDestroyed', targetInfo);
++  }
++
++  _onPageTargetReady({attachInfo, targetInfo}) {
++    const options = this._createdBrowserContextOptions.get(targetInfo.browserContextId);
++    if (!options)
++      return;
++    const sessionId = this._session.dispatcher().createSession(targetInfo.targetId);
++    const messages = [];
++    // TODO: perhaps, we should just have a single message 'initBrowserContextOptions'.
++    if (options.userAgent !== undefined)
++      messages.push({ id: 0, methodName: 'Page.setUserAgent', params: { userAgent: options.userAgent } });
++    attachInfo.push({ sessionId, messages });
 +  }
 +
 +  async newPage({browserContextId}) {

+    };
+    this._eventListeners = [
+      helper.addProgressListener(tab.linkedBrowser, navigationListener, Ci.nsIWebProgress.NOTIFY_LOCATION),
+    ];
+  }
+
+  id() {

+this.NetworkObserver = NetworkObserver;
diff --git a/testing/juggler/TargetRegistry.js b/testing/juggler/TargetRegistry.js
new file mode 100644
index 0000000000000000000000000000000000000000..6231668027bb83bef2b3f839d44bcf043c5bb292
--- /dev/null
+++ b/testing/juggler/TargetRegistry.js
@@ -0,0 +1,196 @@
+const {EventEmitter} = ChromeUtils.import('resource://gre/modules/EventEmitter.jsm');
+const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
