Closed Bug 1575169 Opened 5 years ago Closed 5 years ago

Investigate External img request causes mochitest to EXIT

Categories

(DevTools :: Application Panel, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ogasidlo, Assigned: ladybenko)

References

(Blocks 1 open bug)

Details

(Whiteboard: [manifest-reserve])

We display the icon(s) defined in the manifest in ManifestItemIcon:

td( {
  className:
   "manifest-view__col-value manifest-view__col-icon--show",   
},
  img({
    src: icon.src,
    alt: "icon",
    className: "manifest-table__col-icon",
  })
)

With an external URL (e.g.: https://design.firefox.com/icons/icons/desktop/default-browser-16.svg) , the mochitests exit with following error:

Unexpected Results
------------------
 0:04.48 INFO Selecting application page: service-workers
 0:04.50 INFO Wait until the service worker appears in the application panel
 0:04.50 INFO Wait until the debug button is displayed and enabled
 0:04.50 INFO Click on the debug button and wait for the new toolbox to be ready
 0:04.51 GECKO(36653) FATAL ERROR: Non-local network connections are disabled and a connection attempt to design.firefox.com (2a05:d014:275:cb00:6533:f2f4:82c4:9d8a) was made.
 0:04.51 GECKO(36653) You should only access hostnames available via the test networking proxy (if running mochitests) or from a test-specific httpd.js server (if running xpcshell tests). Browser services should be disabled or redirected to a local server.
 0:04.66 GECKO(36653) Exiting due to channel error.
[...]
ERROR TEST-UNEXPECTED-FAIL | devtools/client/application/test/browser/browser_application_panel_debug-service-worker.js | application terminated with exit code 1

As we will display images in the future, we need to investigate why it happens and how to solve it.

Whiteboard: triage → [triage]
Summary: External img request causes mochitest to EXIT → Investigate External img request causes mochitest to EXIT
Whiteboard: [triage]
Assignee: nobody → balbeza
Status: NEW → ASSIGNED
Priority: P3 → P1

I've looked into this while implementing https://bugzilla.mozilla.org/show_bug.cgi?id=1577446

  • We don't need to load an external image for implementing this test - we just need to check than an image is being displayed with the proper src attribute.
  • If we add an image with the rest of the test resources (in devtools/client/application/test/browser/resources/) and then list it at browser.ini , we can get the image at an absolute URL http://example.com/browser/devtools/client/application/test/browser/resources/<path>, which we can use as src in the manifest data.
  • Note that we cannot use a relative path in the manifest data, since in this case the manifest processor from platform fails at parsing the URL.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Whiteboard: [manifest-reserve]
You need to log in before you can comment on or make changes to this bug.