Closed Bug 669778 Opened 13 years ago Closed 13 years ago

test-content-proxy.testProxy tests fail on central branch's debug builds

Categories

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

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: ochameau)

References

()

Details

Attachments

(1 file)

On the central branch, test-content-proxy.testProxy fails four tests on Mac and Linux debug builds.

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1309985360.1309986121.22038.gz
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1309985436.1309986329.23753.gz
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1309986975.1309987834.30822.gz
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1309986254.1309986824.26015.gz

The failures look like this:

  error: TEST FAILED: test-content-proxy.testProxy (failure)
  error: fail: <object> is HTMLObjectElement ("[object HTMLObjectElement @ 0xc87e9e8 (native @ 0xc87e268)]" != "[object HTMLObjectElement]")
  info: Traceback (most recent call last):
    File "resource://testpkgs-api-utils-tests/test-content-proxy.js", line 126, in onDOMReady
      test.assertEqual(flash.toString(), "[object HTMLObjectElement]", "<object> is HTMLObjectElement");
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 198, in assertEqual
      this.fail(message);
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 116, in fail
      console.trace();
  error: fail: proxy.valueOf() returns the wrapped version ("[object Window @ 0xb068398 (native @ 0xd6c3b08)]" != "[object Window]")
  info: Traceback (most recent call last):
    File "resource://testpkgs-api-utils-tests/test-content-proxy.js", line 191, in onDOMReady
      test.assertEqual(wrapped.valueOf().toString(), "[object Window]", "proxy.valueOf() returns the wrapped version");
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 198, in assertEqual
      this.fail(message);
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 116, in fail
      console.trace();
  error: fail: proxy.valueOf({}) returns the wrapped version ("[object Window @ 0xb068398 (native @ 0xd6c3b08)]" != "[object Window]")
  info: Traceback (most recent call last):
    File "resource://testpkgs-api-utils-tests/test-content-proxy.js", line 192, in onDOMReady
      test.assertEqual(wrapped.valueOf({}).toString(), "[object Window]", "proxy.valueOf({}) returns the wrapped version");
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 198, in assertEqual
      this.fail(message);
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 116, in fail
      console.trace();
  error: fail: proxy.valueOf(UNWRAP_ACCESS_KEY) returns the unwrapped version ("[object XrayWrapper [object Window @ 0xb068398 (native @ 0xd6c3b08)]]" != "[object XrayWrapper [object Window]]")
  info: Traceback (most recent call last):
    File "resource://testpkgs-api-utils-tests/test-content-proxy.js", line 193, in onDOMReady
      test.assertEqual(wrapped.valueOf(proxy.UNWRAP_ACCESS_KEY).toString(), "[object XrayWrapper [object Window]]", "proxy.valueOf(UNWRAP_ACCESS_KEY) returns the unwrapped version");
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 198, in assertEqual
      this.fail(message);
    File "resource://testpkgs-api-utils-lib/unit-test.js", line 116, in fail
      console.trace();


Perhaps the Windows debug builds would also fail this way if there wasn't another problem causing those tests not to get run.

Alex: can you take a look at this?
Priority: -- → P1
Attached patch Fix itSplinter Review
Debug builds change toString() output by adding some reference address in it:
[object Window @ 0xb068398 (native @ 0xd6c3b08)]
instead of
[object Window]

So I'm not using RegExp instead of simple string matching toString output.
I wonder if some JS framework may broke because of this, as I've seen some of them rely on toString output too ...
Attachment #544620 - Flags: review+
Status: NEW → RESOLVED
Closed: 13 years ago
Priority: -- → P1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: