summaryrefslogtreecommitdiff
path: root/tests/specs/run/unsafe_proto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/run/unsafe_proto')
-rw-r--r--tests/specs/run/unsafe_proto/__test__.jsonc5
-rw-r--r--tests/specs/run/unsafe_proto/unsafe_proto/main.js5
-rw-r--r--tests/specs/run/unsafe_proto/unsafe_proto/main.out2
-rw-r--r--tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out2
-rw-r--r--tests/specs/run/unsafe_proto/unsafe_proto/worker.js2
5 files changed, 16 insertions, 0 deletions
diff --git a/tests/specs/run/unsafe_proto/__test__.jsonc b/tests/specs/run/unsafe_proto/__test__.jsonc
new file mode 100644
index 000000000..d1c608b51
--- /dev/null
+++ b/tests/specs/run/unsafe_proto/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run -A unsafe_proto/main.js",
+ "output": "unsafe_proto/main.out",
+ "exitCode": 0
+}
diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main.js b/tests/specs/run/unsafe_proto/unsafe_proto/main.js
new file mode 100644
index 000000000..eb95c55a0
--- /dev/null
+++ b/tests/specs/run/unsafe_proto/unsafe_proto/main.js
@@ -0,0 +1,5 @@
+console.log(Object.hasOwn(Object.prototype, "__proto__"));
+
+new Worker(import.meta.resolve("./worker.js"), {
+ type: "module",
+});
diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main.out b/tests/specs/run/unsafe_proto/unsafe_proto/main.out
new file mode 100644
index 000000000..4b095fd0f
--- /dev/null
+++ b/tests/specs/run/unsafe_proto/unsafe_proto/main.out
@@ -0,0 +1,2 @@
+false
+false
diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out b/tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out
new file mode 100644
index 000000000..bb101b641
--- /dev/null
+++ b/tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out
@@ -0,0 +1,2 @@
+true
+true
diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/worker.js b/tests/specs/run/unsafe_proto/unsafe_proto/worker.js
new file mode 100644
index 000000000..b22bc8713
--- /dev/null
+++ b/tests/specs/run/unsafe_proto/unsafe_proto/worker.js
@@ -0,0 +1,2 @@
+console.log(Object.hasOwn(Object.prototype, "__proto__"));
+close();