[System] 1 unit tests failure with the latest firefox builds

RESOLVED FIXED

Status

Firefox OS
Gaia::System
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: julienw, Assigned: julienw)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
I took the Linux build from ftp://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-linux64/1383714839/

This one comes from this tbpl build: https://tbpl.mozilla.org/?rev=9ba3faa35c96
This is not the first failing build.

Running the syste! unit tests when running the test-agent inside that Firefox build get me these issues:

  1) [system] ActionMenu "before all" hook:
     TypeError: setting a property that has only a getter
      at (anonymous) (http://system.gaiamobile.org:8080/test/unit/action_menu_test.js:46)
(Assignee)

Comment 1

4 years ago
This comes from the use of a global "screen" variable in the test. Unfortunately, such property exists in Window, see [1], and probably it was changed recently.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Window.screen
Assignee: nobody → felash
(Assignee)

Comment 2

4 years ago
Created attachment 827966 [details] [review]
github PR
Attachment #827966 - Flags: review?(alive)
Comment on attachment 827966 [details] [review]
github PR

I prefer to have screenElement instead of |screen| variable.
Attachment #827966 - Flags: review?(alive) → review+
(Assignee)

Updated

4 years ago
Blocks: 935408
(Assignee)

Comment 4

4 years ago
bug 932322 triggered this.
Blocks: 932322
Landed in:
https://github.com/mozilla-b2g/gaia/commit/c9dc3cb8b01d3d3118a2c9e5ada531799444c297
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
screen is a normal readonly property on a global object, so it's on the window object and not settable.
(Assignee)

Comment 7

4 years ago
Yep, the unit test was badly written.
You need to log in before you can comment on or make changes to this bug.