Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: third_party/WebKit/LayoutTests/security/immutable-prototype.js

Issue 2452073002: Freeze global prototype chain per WebIDL (Closed)
Patch Set: Test improvements Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/security/immutable-prototype.js
diff --git a/third_party/WebKit/LayoutTests/security/immutable-prototype.js b/third_party/WebKit/LayoutTests/security/immutable-prototype.js
new file mode 100644
index 0000000000000000000000000000000000000000..7af5e079fae3862d850a69a7e5da30ebd24918e3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/security/immutable-prototype.js
@@ -0,0 +1,16 @@
+function prototypeChain(global) {
+ let result = [];
+ while (global !== null) {
+ let thrown = false;
+ let next = global.__proto__;
+ try {
+ global.__proto__ = {};
+ result.push('mutable');
+ } catch (e) {
+ result.push('immutable');
+ }
+ global = next;
+ }
+ return result;
+}
+

Powered by Google App Engine
This is Rietveld 408576698