Skip to content

Instantly share code, notes, and snippets.

@ochameau
ochameau / workers-thread-clients.js
Created December 11, 2018 16:17
get all page workers thread clients
// parent here is the toolbox target front
// so it depends on what toolbox you are running from
// if regular web toolbox, it will be BrowsingContextTargetFront()
// if worker toolbox, WorkerTargetFront()
// if old xul addon toolbox, AddonTargetFront()
// if webextension toolbox, WebExtensionTargetFront()
// if browser content toolbox, ContentProcessTargetFront()
// if browser toolbox, BrowsingContextTargetFront()
//
// As of today, this is *FRONTS* not a target object
FROM ubuntu
RUN apt-get update
RUN apt-get install -y maven openjdk-8-jdk
COPY . .
RUN mvn verify
CMD exec java -Xmx8m -Xms8m -jar words.jar
RemoteAgent
=> TabObserver()
emits:
- open => Targets.connect(tab.linkedBrowser)
- close => Targets.disconnect(tab.linkedBrowser)
=> HttpServer()
Handlers:
=> TargetListHandler(Targets)
=> ProtocolHandler(Targets)
=> VersionHandler(Targets)
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(
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..
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)
@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
@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 / fission.md
Last active May 20, 2020 14:10
Fission DevTools Gifs

A few gifs about Fission support in DevTools

@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.