mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 874847 - Fix intermittent failure in browser_lastAccessedTab.js by including some fudge in the Date.now comparison. r=ttaubert
This commit is contained in:
parent
03ca5a1de6
commit
b1565a78e6
@ -17,7 +17,9 @@ function test() {
|
||||
gBrowser.selectedTab = newTab;
|
||||
let newTabAccessedDate = newTab.lastAccessed;
|
||||
ok(newTabAccessedDate > 0, "Timestamp on the selected tab is more than 0.");
|
||||
ok(newTabAccessedDate <= Date.now(), "Timestamp less than or equal current Date.");
|
||||
// Date.now is not guaranteed to be monotonic, so include one second of fudge.
|
||||
let now = Date.now() + 1000;
|
||||
ok(newTabAccessedDate <= now, "Timestamp less than or equal current Date: " + newTabAccessedDate + " <= " + now);
|
||||
gBrowser.selectedTab = originalTab;
|
||||
is(newTab.lastAccessed, newTabAccessedDate, "New tab's timestamp remains the same.");
|
||||
gBrowser.removeTab(newTab);
|
||||
|
Loading…
Reference in New Issue
Block a user