test_recursive_import.js 573 B

123456789101112131415161718
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. function run_test() {
  5. var scope = {};
  6. Components.utils.import("resource://test/recursive_importA.jsm", scope);
  7. // A imported correctly
  8. do_check_true(scope.foo() == "foo");
  9. // Symbols from B are visible through A
  10. do_check_true(scope.bar.baz() == "baz");
  11. // Symbols from A are visible through A, B, A.
  12. do_check_true(scope.bar.qux.foo() == "foo");
  13. }