Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /js/builtins/Object.prototype.hasOwnProperty-order.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Object.prototype.hasOwnProperty</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<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_exactly(test_error, function() {
({}).hasOwnProperty.call(that, { toString: function() { throw test_error; } });
});
});
});
});
</script>