Write tests for nsIRemoteAgent interface
Categories
(Remote Protocol :: Agent, task, P1)
Tracking
(firefox73 fixed)
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
References
Details
(Whiteboard: [puppeteer-beta-mvp])
Attachments
(2 files)
It was pointed out in https://phabricator.services.mozilla.com/D55177
that we don’t have tests for nsIRemoteAgent
.
Because it is arguably such a key part of our infrastructure, we should have that.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
We probably want to write this test against the defaults, meaning remote.enabled
should only sparingly be overridden.
Assignee | ||
Comment 2•5 years ago
|
||
fail() will cause a test assertion failure equivalent to ok(false).
Assignee | ||
Comment 3•5 years ago
|
||
Adds browser-chrome tests for the main entry point of the remote
agent, nsIRemoteAgent.
add_agent_task() wraps add_plain_task() (which again wraps the
original add_task()) so we can ensure that the agent isn't listening
before a test runs, and that any modified state such as preferences
is reset afterwards.
The tests rely heavily on the assumption that nsIRemoteAgent.close()
behaves as a no-op when the server is not listening.
This patch is a follow-up to bug 1590828.
Comment 5•5 years ago
|
||
Backed out 2 changesets (bug 1600330) for failing at browser_agent.js on a CLOSED TREE.
Backout link: https://hg.mozilla.org/integration/autoland/rev/7a14672fc95d4881869efb191010e08bbbfdd4cf
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=279386970&resultStatus=testfailed%2Cbusted%2Cexception&revision=eef79aaf5378bc898ae68633abc59330f4a8bd1e
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=279386970&repo=autoland&lineNumber=1251
Log snippet:
[task 2019-12-03T18:34:37.763Z] 18:34:37 INFO - TEST-START | remote/test/browser/browser_agent.js
[task 2019-12-03T18:34:37.919Z] 18:34:37 INFO - TEST-INFO | started process screenshot
[task 2019-12-03T18:34:37.982Z] 18:34:37 INFO - TEST-INFO | screenshot: exit 0
[task 2019-12-03T18:34:37.982Z] 18:34:37 INFO - Buffered messages logged at 18:34:37
[task 2019-12-03T18:34:37.983Z] 18:34:37 INFO - Entering test bound
[task 2019-12-03T18:34:37.983Z] 18:34:37 INFO - TEST-PASS | remote/test/browser/browser_agent.js | Agent is not listening -
[task 2019-12-03T18:34:37.984Z] 18:34:37 INFO - TEST-PASS | remote/test/browser/browser_agent.js | Agent is listening -
[task 2019-12-03T18:34:37.984Z] 18:34:37 INFO - Leaving test bound
[task 2019-12-03T18:34:37.984Z] 18:34:37 INFO - Entering test bound
[task 2019-12-03T18:34:37.985Z] 18:34:37 INFO - TEST-PASS | remote/test/browser/browser_agent.js | remote-listening observer not notified -
[task 2019-12-03T18:34:37.985Z] 18:34:37 INFO - TEST-PASS | remote/test/browser/browser_agent.js | expected default port 49405, but got 49405 -
[task 2019-12-03T18:34:37.985Z] 18:34:37 INFO - Leaving test bound
[task 2019-12-03T18:34:37.985Z] 18:34:37 INFO - Entering test bound
[task 2019-12-03T18:34:37.986Z] 18:34:37 INFO - Buffered messages finished
[task 2019-12-03T18:34:37.986Z] 18:34:37 INFO - TEST-UNEXPECTED-FAIL | remote/test/browser/browser_agent.js | undefined assertion name - Got undefined, expected 2147746065
[task 2019-12-03T18:34:37.986Z] 18:34:37 INFO - Stack trace:
[task 2019-12-03T18:34:37.986Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:test_is:1314
[task 2019-12-03T18:34:37.986Z] 18:34:37 INFO - chrome://mochitests/content/browser/remote/test/browser/browser_agent.js:listenWhenDisabled:56
[task 2019-12-03T18:34:37.987Z] 18:34:37 INFO - chrome://mochitests/content/browser/remote/test/browser/browser_agent.js:add_agent_task/<:17
[task 2019-12-03T18:34:37.987Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1069
[task 2019-12-03T18:34:37.987Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1104
[task 2019-12-03T18:34:37.988Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:932
[task 2019-12-03T18:34:37.988Z] 18:34:37 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:805
[task 2019-12-03T18:34:37.988Z] 18:34:37 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - TEST-UNEXPECTED-FAIL | remote/test/browser/browser_agent.js | undefined assertion name - Got Remote agent is disabled by preference, expected Disabled by preference
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - Stack trace:
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:test_is:1314
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - chrome://mochitests/content/browser/remote/test/browser/browser_agent.js:listenWhenDisabled:57
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - chrome://mochitests/content/browser/remote/test/browser/browser_agent.js:add_agent_task/<:17
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1069
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1104
[task 2019-12-03T18:34:37.989Z] 18:34:37 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:932
Assignee | ||
Comment 6•5 years ago
|
||
test-verify errors due to patches landing in wrong order.
Comment 8•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•