Custom Metrics tab:
[timeToDOMContentFlushed]
return window.performance.timing.timeToDOMContentFlushed;
Script tab:
[conditioned-profile] back-to-basics Raptor unittests run with Tarek's patch from https://bugzilla.mozilla.org/attachment.cgi?id=9103867&action=edit | |
Steps reflected here: | |
1. clone fresh mozilla-unified tree | |
2. download and apply patch (hg import) from https://bugzilla.mozilla.org/attachment.cgi?id=9103867&action=edit | |
3. hg wip to show we're on tip | |
4. now, we remove the `mozilla.pth:testing/condprofile` line from the working tree | |
5. run Raptor unittests using --python 2 (./mach python-test -v --python 2 --subsuite raptor) | |
6. Raptor-unittests failures | |
7. our virtualenv is at /Users/sdonner/mozilla-source/mozilla-unified/obj-x86_64-apple-darwin18.7.0/_virtualenvs/mozilla-unified-evYUFdVP-2 for this run: |
Fennec (Firefox 64.0.2): https://archive.mozilla.org/pub/mobile/releases/64.0.2/android-api-16/en-US/fennec-64.0.2.en-US.android-arm.apk | |
RefBrow: https://index.taskcluster.net/v1/task/project.mobile.reference-browser.signed-nightly.nightly.2019.4.9.latest/artifacts/public/target.arm.apk | |
Fenix: https://index.taskcluster.net/v1/task/project.mobile.fenix.signed-nightly.nightly.2019.4.9.latest/artifacts/public/target.arm.apk | |
GVE: https://taskcluster-artifacts.net/dzV5pl0SRz6IvbIDR1TEIA/0/public/build/geckoview_example.apk |
stephendonner/moz_src/mozilla-unified on (git)-[master|rebase]- [=✘»!+?] on ☿ default is 📦 ⚠ via 𝗥 v1.32.0 via 🐍 system | |
➜ adb shell am start -n org.mozilla.firefox/org.mozilla.gecko.BrowserApp -a android.intent.action.VIEW -d 'data%3Atext%2Fhtml%2C%3Cbody%20style%3D%22background-color%3Ablack%22%3E' | |
Starting: Intent { act=android.intent.action.VIEW dat=data:text/html,<body style="background-color:black"> cmp=org.mozilla.firefox/org.mozilla.gecko.BrowserApp } | |
Warning: Activity not started, its current task has been brought to the front | |
stephendonner/moz_src/mozilla-unified on (git)-[master|rebase]- [=✘»!+?] on ☿ default is 📦 ⚠ via 𝗥 v1.32.0 via 🐍 system | |
➜ adb shell am start -n org.mozilla.firefox/org.mozilla.gecko.BrowserApp -a android.intent.action.VIEW -d https://www.wikihow.com/Set-Background-Color-in-HTML | |
Starting: Intent { act=android.intent.action.VIEW dat=https://www.wikihow.com/... cmp=org.mozilla.firefox/org.mozilla.gecko.BrowserApp } | |
Warning: Activity not started, its c |
Stephens-MacBook-Pro:mozilla-central stephendonner$ ./mach raptor-tests --print-tests | |
We're assuming the 'raptor-tests' command is 'raptor-test' and we're executing it for you. | |
Raptor Tests Available for Firefox Desktop | |
========================================== | |
raptor-assorted-dom | |
type: benchmark |
Stephens-MacBook-Pro:mozilla-source stephendonner$ cd mozilla-central | |
Stephens-MacBook-Pro:mozilla-central stephendonner$ ./mach raptor-test --test raptor-speedometer --app=geckoview --binary="org.mozilla.geckoview_example" | |
Error running mach: | |
['raptor-test', '--test', 'raptor-speedometer', '--app=geckoview', '--binary=org.mozilla.geckoview_example'] | |
The error occurred in code that was called by the mach command. This is either | |
a bug in the called code itself or in the way that mach is calling it. | |
You should consider filing a bug for this issue. |
from dataclasses import asdict, dataclass | |
import json | |
import os | |
import sys | |
from jsonschema import validate | |
# import requests | |
@dataclass |
Timing Specs Used (incl. which Level) | |
* Navigation Timing API | |
* Performance Navigation Timing API | |
** https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming | |
Metrics | |
* Using: | |
** fetchStart: | |
*** https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming/fetchStart |
import json | |
with open("/Users/dhunt/Desktop/wpt.json") as f: | |
data = json.load(f) | |
for test in data: | |
location = test["data"]["location"] | |
request_headers = test["data"]["runs"]["1"]["firstView"]["requests"][0]["headers"]["request"] | |
user_agent = next(filter(lambda x: x.startswith("User-Agent:"), request_headers)) | |
print(f"location: {location}") | |
print(f"- user-agent: {user_agent}") |
driver = webdriver.Firefox() | |
driver.get('https://pypi.org') | |
with driver.context('chrome'): | |
driver.find_element_by_css_selector('image#pageActionButton').click() | |
driver.find_element_by_css_selector('#pageAction-panel-screenshots').click() | |
with driver.context(driver.CONTEXT_CONTENT): | |
sleep(2) | |
onboarding = driver.find_element_by_id('firefox-screenshots-onboarding-iframe') | |
driver.switch_to.frame(onboarding) | |
driver.find_element_by_id('skip').click() |