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

Unified Diff: LayoutTests/webexposed/resources/element-instance-property-listing.js

Issue 821303006: bindings: Fixes layouttests when moving attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed performance memory tests and addressed review comments. Created 5 years, 11 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
Index: LayoutTests/webexposed/resources/element-instance-property-listing.js
diff --git a/LayoutTests/webexposed/resources/element-instance-property-listing.js b/LayoutTests/webexposed/resources/element-instance-property-listing.js
index 90096373c6a8d180510535e9e7e58365676ab45b..03167a9e34ed4191361b3169c51e3d4e4856105a 100644
--- a/LayoutTests/webexposed/resources/element-instance-property-listing.js
+++ b/LayoutTests/webexposed/resources/element-instance-property-listing.js
@@ -13,36 +13,36 @@ function listElementProperties(type) {
debug('namespace ' + namespace);
var tags = internals[type + 'Tags']();
var tagProperties = {};
- var isCommonProperty = null; // Will be a map containing the intersection of properties across all elements as keys.
+ var commonProperties = null; // Will be a map containing the intersection of properties across all elements as keys.
tags.forEach(function(tag) {
var element = document.createElement(tag, namespace);
// We don't read out the property descriptors here to avoid the test timing out.
- var properties = Object.getOwnPropertyNames(element).sort();
+ var properties = getAllPropertyNames(element);
tagProperties[tag] = properties;
- if (isCommonProperty === null) {
- isCommonProperty = {};
+ if (commonProperties === null) {
+ commonProperties = {};
properties.forEach(function(property) {
- isCommonProperty[property] = true;
+ commonProperties[property] = true;
});
} else {
var hasProperty = {};
properties.forEach(function(property) {
hasProperty[property] = true;
});
- Object.getOwnPropertyNames(isCommonProperty).forEach(function(property) {
+ Object.getOwnPropertyNames(commonProperties).forEach(function(property) {
if (!hasProperty[property])
- delete isCommonProperty[property];
+ delete commonProperties[property];
});
}
});
debug(escapeHTML('<common>'));
- Object.getOwnPropertyNames(isCommonProperty).sort().forEach(function(property) {
+ Object.getOwnPropertyNames(commonProperties).sort().forEach(function(property) {
debug(' property ' + property);
});
tags.forEach(function(tag) {
debug(type + ' element ' + tag);
tagProperties[tag].forEach(function(property) {
- if (!isCommonProperty[property])
+ if (!(property in commonProperties))
debug(' property ' + property);
});
});
« no previous file with comments | « LayoutTests/webexposed/element-instance-property-listing-expected.txt ('k') | Source/core/inspector/InjectedScriptBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698