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

Unified Diff: chrome/test/data/extensions/api_test/messaging/connect/test.html

Issue 2754014: Merge 48667 - Prevent extensions from clobbering JSON implementation that ext... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
Patch Set: Created 10 years, 6 months 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
« no previous file with comments | « chrome/test/data/extensions/api_test/messaging/connect/page.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/messaging/connect/test.html
===================================================================
--- chrome/test/data/extensions/api_test/messaging/connect/test.html (revision 49570)
+++ chrome/test/data/extensions/api_test/messaging/connect/test.html (working copy)
@@ -1,4 +1,20 @@
<script>
+JSON.parse = function() {
+ return "JSON.parse clobbered by extension.";
+}
+
+JSON.stringify = function() {
+ return "JSON.stringify clobbered by extension.";
+}
+
+Array.prototype.toJSON = function() {
+ return "Array.prototype.toJSON clobbered by extension.";
+}
+
+Object.prototype.toJSON = function() {
+ return "Object.prototype.toJSON clobbered by extension.";
+}
+
// Keep track of the tab that we're running tests in, for simplicity.
var testTab = null;
« no previous file with comments | « chrome/test/data/extensions/api_test/messaging/connect/page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698