Opened on 10/26/2016 at 03:13:29 PM

Closed on 12/05/2016 at 12:08:38 PM

#4575 closed defect (fixed)

[buildtools] Packager Edge tests fail due to OTF content type

Reported by: kzar Assignee: kvas
Priority: P3 Milestone:
Module: Automation Keywords:
Cc: kvas, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29360043/

Description

Environment

Debian stretch, Tox 2.4.1, Python 2.7.12+, buildtools 1e56a7549872

How to reproduce

  1. Run the tests: tox

Observed behaviour

The test_full_content_types_map() test fails since the otf type has the content type of application/font-sfnt instead of the expected application/x-font-otf.

Expected behaviour

The tests pass.

Attachments (0)

Change History (7)

comment:1 Changed on 10/26/2016 at 04:01:53 PM by kvas

Ok, so the mime type for otf that Python returns is somewhat platform dependent. It seems that there's not much consensus regarding what it should be. The most authoritative answer says application/font-sfnt but Microsoft and Facebook packagers just give it application/octet-stream.

Perhaps we should just override what Python gives us to be consistent between different Python environments and to be consistent with other Appx packagers. What do you think, Sebastian?

comment:2 Changed on 10/26/2016 at 04:16:07 PM by kvas

  • Owner set to kvas

comment:3 Changed on 10/27/2016 at 10:05:37 AM by sebastian

Assuming that Microsoft Edge will work fine with either mimetype, perhaps just make the test more tolerant here?

comment:4 Changed on 10/28/2016 at 10:09:24 AM by kvas

I'm actually thinking to just set it to application/octet-stream. This is simple to do, the result will be consistent regardless on which platform we run the build and also consistent with other packagers out there, and finally it's probably less code overall (between the packager and the test).

comment:5 Changed on 10/28/2016 at 10:40:44 AM by kvas

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:6 Changed on 12/05/2016 at 12:02:13 PM by abpbot

A commit referencing this issue has landed:
Fixes 4575 - Fix failing tests

comment:7 Changed on 12/05/2016 at 12:08:38 PM by kvas

  • Priority changed from Unknown to P3
  • Ready set
  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from kvas.
 
Note: See TracTickets for help on using tickets.