Revision 0d817ea379ebc6114a49b54c9456cfbb7ea95fc5 authored by Luna Lu on 13 March 2018, 17:34:49 UTC, committed by Philip Jägenstedt on 14 March 2018, 13:28:38 UTC
1. Without specifying allow attribute, frame policy inherits correctly.
2. With allow attribute, frame policy inherits from and overrides header policy
   correctly. Updating allowfullscreen and allowpaymentrequest correctly updates
   frame policy.
3. Frame policy is not affected by the frame's document policy.

Bug: 732003
Change-Id: Ib41f883a779f11c564c91cfc03ff1224330108f5
Reviewed-on: https://chromium-review.googlesource.com/850896
Commit-Queue: Luna Lu <loonybear@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542837}
1 parent 9cd6f7a
Raw File
idbobjectstore_deleted.htm
<!DOCTYPE html>
<meta charset=utf-8>
<title>Attempting to use deleted IDBObjectStore</title>
<link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#object-store">
<link rel=assert title="InvalidStateError Occurs if a request is made on a source object that has been deleted or removed.">
<link rel=author href="mailto:odinho@opera.com" title="Odin Hørthe Omdal">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=support.js></script>

<script>
    var db,
      add_success = false,
      t = async_test(document.title, {timeout: 10000})

    var open_rq = createdb(t);
    open_rq.onupgradeneeded = function(e) {
        db = e.target.result;

        var objStore = db.createObjectStore("store", { autoIncrement: true });
        assert_equals(db.objectStoreNames[0], "store", "objectStoreNames");

        var rq_add = objStore.add(1);
        rq_add.onsuccess = function() { add_success = true; };
        rq_add.onerror = fail(t, 'rq_add.error');

        objStore.createIndex("idx", "a");
        db.deleteObjectStore("store");
        assert_equals(db.objectStoreNames.length, 0, "objectStoreNames.length after delete");

        const exc = "InvalidStateError"
        assert_throws(exc, function() { objStore.add(2); });
        assert_throws(exc, function() { objStore.put(3); });
        assert_throws(exc, function() { objStore.get(1); });
        assert_throws(exc, function() { objStore.clear(); });
        assert_throws(exc, function() { objStore.count(); });
        assert_throws(exc, function() { objStore.delete(1); });
        assert_throws(exc, function() { objStore.openCursor(); });
        assert_throws(exc, function() { objStore.index("idx"); });
        assert_throws(exc, function() { objStore.deleteIndex("idx"); });
        assert_throws(exc, function() { objStore.createIndex("idx2", "a"); });
    }

    open_rq.onsuccess = function() {
        assert_true(add_success, "First add was successful");
        t.done();
    }
</script>

<div id=log></div>
back to top