summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/js/builtins/Object.prototype.hasOwnProperty-order.html
blob: e67cff612977076dc0c7fd596da73d7ff62eb544 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!doctype html>
<title>Object.prototype.hasOwnProperty</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=http://es5.github.com/#x15.4.4.5>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

<div id=log></div>
<script>
var test_error = { name: "test" };

test(function() {
  [null, undefined, {}].forEach(function(that) {
    test(function() {
      assert_throws(test_error, function() {
        ({}).hasOwnProperty.call(that, { toString: function() { throw test_error; } });
      });
    });
  });
});
</script>