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