mirror of
https://github.com/servo/servo.git
synced 2025-08-22 22:05:32 +01:00
Update web-platform-tests to revision 74d709131e3c91d09f1708378648a01957c47b38
This commit is contained in:
parent
e4657c1496
commit
81f079c722
77 changed files with 2043 additions and 524 deletions
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>IdlInterface.prototype.get_interface_object()</title>
|
||||
<div id="log"></div>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
<script src="../../../idl-helper.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
test(function() {
|
||||
window.A = {};
|
||||
var i = interfaceFrom('interface A { };');
|
||||
assert_equals(i.get_interface_object(), window.A);
|
||||
}, 'Interface does not have LegacyNamespace.');
|
||||
|
||||
test(function() {
|
||||
window.Foo = { A: {} };
|
||||
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
|
||||
assert_equals(i.get_interface_object(), window.Foo.A);
|
||||
}, 'Interface has LegacyNamespace');
|
||||
</script>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>IdlInterface.prototype.get_interface_object_owner()</title>
|
||||
<div id="log"></div>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
<script src="../../../idl-helper.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
test(function() {
|
||||
var i = interfaceFrom('interface A { };');
|
||||
assert_equals(i.get_interface_object_owner(), window);
|
||||
}, 'Interface does not have LegacyNamespace.');
|
||||
|
||||
test(function() {
|
||||
window.Foo = {};
|
||||
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
|
||||
assert_equals(i.get_interface_object_owner(), window.Foo);
|
||||
}, 'Interface has LegacyNamespace');
|
||||
</script>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>IdlInterface.prototype.get_legacy_namespace()</title>
|
||||
<div id="log"></div>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
<script src="../../../idl-helper.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
test(function() {
|
||||
var i = interfaceFrom('interface A { };');
|
||||
assert_equals(i.get_legacy_namespace(), undefined);
|
||||
}, 'Interface does not have LegacyNamespace.');
|
||||
|
||||
test(function() {
|
||||
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
|
||||
assert_equals(i.get_legacy_namespace(), "Foo");
|
||||
}, 'Interface has LegacyNamespace');
|
||||
</script>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>IdlInterface.prototype.get_qualified_name()</title>
|
||||
<div id="log"></div>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
<script src="../../../idl-helper.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
test(function() {
|
||||
var i = interfaceFrom('interface A { };');
|
||||
assert_equals(i.get_qualified_name(), "A");
|
||||
}, 'Interface does not have LegacyNamespace.');
|
||||
|
||||
test(function() {
|
||||
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
|
||||
assert_equals(i.get_qualified_name(), "Foo.A");
|
||||
}, 'Interface has LegacyNamespace');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue