OLD | NEW |
1 /* | 1 /* |
2 Distributed under both the W3C Test Suite License [1] and the W3C | 2 Distributed under both the W3C Test Suite License [1] and the W3C |
3 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the | 3 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the |
4 policies and contribution forms [3]. | 4 policies and contribution forms [3]. |
5 | 5 |
6 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license | 6 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license |
7 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license | 7 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license |
8 [3] http://www.w3.org/2004/10/27-testcases | 8 [3] http://www.w3.org/2004/10/27-testcases |
9 */ | 9 */ |
10 | 10 |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 var obj, exception = null; | 1279 var obj, exception = null; |
1280 try | 1280 try |
1281 { | 1281 { |
1282 obj = eval(desc); | 1282 obj = eval(desc); |
1283 } | 1283 } |
1284 catch(e) | 1284 catch(e) |
1285 { | 1285 { |
1286 exception = e; | 1286 exception = e; |
1287 } | 1287 } |
1288 | 1288 |
1289 // TODO: WebIDLParser doesn't currently support named legacycallers, so I'm | 1289 var expected_typeof = |
1290 // not sure what those would look like in the AST | 1290 this.members.some(function(member) { return member.legacycaller; }) |
1291 var expected_typeof = this.members.some(function(member) | 1291 ? "function" |
1292 { | 1292 : "object"; |
1293 return member.legacycaller | |
1294 || ("idlType" in member && member.idlType.legacycaller) | |
1295 || ("idlType" in member && typeof member.idlType == "object" | |
1296 && "idlType" in member.idlType && member.idlType.idlType == "legacyc
aller"); | |
1297 }) ? "function" : "object"; | |
1298 | 1293 |
1299 this.test_primary_interface_of(desc, obj, exception, expected_typeof); | 1294 this.test_primary_interface_of(desc, obj, exception, expected_typeof); |
1300 var current_interface = this; | 1295 var current_interface = this; |
1301 while (current_interface) | 1296 while (current_interface) |
1302 { | 1297 { |
1303 if (!(current_interface.name in this.array.members)) | 1298 if (!(current_interface.name in this.array.members)) |
1304 { | 1299 { |
1305 throw "Interface " + current_interface.name + " not found (inherited
by " + this.name + ")"; | 1300 throw "Interface " + current_interface.name + " not found (inherited
by " + this.name + ")"; |
1306 } | 1301 } |
1307 if (current_interface.prevent_multiple_testing && current_interface.alre
ady_tested) | 1302 if (current_interface.prevent_multiple_testing && current_interface.alre
ady_tested) |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 /** An array of values produced by the "typedef" production. */ | 1692 /** An array of values produced by the "typedef" production. */ |
1698 this.values = obj.values; | 1693 this.values = obj.values; |
1699 | 1694 |
1700 } | 1695 } |
1701 //@} | 1696 //@} |
1702 | 1697 |
1703 IdlTypedef.prototype = Object.create(IdlObject.prototype); | 1698 IdlTypedef.prototype = Object.create(IdlObject.prototype); |
1704 | 1699 |
1705 }()); | 1700 }()); |
1706 // vim: set expandtab shiftwidth=4 tabstop=4 foldmarker=@{,@} foldmethod=marker: | 1701 // vim: set expandtab shiftwidth=4 tabstop=4 foldmarker=@{,@} foldmethod=marker: |
OLD | NEW |