Update web-platform-tests to revision 74d709131e3c91d09f1708378648a01957c47b38

This commit is contained in:
WPT Sync Bot 2018-10-13 21:57:40 -04:00
parent e4657c1496
commit 81f079c722
77 changed files with 2043 additions and 524 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>