summaryrefslogtreecommitdiffstats
path: root/gin/modules/module_registry_unittests.js
blob: ca7014899b314a293ab3c78659f8e19367abeb6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

define("module0", function() {
  return {
    "foo": "bar",
  }
});

define("module2", [
    "gtest",
    "module0",
    "module1"
  ], function(gtest, module0, module1) {
  gtest.expectEqual(module0.foo, "bar",
      "module0.foo is " + module0.foo);
  gtest.expectFalse(module0.bar,
      "module0.bar is " + module0.bar);
  gtest.expectEqual(module1.baz, "qux",
      "module1.baz is " + module1.baz);
  gtest.expectFalse(module1.qux,
      "module1.qux is " + module1.qux);

  this.result = "PASS";
});

define("module1", {
  "baz": "qux",
});