mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 957952 - Add some logging to browser_net_timing-division.js, r=dcamp
This commit is contained in:
parent
442a09ccdc
commit
a13ca31bd1
@ -15,11 +15,38 @@ function test() {
|
||||
RequestsMenu.lazyUpdate = false;
|
||||
|
||||
waitForNetworkEvents(aMonitor, 2).then(() => {
|
||||
let divisions = $all(".requests-menu-timings-division[division-scale=second]");
|
||||
let millisecondDivs = $all(".requests-menu-timings-division[division-scale=millisecond]");
|
||||
let secondDivs = $all(".requests-menu-timings-division[division-scale=second]");
|
||||
let minuteDivs = $all(".requests-menu-timings-division[division-scale=minute]");
|
||||
|
||||
ok(divisions.length,
|
||||
info("Number of millisecond divisions: " + millisecondDivs.length);
|
||||
info("Number of second divisions: " + secondDivs.length);
|
||||
info("Number of minute divisions: " + minuteDivs.length);
|
||||
|
||||
for (let div of millisecondDivs) {
|
||||
info("Millisecond division: " + div.getAttribute("value"));
|
||||
}
|
||||
for (let div of secondDivs) {
|
||||
info("Second division: " + div.getAttribute("value"));
|
||||
}
|
||||
for (let div of minuteDivs) {
|
||||
info("Minute division: " + div.getAttribute("value"));
|
||||
}
|
||||
|
||||
is(RequestsMenu.itemCount, 2,
|
||||
"There should be only two requests made.");
|
||||
|
||||
let firstRequest = RequestsMenu.getItemAtIndex(0);
|
||||
let lastRequest = RequestsMenu.getItemAtIndex(1);
|
||||
|
||||
info("First request happened at: " +
|
||||
firstRequest.attachment.responseHeaders.headers.find(e => e.name == "Date").value);
|
||||
info("Last request happened at: " +
|
||||
lastRequest.attachment.responseHeaders.headers.find(e => e.name == "Date").value);
|
||||
|
||||
ok(secondDivs.length,
|
||||
"There should be at least one division on the seconds time scale.");
|
||||
ok(divisions[0].getAttribute("value").match(/\d+\.\d{2}\s\w+/),
|
||||
ok(secondDivs[0].getAttribute("value").match(/\d+\.\d{2}\s\w+/),
|
||||
"The division on the seconds time scale looks legit.");
|
||||
|
||||
teardown(aMonitor).then(finish);
|
||||
|
Loading…
Reference in New Issue
Block a user