Closed Bug 603911 Opened 14 years ago Closed 14 years ago

"test-es5.test:getOwnPropertyDescriptor value(configurable,enumerable)" fails

Categories

(Add-on SDK Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: irakli)

Details

Attachments

(1 file)

On trunk nightly builds, "test-es5.test:getOwnPropertyDescriptor value(configurable,enumerable)" fails "should ignore assignment to a non writable properties (false != true)":

error: TEST FAILED: test-es5.test:getOwnPropertyDescriptor value(configurable,enumerable) (failure)
error: fail: should ignore assignment to a non writable properties (false != true)
info: Traceback (most recent call last):
  File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
    this._callback.apply(null, this._params);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in anonymous
    timer.setTimeout(function() { onDone(self); }, 0);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
    self.start({test: test, onDone: runNextTest});
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
    this.test.testFunction(this);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
    test(runner);
  File "resource://jetpack-core-jetpack-core-tests/test-es5.js", line 316, in anonymous
    'should ignore assignment to a non writable properties'
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 227, in assertEqual
    this.fail(message);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 145, in fail
    console.trace();


Following that failure are two more due to "TypeError: object.non_writable is read-only", which seems related:

error: An exception occurred.
Traceback (most recent call last):
  File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
    this._callback.apply(null, this._params);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in 
    timer.setTimeout(function() { onDone(self); }, 0);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
    self.start({test: test, onDone: runNextTest});
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
    this.test.testFunction(this);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
    test(runner);
  File "resource://jetpack-core-jetpack-core-tests/test-es5.js", line 370, in 
    object.non_writable = 'override'
TypeError: object.non_writable is read-only
........error: An exception occurred.
Traceback (most recent call last):
  File "resource://jetpack-core-jetpack-core-lib/timer.js", line 64, in notifyOnTimeout
    this._callback.apply(null, this._params);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 255, in 
    timer.setTimeout(function() { onDone(self); }, 0);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 280, in runNextTest
    self.start({test: test, onDone: runNextTest});
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 298, in start
    this.test.testFunction(this);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 63, in runTest
    test(runner);
  File "resource://jetpack-core-jetpack-core-tests/test-es5.js", line 417, in 
    object.non_writable = 'override';
TypeError: object.non_writable is read-only


Irakli: any thoughts on what might be going on here?
So in original implementation I was throwing TypeError on assignment to read-only properties as es5 specs was defining that. But then Firefox was ignoring that and it was causing test failures. I thought I misunderstood spec and I changed implementation to match that behavior. Apparently original implementation was correct and TypeError must be thrown. I fixed the implementation and also changed tests so that only custom implementation is tested now.
Attached patch v1Splinter Review
Assignee: nobody → rFobic
Attachment #482848 - Flags: review?(myk)
Attachment #482848 - Attachment mime type: application/octet-stream → text/plain
Attachment #482848 - Attachment is patch: true
Attachment #482848 - Flags: review?(myk) → review+
Fixed by: 486912ed501e
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: