<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Object.freeze</title>
<link rel="author" title="Masaya Iseki" href="mailto:iseki.m.aa@gmail.com">
<link rel="help" href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.freeze">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(function() {
  [{}, []].forEach(function(that) {
    assert_false(Object.isFrozen(that));
    that.prop = 'exist';

    Object.freeze(that);
    assert_false(Object.isExtensible(that));
    assert_true(Object.isSealed(that));
    assert_true(Object.isFrozen(that));

    that.extension = 'This property should not be added';
    assert_equals(undefined, that.extension, 'Confirm to prevent adding property.');

    that.prop = 'changed';
    assert_equals('exist', that.prop,
          'Confirm to prevent changing a property value.');

    delete that.prop;
    assert_equals('exist', that.prop, 'Confirm to prevent deleting a property.');
  });
});
</script>

</body>
</html>
