Skip to content

Instantly share code, notes, and snippets.

@ochameau
ochameau / gist:98adee2938b4cdcee1d7e96fedc730aa
Created June 21, 2021 16:25
Events for print preview on pdf
[WindowGlobalLogger] handleEvent(DOMWindowCreated)
BrowsingContext.browserId: 4294967297
BrowsingContext.id: 4294967297
innerWindowId: 4294967298
pid: undefined
isClosed: false
isInProcess: false
isCurrentGlobal: true
currentRemoteType: undefined
hasParent: no
@ochameau
ochameau / gist:e7478973d738b2b523bc23315dc4c26f
Created June 21, 2021 16:21
Events for about:blank new tabs
Tested while executing:
gBrowser.addTab("about:blank", {triggeringPrincipal:Services.scriptSecurityManager.getSystemPrincipal()})
[WindowGlobalLogger] handleEvent(DOMWindowCreated)
BrowsingContext.browserId: 13
BrowsingContext.id: 43
innerWindowId: 36
pid: undefined
isClosed: false
isInProcess: false
@ochameau
ochameau / targets.md
Created January 28, 2021 13:10
Small updated doc about targets

Devtools Targets:

DevTools Toolbox can debug many contexts, which can be:

  • Documents
  • Workers (regular web workers, shared workers and service workers) (As of today, shared workers and service workers are only supported in the browser toolbox)
  • Processes (only for the browser toolbox)
  • Extensions (only from the browser toolbox, or per-extension dedicated toolbox)

Each instance of these contexts are called "target" in DevToools.

@ochameau
ochameau / fission.md
Last active May 20, 2020 14:10
Fission DevTools Gifs

A few gifs about Fission support in DevTools

@ochameau
ochameau / fission.md
Last active January 23, 2020 09:49
Fission pres

Fission

Fission and BrowsingContexts

What's that all about?

Here is what was happening before fission. When navigating between two WebSites, you were staying in the same content process:

 The current tab's content process                                                        
@ochameau
ochameau / hack-something-for-the-client.patch
Created October 29, 2019 16:48
Load application panel OOP (BROKEN!)
commit 937187b5f15df622f08230e52e52c1d2a040e480
Author: Alexandre Poirot <[email protected]>
Date: Thu May 10 10:28:23 2018 -0700
oop pipeline
MozReview-Commit-ID: 4bUO2sK7Guf
diff --git a/devtools/client/framework/target-from-url.js b/devtools/client/framework/target-from-url.js
index 5dcbff79f907..2f4c35fec0ec 100644
DOM.getBoxModel (bug 1545726, patch, missing test)
DOM.getContentQuads [Experimental] (bug 1543151, patch, missing test)
DOM.setFileInputFiles (no bug)
Emulation.setDeviceMetricsOverride (bug 1544417, patch, missing test)
Emulation.setTouchEmulationEnabled (mocked, do nothing)
Input.dispatchKeyEvent (bug 1543142, patch, missing test, will need followups)
Input.dispatchMouseEvent (bug 1543185, patch, missing test, may need followups)
Inspector.detached (not sure it is needed)
Log.enable (partial implementation)
Log.entryAdded (partial implementation)
1557849967292 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid host permission: resource://pdf.js/
1557849967292 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid host permission: about:reader*
Juggler listening on ws://127.0.0.1:38421
(/home/alex/gutenberg/node_modules/puppeteer-firefox/.local-browser/firefox-linux-2f959d575a3d61f5dda12e4e2dca1f46a92ab569/firefox/firefox:80886): dconf-WARNING **: 09:06:12.423: Unable to open /var/lib/snapd/desktop/dconf/profile/user: Permission denied
console.error: BroadcastService:
receivedBroadcastMessage: handler for
remote-settings/monitor_changes
threw error:
Message: Error: Polling for changes failed: NetworkError when attempting to fetch resource..
diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/debugger/custom.js b/testing/talos/talos/tests/devtools/addon/content/tests/debugger/custom.js
index 320ce3b1768f..e6a848404bc4 100644
--- a/testing/talos/talos/tests/devtools/addon/content/tests/debugger/custom.js
+++ b/testing/talos/talos/tests/devtools/addon/content/tests/debugger/custom.js
@@ -96,14 +96,33 @@ async function stepDebuggerAndLog(tab, toolbox, testFunction) {
}
}
+function screenshot(win) {
+ const canvas = win.document.createElementNS(
RemoteAgent
=> TabObserver()
emits:
- open => Targets.connect(tab.linkedBrowser)
- close => Targets.disconnect(tab.linkedBrowser)
=> HttpServer()
Handlers:
=> TargetListHandler(Targets)
=> ProtocolHandler(Targets)
=> VersionHandler(Targets)