mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 1306170 part 4. Fix idlharness to properly handle FrozenArray return types. r=bkelly
This commit is contained in:
parent
0de977d491
commit
83b7e32013
@ -2983,9 +2983,6 @@
|
||||
[Navigator interface: operation unregisterContentHandler(DOMString,USVString)]
|
||||
expected: FAIL
|
||||
|
||||
[Navigator interface: window.navigator must inherit property "languages" with the proper type (10)]
|
||||
expected: FAIL
|
||||
|
||||
[Navigator interface: window.navigator must inherit property "isProtocolHandlerRegistered" with the proper type (14)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -202,7 +202,7 @@ function doTest([untested, tested]) {
|
||||
AbstractWorker: [],
|
||||
Worker: [],
|
||||
SharedWorker: [],
|
||||
MessageEvent: [],
|
||||
MessageEvent: ['new MessageEvent("message", { data: 5 })'],
|
||||
MessageChannel: [],
|
||||
MessagePort: [],
|
||||
HTMLAppletElement: ['document.createElement("applet")'],
|
||||
|
@ -455,7 +455,7 @@ IdlArray.prototype.assert_type_is = function(value, type)
|
||||
// Nothing we can do.
|
||||
return;
|
||||
}
|
||||
this.assert_type_is(value[0], type.idlType.idlType);
|
||||
this.assert_type_is(value[0], type.idlType);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -467,6 +467,18 @@ IdlArray.prototype.assert_type_is = function(value, type)
|
||||
return;
|
||||
}
|
||||
|
||||
if (type.generic === "FrozenArray") {
|
||||
assert_true(Array.isArray(value), "Value should be array");
|
||||
assert_true(Object.isFrozen(value), "Value should be frozen");
|
||||
if (!value.length)
|
||||
{
|
||||
// Nothing we can do.
|
||||
return;
|
||||
}
|
||||
this.assert_type_is(value[0], type.idlType);
|
||||
return;
|
||||
}
|
||||
|
||||
type = type.idlType;
|
||||
|
||||
switch(type)
|
||||
|
Loading…
Reference in New Issue
Block a user