https://github.com/web-platform-tests/wpt
Raw File
Tip revision: feeda08fb7c8a7c57afb1448d118942236ef6c94 authored by Coroiu Cristina on 26 November 2018, 20:19:20 UTC
Backed out changeset d32110a492f5 (bug 1383454) for did not disable the test
Tip revision: feeda08
storage-smoke-test.tentative.https.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Async local storage storage export smoke test</title>

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script type="module">
import { testVariousMethodsWithDefaultArea } from "./helpers/als-tests.js";
import { storage } from "std:async-local-storage";

test(() => {
  const { backingStore } = storage;
  assert_array_equals(Object.keys(backingStore), ["database", "store", "version"]);
  assert_own_property(backingStore, "database");
  assert_own_property(backingStore, "store");
  assert_own_property(backingStore, "version");
  assert_equals(Object.getPrototypeOf(backingStore), Object.prototype);

  assert_equals(backingStore.database, "async-local-storage:default");
  assert_equals(backingStore.store, "store");
  assert_equals(backingStore.version, 1);
}, "backingStore returns the correct object");

testVariousMethodsWithDefaultArea(
  "Storage methods smoke test with string key and value", "key", "value", assert_equals
);
</script>
back to top