Bug 135890 - IndexedDB should respect SchemeRegistry's database access setting
Summary: IndexedDB should respect SchemeRegistry's database access setting
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Hock
Depends on:
Reported: 2014-08-13 11:18 PDT by Martin Hock
Modified: 2014-08-14 14:05 PDT (History)
6 users (show)

See Also:

patch (1.54 KB, patch)
2014-08-13 11:29 PDT, Martin Hock
ap: review+
Details | Formatted Diff | Diff
added test (3.80 KB, patch)
2014-08-14 11:18 PDT, Martin Hock
ap: review+
Details | Formatted Diff | Diff
cleaned up test (4.11 KB, patch)
2014-08-14 13:52 PDT, Martin Hock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Hock 2014-08-13 11:18:49 PDT
As with WebSQL, IndexedDB should respect SchemeRegistry's database access setting in private browsing mode.
Comment 1 Martin Hock 2014-08-13 11:29:13 PDT
Created attachment 236537 [details]
Comment 2 Martin Hock 2014-08-13 13:10:55 PDT
One of the mac-wk2 runs flaked on storage/indexeddb/mozilla/cursor-update-updates-indexes.html but mac-wk2 is running ML and this test is somewhat flaky there:

I'll run it a few more times locally.
Comment 3 Alexey Proskuryakov 2014-08-13 13:28:20 PDT
Comment on attachment 236537 [details]

Looks fine. I don't like the function name (isContextValid), but it wasn't particularly appropriate before this change either.

Please add a regression test ASAP (could be in a separate bug if this is urgent to land).
Comment 4 Martin Hock 2014-08-14 11:18:27 PDT
Created attachment 236604 [details]
added test
Comment 5 Alexey Proskuryakov 2014-08-14 12:44:09 PDT
Comment on attachment 236604 [details]
added test

View in context: https://bugs.webkit.org/attachment.cgi?id=236604&action=review

> LayoutTests/storage/indexeddb/private-browsing-affects-indexeddb.html:7
> +if (window.testRunner) {
> +    testRunner.dumpAsText();
> +}

You could have used js-test harness to get this and logging for free.

> LayoutTests/storage/indexeddb/private-browsing-affects-indexeddb.html:23
> +    if (!indexedDB.open('test1')) {
> +        log("Could not open test IndexedDB, exiting test.");
> +        return;
> +    }

I'm not sure if this is useful. We have all the other tests to verify that IndexedDB works, and dynamic changes to private browsing mode are not really meaningful.
Comment 6 Martin Hock 2014-08-14 13:52:29 PDT
Created attachment 236616 [details]
cleaned up test
Comment 7 Martin Hock 2014-08-14 14:05:08 PDT
Committed r172603: <http://trac.webkit.org/changeset/172603>