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

Unified Diff: LayoutTests/webexposed/resources/global-interface-listing.js

Issue 1220793002: Make webexposed/global-interface-listing tests skip JS builtins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webexposed/resources/global-interface-listing.js
diff --git a/LayoutTests/webexposed/resources/global-interface-listing.js b/LayoutTests/webexposed/resources/global-interface-listing.js
index 69e101a632078f6c0e4ffcb144d81d7e9b3261c6..fb1d41a3cc83e3fb26bb18727a78ff8bf678ed07 100644
--- a/LayoutTests/webexposed/resources/global-interface-listing.js
+++ b/LayoutTests/webexposed/resources/global-interface-listing.js
@@ -24,7 +24,45 @@ if (self.importScripts) {
}
}
-function isConstructor(propertyName) {
+// List of builtin JS constructors; Blink is not controlling what properties these
+// objects have, so exercising them in a Blink test doesn't make sense.
+var jsBuiltins = new Set([
+ 'Array',
+ 'ArrayBuffer',
+ 'Boolean',
+ 'Date',
+ 'Error',
+ 'EvalError',
+ 'Float32Array',
+ 'Float64Array',
+ 'Function',
+ 'Int16Array',
+ 'Int32Array',
+ 'Int8Array',
+ 'Map',
+ 'Number',
+ 'Object',
+ 'Promise',
+ 'RangeError',
+ 'ReferenceError',
+ 'RegExp',
+ 'Set',
+ 'String',
+ 'Symbol',
+ 'SyntaxError',
+ 'TypeError',
+ 'Uint16Array',
+ 'Uint32Array',
+ 'Uint8Array',
+ 'Uint8ClampedArray',
+ 'URIError',
+ 'WeakMap',
+ 'WeakSet',
+]);
+
+function isWebIDLConstructor(propertyName) {
+ if (jsBuiltins.has(propertyName))
+ return false;
var descriptor = Object.getOwnPropertyDescriptor(this, propertyName);
if (descriptor.value == undefined || descriptor.value.prototype == undefined)
return false;
@@ -33,7 +71,7 @@ function isConstructor(propertyName) {
// FIXME: List interfaces with NoInterfaceObject specified in their IDL file.
debug('[INTERFACES]')
-var interfaceNames = Object.getOwnPropertyNames(this).filter(isConstructor);
+var interfaceNames = Object.getOwnPropertyNames(this).filter(isWebIDLConstructor);
interfaceNames.sort();
interfaceNames.forEach(function(interfaceName) {
debug('interface ' + interfaceName);
« no previous file with comments | « LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698