<!DOCTYPE html>
<title>Late namespace request</title>

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
    window.log = [];

    const test_load = async_test(
        "Test the situation where a module is instantiated without the " +
        "need for a namespace object, but later on a different module " +
        "requests the namespace.");
    window.addEventListener("load", test_load.step_func_done(ev => {
      assert_array_equals(log,
          ["export-something",
           "import-something-namespace", 42, 43]);
    }));
</script>
<script type="module" src="export-something.js"></script>
<script type="module" src="import-something-namespace.js"></script>
