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

Unified Diff: chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js

Issue 971343003: Extension test: Do not clobber function name property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment Created 5 years, 10 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 | « no previous file | 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/externally_connectable/sites/assertions.js
diff --git a/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js b/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js
index b106b7635eafa572ef59f03e190f2d5b0780bab9..fb46498773f01c97d6fa864dcd7424d71e9274e4 100644
--- a/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js
+++ b/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js
@@ -25,16 +25,19 @@ function clobber(obj, name, qualifiedName) {
// Clobbering constructors would break everything.
// Clobbering toString is annoying.
// Clobbering __proto__ breaks in ways that grep can't find.
+ // Clobbering function name will break because
+ // SafeBuiltins does not support getters yet. See crbug.com/463526.
// Clobbering Function.call would make it impossible to implement these tests.
// Clobbering Object.valueOf breaks v8.
if (name == 'constructor' ||
name == 'toString' ||
name == '__proto__' ||
+ name == 'name' && typeof obj == 'function' ||
qualifiedName == 'Function.call' ||
qualifiedName == 'Object.valueOf') {
return;
}
- if (typeof(obj[name]) == 'function') {
+ if (typeof obj[name] == 'function') {
obj[name] = function() {
throw new Error('Clobbered ' + qualifiedName + ' function');
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698