dom/bindings/test/test_Object.prototype_props.html
author B2G Bumper Bot <release+b2gbumper@mozilla.com>
Fri, 27 Jun 2014 17:00:29 -0700
changeset 208544 135686e1d4f41d1df1b172238bc8a4f9d534d5d9
parent 205093 d628d406270c4cf8b428894be1c95d0301a947f5
child 264787 2cbe6a336b82be50f8ab4b5aaf7b3d38a21fd1f5
permissions -rw-r--r--
Bumping manifests a=b2g-bump

<!DOCTYPE html>
<meta charset=utf-8>
<title>Test for bug 987110</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
  var props = Object.getOwnPropertyNames(Object.prototype);
  // getOwnPropertyNames intentionally filters out the non-standard
  // "__proto__" property.
  props.push("__proto__");
  // If you change this list, make sure it continues to match the list in
  // Codegen.py's CGDictionary.getMemberDefinition method.
  var expected = [
      "constructor", "toSource", "toString", "toLocaleString", "valueOf",
      "watch", "unwatch", "hasOwnProperty", "isPrototypeOf",
      "propertyIsEnumerable", "__defineGetter__", "__defineSetter__",
      "__lookupGetter__", "__lookupSetter__", "__proto__"
    ];
  assert_array_equals(props.sort(), expected.sort());
}, "Own properties of Object.prototype");
</script>