forked from mirrors/gecko-dev
Automatic update from web-platform-tests [IndexedDB] Cleanup WPT directory Some common/resource files were in the root directory. This moves them to the /resources/ directory and fixes up include paths. Bug: 1218100 Change-Id: If84f7d1670e9416c95eb0fd96de63add4dcacedf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3661378 Auto-Submit: Ari Chivukula <arichiv@chromium.org> Reviewed-by: Ayu Ishii <ayui@chromium.org> Commit-Queue: Ayu Ishii <ayui@chromium.org> Cr-Commit-Position: refs/heads/main@{#1006619} -- wpt-commits: 96ea2c2b7bf09644db195f0d878074615faef9e4 wpt-pr: 34171
29 lines
1.2 KiB
HTML
29 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<meta charset=utf-8>
|
|
<title>createObjectStore: Invalid optionalParameters</title>
|
|
<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=resources/support.js></script>
|
|
|
|
<script>
|
|
function invalid_optionalParameters(desc, params, exception = "InvalidAccessError") {
|
|
var t = async_test(document.title + " - " + desc);
|
|
|
|
createdb(t).onupgradeneeded = function(e) {
|
|
assert_throws_dom(exception, function() {
|
|
e.target.result.createObjectStore("store", params);
|
|
});
|
|
|
|
this.done();
|
|
};
|
|
}
|
|
|
|
invalid_optionalParameters("autoInc and empty keyPath", {autoIncrement: true, keyPath: ""});
|
|
invalid_optionalParameters("autoInc and keyPath array", {autoIncrement: true, keyPath: []}, "SyntaxError");
|
|
invalid_optionalParameters("autoInc and keyPath array 2", {autoIncrement: true, keyPath: ["hey"]});
|
|
invalid_optionalParameters("autoInc and keyPath object", {autoIncrement: true, keyPath: {a:"hey", b:2}}, "SyntaxError");
|
|
|
|
</script>
|
|
|
|
<div id=log></div>
|