summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/webstorage
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-10-27 11:10:27 +1100
committerGitHub <noreply@github.com>2021-10-27 11:10:27 +1100
commit1c739470b590ea13dc0aa67c0ecc7ea6f49b5746 (patch)
treea7e6cb862cde74cc7861bc7124c540e62fa951b0 /cli/tests/testdata/webstorage
parent6268703487da02d66552d1e1a42858aa273def90 (diff)
feat(ext/webstorage): use implied origin when --location not set (#12548)
Closes #11882 BREAKING CHANGE: Previously when `--location` was set, the unique storage key was derived from the the URL of the location instead of just the origin. This change correctly uses just the origin. This may cause previously persisted storage to change its key and data to not be available with the same location as before.
Diffstat (limited to 'cli/tests/testdata/webstorage')
-rw-r--r--cli/tests/testdata/webstorage/config_a.jsonc3
-rw-r--r--cli/tests/testdata/webstorage/config_b.jsonc3
-rw-r--r--cli/tests/testdata/webstorage/fixture.ts2
-rw-r--r--cli/tests/testdata/webstorage/logger.ts1
-rw-r--r--cli/tests/testdata/webstorage/serialization.ts4
-rw-r--r--cli/tests/testdata/webstorage/serialization.ts.out3
-rw-r--r--cli/tests/testdata/webstorage/setter.ts1
7 files changed, 17 insertions, 0 deletions
diff --git a/cli/tests/testdata/webstorage/config_a.jsonc b/cli/tests/testdata/webstorage/config_a.jsonc
new file mode 100644
index 000000000..875cb6001
--- /dev/null
+++ b/cli/tests/testdata/webstorage/config_a.jsonc
@@ -0,0 +1,3 @@
+{
+ "compilerOptions": {}
+}
diff --git a/cli/tests/testdata/webstorage/config_b.jsonc b/cli/tests/testdata/webstorage/config_b.jsonc
new file mode 100644
index 000000000..875cb6001
--- /dev/null
+++ b/cli/tests/testdata/webstorage/config_b.jsonc
@@ -0,0 +1,3 @@
+{
+ "compilerOptions": {}
+}
diff --git a/cli/tests/testdata/webstorage/fixture.ts b/cli/tests/testdata/webstorage/fixture.ts
new file mode 100644
index 000000000..cf4bd9f1f
--- /dev/null
+++ b/cli/tests/testdata/webstorage/fixture.ts
@@ -0,0 +1,2 @@
+import "./logger.ts";
+import "./setter.ts";
diff --git a/cli/tests/testdata/webstorage/logger.ts b/cli/tests/testdata/webstorage/logger.ts
new file mode 100644
index 000000000..3898c4445
--- /dev/null
+++ b/cli/tests/testdata/webstorage/logger.ts
@@ -0,0 +1 @@
+console.log(window.localStorage);
diff --git a/cli/tests/testdata/webstorage/serialization.ts b/cli/tests/testdata/webstorage/serialization.ts
new file mode 100644
index 000000000..f3791d355
--- /dev/null
+++ b/cli/tests/testdata/webstorage/serialization.ts
@@ -0,0 +1,4 @@
+window.sessionStorage.setItem("hello", "deno");
+
+console.log(window.localStorage);
+console.log(window.sessionStorage);
diff --git a/cli/tests/testdata/webstorage/serialization.ts.out b/cli/tests/testdata/webstorage/serialization.ts.out
new file mode 100644
index 000000000..fea76aa43
--- /dev/null
+++ b/cli/tests/testdata/webstorage/serialization.ts.out
@@ -0,0 +1,3 @@
+[WILDCARD]
+Storage {[WILDCARD]
+Storage { length: 1, hello: "deno" }
diff --git a/cli/tests/testdata/webstorage/setter.ts b/cli/tests/testdata/webstorage/setter.ts
new file mode 100644
index 000000000..ec6d474f5
--- /dev/null
+++ b/cli/tests/testdata/webstorage/setter.ts
@@ -0,0 +1 @@
+window.localStorage.setItem("hello", "deno");