зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1523562 [wpt PR 14905] - Rename async local storage to KV storage, a=testonly
Automatic update from web-platform-tests
Rename async local storage to KV storage
Follows 7057d3dc66
.
This also removes .tentative from the web platform test filenames, as there exists a spec these days.
Binary-Size: needed to implement the feature. Enabling gzip is tracked in crbug.com/920264.
Change-Id: Ie34291da9cf0a25e6a70f2a97f27459ee6b58f13
Reviewed-on: https://chromium-review.googlesource.com/c/1407433
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623344}
--
wpt-commits: 6219c392c2c12b9536142e2edc665c2cb117670e
wpt-pr: 14905
--HG--
rename : testing/web-platform/tests/async-local-storage/helpers/class-assert.js => testing/web-platform/tests/kv-storage/helpers/class-assert.js
rename : testing/web-platform/tests/async-local-storage/helpers/equality-asserters.js => testing/web-platform/tests/kv-storage/helpers/equality-asserters.js
This commit is contained in:
Родитель
2a87be310f
Коммит
9df8c4f0e5
|
@ -1,3 +0,0 @@
|
||||||
spec: https://domenic.github.io/async-local-storage/
|
|
||||||
suggested_reviewers:
|
|
||||||
- domenic
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
spec: https://wicg.github.io/kv-storage/
|
||||||
|
suggested_reviewers:
|
||||||
|
- domenic
|
|
@ -1,14 +1,14 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Async local storage API surface</title>
|
<title>KV Storage: API surface</title>
|
||||||
|
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { storage, StorageArea } from "std:async-local-storage";
|
import { storage, StorageArea } from "std:kv-storage";
|
||||||
import * as classAssert from "./helpers/class-assert.js";
|
import * as classAssert from "./helpers/class-assert.js";
|
||||||
import { testWithArea } from "./helpers/als-tests.js";
|
import { testWithArea } from "./helpers/kvs-tests.js";
|
||||||
|
|
||||||
test(() => {
|
test(() => {
|
||||||
classAssert.isConstructor(StorageArea);
|
classAssert.isConstructor(StorageArea);
|
|
@ -1,4 +1,4 @@
|
||||||
import { StorageArea, storage as defaultArea } from "std:async-local-storage";
|
import { StorageArea, storage as defaultArea } from "std:kv-storage";
|
||||||
import { assertArrayCustomEquals } from "./equality-asserters.js";
|
import { assertArrayCustomEquals } from "./equality-asserters.js";
|
||||||
|
|
||||||
export function testWithArea(testFn, description) {
|
export function testWithArea(testFn, description) {
|
|
@ -1,12 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Async local storage: tests against various key types</title>
|
<title>KV Storage: tests against various key types</title>
|
||||||
|
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { testWithArea, testVariousMethods } from "./helpers/als-tests.js";
|
import { testWithArea, testVariousMethods } from "./helpers/kvs-tests.js";
|
||||||
import { assertEqualDates, assertEqualArrayBuffers, assertArrayBufferEqualsABView }
|
import { assertEqualDates, assertEqualArrayBuffers, assertArrayBufferEqualsABView }
|
||||||
from "./helpers/equality-asserters.js";
|
from "./helpers/equality-asserters.js";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Async local storage: should not work in non-secure contexts when included via import()</title>
|
<title>KV Storage: should not work in non-secure contexts when included via import()</title>
|
||||||
|
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
@ -13,6 +13,6 @@ test(() => {
|
||||||
}, "Prerequisite check");
|
}, "Prerequisite check");
|
||||||
|
|
||||||
promise_test(t => {
|
promise_test(t => {
|
||||||
return promise_rejects(t, "SecurityError", import("std:async-local-storage"));
|
return promise_rejects(t, "SecurityError", import("std:kv-storage"));
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Async local storage: should not work in non-secure contexts when included via an import statement</title>
|
<title>KV Storage: should not work in non-secure contexts when included via an import statement</title>
|
||||||
|
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
@ -23,5 +23,5 @@ async_test(t => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import "std:async-local-storage";
|
import "std:kv-storage";
|
||||||
</script>
|
</script>
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Async local storage: should not work in non-secure contexts when included via a script element</title>
|
<title>KV Storage: should not work in non-secure contexts when included via a script element</title>
|
||||||
|
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
@ -22,4 +22,4 @@ async_test(t => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="module" src="std:async-local-storage"></script>
|
<script type="module" src="std:kv-storage"></script>
|
|
@ -1,13 +1,13 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Async local storage storage export smoke test</title>
|
<title>KV storage: storage export smoke test</title>
|
||||||
|
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { testVariousMethodsWithDefaultArea } from "./helpers/als-tests.js";
|
import { testVariousMethodsWithDefaultArea } from "./helpers/kvs-tests.js";
|
||||||
import { storage } from "std:async-local-storage";
|
import { storage } from "std:kv-storage";
|
||||||
|
|
||||||
test(() => {
|
test(() => {
|
||||||
const { backingStore } = storage;
|
const { backingStore } = storage;
|
||||||
|
@ -17,7 +17,7 @@ test(() => {
|
||||||
assert_own_property(backingStore, "version");
|
assert_own_property(backingStore, "version");
|
||||||
assert_equals(Object.getPrototypeOf(backingStore), Object.prototype);
|
assert_equals(Object.getPrototypeOf(backingStore), Object.prototype);
|
||||||
|
|
||||||
assert_equals(backingStore.database, "async-local-storage:default");
|
assert_equals(backingStore.database, "kv-storage:default");
|
||||||
assert_equals(backingStore.store, "store");
|
assert_equals(backingStore.store, "store");
|
||||||
assert_equals(backingStore.version, 1);
|
assert_equals(backingStore.version, 1);
|
||||||
}, "backingStore returns the correct object");
|
}, "backingStore returns the correct object");
|
|
@ -1,14 +1,14 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Async local storage: undefined keys</title>
|
<title>KV Storage: undefined values</title>
|
||||||
<!-- https://github.com/domenic/async-local-storage/commit/5bf31109f37d1371f619ea33d0e2391f10e8b8f5 -->
|
<!-- https://github.com/wicg/kv-storage/commit/5bf31109f37d1371f619ea33d0e2391f10e8b8f5 -->
|
||||||
|
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { StorageArea } from "std:async-local-storage";
|
import { StorageArea } from "std:kv-storage";
|
||||||
import { testWithArea } from "./helpers/als-tests.js";
|
import { testWithArea } from "./helpers/kvs-tests.js";
|
||||||
|
|
||||||
testWithArea(async (area) => {
|
testWithArea(async (area) => {
|
||||||
assert_equals(await area.get("key"), undefined);
|
assert_equals(await area.get("key"), undefined);
|
Загрузка…
Ссылка в новой задаче