Bug: Intermittent browser_lastSeenActive.js | single tracking bug
Status: NEW
Priority: P5
Created: 2024-04-04 21:27:48+00:00
Resolved: 2025-03-03 06:37:11+00:00

**Filed by:** ctuns [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=453545841&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/OHfGVkf6TMCgii7A9hhZ3Q/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2024-04-04T19:58:25.946Z] 19:58:25     INFO - TEST-PASS | browser/base/content/test/tabs/browser_lastSeenActive.js | One window at the end of test cleanup - 
[task 2024-04-04T19:58:25.946Z] 19:58:25     INFO - cleanup, browser state restored
[task 2024-04-04T19:58:25.947Z] 19:58:25     INFO - Leaving test bound switchingTabs
[task 2024-04-04T19:58:25.947Z] 19:58:25     INFO - Entering test bound switchingWindows
[task 2024-04-04T19:58:25.948Z] 19:58:25     INFO - Restoring to the test browser state
[task 2024-04-04T19:58:25.948Z] 19:58:25     INFO - running 
[task 2024-04-04T19:58:25.949Z] 19:58:25     INFO - promiseBrowserState resolved
[task 2024-04-04T19:58:25.954Z] 19:58:25     INFO - BrowserWindowTracker.pendingWindows: 0
[task 2024-04-04T19:58:25.954Z] 19:58:25     INFO - All the pending windows are resolved
[task 2024-04-04T19:58:25.954Z] 19:58:25     INFO - Waiting for the firstBrowserLoaded in each of the windows
[task 2024-04-04T19:58:25.954Z] 19:58:25     INFO - Switch to win1 which isn't active/top after restoring session
[task 2024-04-04T19:58:25.954Z] 19:58:25     INFO - switchToWindow, waiting for promiseFocus
[task 2024-04-04T19:58:25.955Z] 19:58:25     INFO - switchToWindow, waiting for correct Services.focus.activeWindow
[task 2024-04-04T19:58:25.955Z] 19:58:25     INFO - Buffered messages finished
[task 2024-04-04T19:58:25.956Z] 19:58:25     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_lastSeenActive.js | Both windows are open with selected tab URLs in the expected order - ["data:,Window2-Tab0","data:,Window1-Tab0"] deepEqual ["data:,Window1-Tab0","data:,Window2-Tab0"] - {"filename":"chrome://mochitests/content/browser/browser/base/content/test/tabs/browser_lastSeenActive.js","name":"switchingWindows","sourceId":1224,"lineNumber":200,"columnNumber":10,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"handleTask","sourceId":552,"lineNumber":1139,"columnNumber":26,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"_runTaskBasedTest","sourceId":552,"lineNumber":1211,"columnNumber":18,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"Tester_execTest","sourceId":552,"lineNumber":1353,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"nextTest/<","sourceId":552,"lineNumber":1128,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js","name":"SimpleTest.waitForFocus/<","sourceId":580,"lineNumber":1058,"columnNumber":13,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":null,"formattedStack":"SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"nextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*Tester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*handleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"switchingWindows@chrome://mochitests/content/browser/browser/base/content/test/tabs/browser_lastSeenActive.js:200:10\nasync*handleTask@chrome://mochikit/content/browser-test.js:1139:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1353:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1128:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}}
[task 2024-04-04T19:58:25.956Z] 19:58:25     INFO - Stack trace:
[task 2024-04-04T19:58:25.959Z] 19:58:25     INFO - chrome://mochitests/content/browser/browser/base/content/test/tabs/browser_lastSeenActive.js:switchingWindows:200
[task 2024-04-04T19:58:25.959Z] 19:58:25     INFO - chrome://mochikit/content/browser-test.js:handleTask:1139
[task 2024-04-04T19:58:25.960Z] 19:58:25     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1211
[task 2024-04-04T19:58:25.960Z] 19:58:25     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1353
[task 2024-04-04T19:58:25.960Z] 19:58:25     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1128
[task 2024-04-04T19:58:25.960Z] 19:58:25     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-04-04T19:58:25.960Z] 19:58:25     INFO - Focusing the other window
[task 2024-04-04T19:58:25.961Z] 19:58:25     INFO - switchToWindow, waiting for promiseFocus
[task 2024-04-04T19:58:25.961Z] 19:58:25     INFO - GECKO(6364) | must wait for focus
[task 2024-04-04T19:58:25.961Z] 19:58:25     INFO - GECKO(6364) | 1712260705844	Marionette	TRACE	Received observer notification browser-delayed-startup-finished
[task 2024-04-04T19:58:25.961Z] 19:58:25     INFO - switchToWindow, waiting for correct Services.focus.activeWindow
[task 2024-04-04T19:58:25.969Z] 19:58:25     INFO - TEST-PASS | browser/base/content/test/tabs/browser_lastSeenActive.js | The foreground window selected tab is last seen more recently than it was before being focused - 1712260705962 > 1712260705554 - 
```