Skip to content

Instantly share code, notes, and snippets.

View juliandescottes's full-sized avatar

Julian Descottes juliandescottes

View GitHub Profile
CHROME=/Users/jdescottes/Development/hg/fx-team-artifact/objdir.noindex/dist/Nightly.app/Contents/MacOS/firefox DUMPIO=true node test/test.js
WARN: running tests with /Users/jdescottes/Development/hg/fx-team-artifact/objdir.noindex/dist/Nightly.app/Contents/MacOS/firefox
Testing on Node v11.8.0
Running 1 worker(s):
*** You are running in headless mode.
1562175601845 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1562175601845 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1562175601846 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1562175601846 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: a
// Content page script
window.value = "init-value";
document.querySelector("input").addEventListener("input", () => {
// Slow down the handler a bit
for (var i = 0 ; i < 1000; i++) {
console.log(i);
}
// Update the value that will be checked by the test
window.value = document.querySelector("input").value;
(async() => {
const browser = await startPuppeteerBrowser(process.argv);
console.log('Create page');
const page = await browser.newPage();
console.log('Go to https://rounded-haze.glitch.me/');
await page.goto('https://rounded-haze.glitch.me/');
console.log('Wait for 1 second');

Puppeteer API changes between 1.6.0 and 1.17.0

1.16.0

Added

Changed

diff --git a/devtools/client/framework/test/browser_toolbox_window_reload_target.js b/devtools/client/framework/test/browser_toolbox_window_reload_target.js
--- a/devtools/client/framework/test/browser_toolbox_window_reload_target.js
+++ b/devtools/client/framework/test/browser_toolbox_window_reload_target.js
@@ -60,16 +60,17 @@ add_task(async function() {
await testOneTool(toolbox, toolID);
}
info("Switch back to docked mode");
await toolbox.switchHost(Toolbox.HostType.BOTTOM);
diff --git a/devtools/shared/client/deprecated-thread-client.js b/devtools/shared/client/deprecated-thread-client.js
--- a/devtools/shared/client/deprecated-thread-client.js
+++ b/devtools/shared/client/deprecated-thread-client.js
@@ -28,16 +28,17 @@ loader.lazyRequireGetter(
*
* @param client DebuggerClient
* @param actor string
* The actor ID for this thread.
*/
function ThreadClient(client, actor) {
diff --git a/devtools/client/aboutdebugging-new/src/actions/debug-targets.js b/devtools/client/aboutdebugging-new/src/actions/debug-targets.js
--- a/devtools/client/aboutdebugging-new/src/actions/debug-targets.js
+++ b/devtools/client/aboutdebugging-new/src/actions/debug-targets.js
@@ -124,28 +124,25 @@ function installTemporaryExtension() {
await AddonManager.installTemporaryAddon(file);
dispatch({ type: TEMPORARY_EXTENSION_INSTALL_SUCCESS });
} catch (e) {
dispatch({ type: TEMPORARY_EXTENSION_INSTALL_FAILURE, error: e });
}
};
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Tests that preference helpers work properly with custom types of Float and Json.
const { PrefObserver } = require("devtools/client/shared/prefs");
// Use sinon for mocking.
const {sinon} = ChromeUtils.import("resource://testing-common/Sinon.jsm");
@juliandescottes
juliandescottes / run-find-dupes.shell
Created April 8, 2019 10:18
duplicates find dupes allowed-dupes.mn
RUN_FIND_DUPES=1 ./mach package
@juliandescottes
juliandescottes / run-find-dupes.shell
Created April 8, 2019 10:18
duplicates find dupes allowed-dupes.mn
RUN_FIND_DUPES=1 ./mach package