archives

« Bugzilla Issues Index

#24 — S8.6.2_A5_T1.js is invalid (reassignment of a host object)


This test contains the following snippet:
screen = {touch:function(){count++}};

In IE9, Chrome 9, and possibly others; 'screen' is in fact a host object that isn't necessarily reassignable. For this test to be valid, it really needs to:
1. Use a different name other than 'screen'
2. First check that the name isn't already being used as a host object


Fixed at http://hg.ecmascript.org/tests/test262/rev/6ccb9aee8c4e

Fixed simply by renaming all occurrences of "screen" to "testScreen". Although the first message on this bug suggests testing if it already exists, and technically the test is not valid without it, this also applies to every other test that add a global variable, so I'm ignoring that requirement.