Skip to content

Instantly share code, notes, and snippets.

% ./mach mochitest remote/test/browser
The mochitest command could not find any mochitests under the following
test path(s):
remote/test/browser
Please check spelling and make sure there are mochitests living there.
% ./mach wpt testing/web-platform/mozilla/tests/webdriver/take_full_screenshot/screenshot.py
0:00.01 INFO Creating config file /home/ato/src/gecko/obj-x86_64-pc-linux-gnu/_tests/web-platform/wptrunner.local.ini
0:00.01 INFO Creating directory /home/ato/src/gecko/obj-x86_64-pc-linux-gnu/_tests/web-platform/meta
0:00.01 INFO Creating directory /home/ato/src/gecko/obj-x86_64-pc-linux-gnu/_tests/web-platform/mozilla/meta
0:01.40 INFO Downloading manifest from https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.revision.d42c60ccf0d05a8b1e6098c1ab62d26e6edd2267.source.manifest-upload/artifacts/public/manifests.tar.gz
0:11.39 mozversion INFO application_buildid: 20190329133129
0:11.39 mozversion INFO application_display_name: Nightly
0:11.39 mozversion INFO application_id: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
0:11.39 mozversion INFO application_name: Firefox
0:11.39 mozversion INFO application_remotingname: firefox

Self-serving an ARM build

Mozilla [announced the intent] to deprecate ARMv7 HF builds of geckodriver in September 2018. This does not mean you can no longer use geckodriver on ARM systems, and this document explains how you can self-service a build for ARMv7 HF.

Assuming you have already checked out [central], the steps to cross-compile ARMv7 from a Linux host system is as follows:

extern crate serde; // 1.0.85
extern crate serde_json; // 1.0.37
use serde::{Deserialize, Serialize};
//use serde_json::{Map, Value};
//type Capabilities = Map<String, Value>;
trait DriverCapabilities {
fn browser_name() -> String;
% git bz apply 1516262
Bug 1516262 - Update base64 to 0.10
0001-Bug-1516262-Part-1-Update-base64-and-bump-webdriver-.patch
Apply? [yn] y
Applying: Bug 1516262 - Part 1: Update base64 and bump webdriver's version
0002-Bug-1516262-Part-2-Revendor-rust-dependencies.patch
Apply? [yn] y
% node demo.js
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
options {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
userTarget function
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/list"}
-> {"id":1,"method":"Log.enable","params":{}}
-> {"id":2,"method":"Page.enable","params":{}}
<- {"id":1}
<- {"method":"Page.frameAttached","params":{"frameId":"7F6AEC2D-4703-4B46-9608-863CCDEF2C4F"}}
<- {"method":"Page.frameNavigated","params":{"frame":{"id":"7F6AEC2D-4703-4B46-9608-863CCDEF2C4F","loaderId":null,"url":"https://sny.no/","securityOrigin":null,"mimeType":null}}}
% node remote.js
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
options {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
userTarget function
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/list"}
-> {"id":1,"method":"Page.enable","params":{}}
<- {"method":"Page.frameAttached","params":{"frameId":"919909A4-8D6D-4715-857C-6A646BA2110C"}}
<- {"method":"Page.frameNavigated","params":{"frame":{"id":"919909A4-8D6D-4715-857C-6A646BA2110C","loaderId":null,"url":"https://sny.no/","securityOrigin":null,"mimeType":null}}}
<- {"id":1}
-> {"id":2,"method":"Page.navigate","params":{"url":"https://github.com"}}
% node remote.js
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
options {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
userTarget function
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/list"}
-> {"id":1,"method":"Page.enable","params":{}}
<- {"id":1,"result":{}}
-> {"id":2,"method":"Page.navigate","params":{"url":"https://github.com"}}
<- {"eventName":"Page.frameAttached","params":{"frameId":"231A04C9-2B83-4294-9A1C-4C002C713B1B"}}
<- {"id":2,"result":{}}
% ping tristan.corp.lon2.mozilla.com
PING tristan.corp.lon2.mozilla.com (10.239.24.36): 56 data bytes
64 bytes from 10.239.24.36: icmp_seq=0 ttl=64 time=1.538 ms
64 bytes from 10.239.24.36: icmp_seq=1 ttl=64 time=3.307 ms
64 bytes from 10.239.24.36: icmp_seq=2 ttl=64 time=1.344 ms
64 bytes from 10.239.24.36: icmp_seq=3 ttl=64 time=1.444 ms
64 bytes from 10.239.24.36: icmp_seq=4 ttl=64 time=1.414 ms
64 bytes from 10.239.24.36: icmp_seq=5 ttl=64 time=1.497 ms
64 bytes from 10.239.24.36: icmp_seq=6 ttl=64 time=1.423 ms
64 bytes from 10.239.24.36: icmp_seq=7 ttl=64 time=3.046 ms
async function restoreWindow(window) {
let cb;
await new TimedPromise(resolve => {
cb = new DebounceCallback(resolve);
window.addEventListener("sizemodechange", cb);
window.fullScreen = false;
});
window.removeEventListener("sizemodechange", cb);
}