Skip to content
Permalink
Browse files
2010-07-22 Kent Hansen <kent.hansen@nokia.com>
        Reviewed by Sam Weinig.

        Improve coverage of fast/dom/prototype-inheritance test
        https://bugs.webkit.org/show_bug.cgi?id=42354

        Use Object.getOwnPropertyNames rather than for..in to enumerate
        the window object's properties, so that non-enumerable (ECMA)
        properties are covered as well.

        * fast/dom/prototype-inheritance-expected.txt:
        * fast/dom/script-tests/prototype-inheritance.js:
        (propertiesOnObject):
        * platform/chromium-mac/fast/dom/prototype-inheritance-expected.txt:
        * platform/chromium-win/fast/dom/prototype-inheritance-expected.txt:
        * platform/chromium/fast/dom/prototype-inheritance-expected.txt:
        * platform/gtk/fast/dom/prototype-inheritance-expected.txt:
        * platform/qt/fast/dom/prototype-inheritance-expected.txt:
        * platform/win/fast/dom/prototype-inheritance-expected.txt:

Canonical link: https://commits.webkit.org/54717@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Kent Hansen committed Jul 22, 2010
1 parent 9989512 commit e7a9c4cb21840c1dfd7e9260b0c47b66c1a28923
@@ -1,3 +1,24 @@
2010-07-22 Kent Hansen <kent.hansen@nokia.com>

Reviewed by Sam Weinig.

Improve coverage of fast/dom/prototype-inheritance test
https://bugs.webkit.org/show_bug.cgi?id=42354

Use Object.getOwnPropertyNames rather than for..in to enumerate
the window object's properties, so that non-enumerable (ECMA)
properties are covered as well.

* fast/dom/prototype-inheritance-expected.txt:
* fast/dom/script-tests/prototype-inheritance.js:
(propertiesOnObject):
* platform/chromium-mac/fast/dom/prototype-inheritance-expected.txt:
* platform/chromium-win/fast/dom/prototype-inheritance-expected.txt:
* platform/chromium/fast/dom/prototype-inheritance-expected.txt:
* platform/gtk/fast/dom/prototype-inheritance-expected.txt:
* platform/qt/fast/dom/prototype-inheritance-expected.txt:
* platform/win/fast/dom/prototype-inheritance-expected.txt:

2010-07-21 Darin Adler <darin@apple.com>

Reviewed by Sam Weinig.
@@ -3,6 +3,8 @@ Make sure prototypes are set up using the window a property came from, instead o
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS inner.Array.isInner is true
PASS inner.Array.constructor.isInner is true
PASS inner.Attr.isInner is true
PASS inner.Attr.constructor.isInner is true
PASS inner.Audio.isInner is true
@@ -13,6 +15,8 @@ PASS inner.Blob.isInner is true
PASS inner.Blob.constructor.isInner is true
PASS inner.BlobBuilder.isInner is true
PASS inner.BlobBuilder.constructor.isInner is true
PASS inner.Boolean.isInner is true
PASS inner.Boolean.constructor.isInner is true
PASS inner.CDATASection.isInner is true
PASS inner.CDATASection.constructor.isInner is true
PASS inner.CSSCharsetRule.isInner is true
@@ -73,6 +77,8 @@ PASS inner.DOMStringList.isInner is true
PASS inner.DOMStringList.constructor.isInner is true
PASS inner.DOMStringMap.isInner is true
PASS inner.DOMStringMap.constructor.isInner is true
PASS inner.Date.isInner is true
PASS inner.Date.constructor.isInner is true
PASS inner.Document.isInner is true
PASS inner.Document.constructor.isInner is true
PASS inner.DocumentFragment.isInner is true
@@ -85,6 +91,8 @@ PASS inner.Entity.isInner is true
PASS inner.Entity.constructor.isInner is true
PASS inner.EntityReference.isInner is true
PASS inner.EntityReference.constructor.isInner is true
PASS inner.Error.isInner is true
PASS inner.Error.constructor.isInner is true
PASS inner.EvalError.isInner is true
PASS inner.EvalError.constructor.isInner is true
PASS inner.Event.isInner is true
@@ -99,6 +107,8 @@ PASS inner.FileList.isInner is true
PASS inner.FileList.constructor.isInner is true
PASS inner.FormData.isInner is true
PASS inner.FormData.constructor.isInner is true
PASS inner.Function.isInner is true
PASS inner.Function.constructor.isInner is true
PASS inner.HTMLAllCollection.isInner is true
PASS inner.HTMLAllCollection.constructor.isInner is true
PASS inner.HTMLAnchorElement.isInner is true
@@ -233,8 +243,14 @@ PASS inner.Image.isInner is true
PASS inner.Image.constructor.isInner is true
PASS inner.ImageData.isInner is true
PASS inner.ImageData.constructor.isInner is true
FAIL inner.Infinity.isInner should be true. Was false.
FAIL inner.Infinity.constructor.isInner should be true. Was false.
PASS inner.JSON.isInner is true
PASS inner.JSON.constructor.isInner is true
PASS inner.KeyboardEvent.isInner is true
PASS inner.KeyboardEvent.constructor.isInner is true
PASS inner.Math.isInner is true
PASS inner.Math.constructor.isInner is true
PASS inner.MediaError.isInner is true
PASS inner.MediaError.constructor.isInner is true
PASS inner.MediaList.isInner is true
@@ -253,6 +269,8 @@ PASS inner.MouseEvent.isInner is true
PASS inner.MouseEvent.constructor.isInner is true
PASS inner.MutationEvent.isInner is true
PASS inner.MutationEvent.constructor.isInner is true
FAIL inner.NaN.isInner should be true. Was false.
FAIL inner.NaN.constructor.isInner should be true. Was false.
PASS inner.NamedNodeMap.isInner is true
PASS inner.NamedNodeMap.constructor.isInner is true
PASS inner.Node.isInner is true
@@ -263,6 +281,10 @@ PASS inner.NodeList.isInner is true
PASS inner.NodeList.constructor.isInner is true
PASS inner.Notation.isInner is true
PASS inner.Notation.constructor.isInner is true
PASS inner.Number.isInner is true
PASS inner.Number.constructor.isInner is true
PASS inner.Object.isInner is true
PASS inner.Object.constructor.isInner is true
PASS inner.Option.isInner is true
PASS inner.Option.constructor.isInner is true
PASS inner.OverflowEvent.isInner is true
@@ -289,6 +311,8 @@ PASS inner.Rect.isInner is true
PASS inner.Rect.constructor.isInner is true
PASS inner.ReferenceError.isInner is true
PASS inner.ReferenceError.constructor.isInner is true
PASS inner.RegExp.isInner is true
PASS inner.RegExp.constructor.isInner is true
PASS inner.SQLException.isInner is true
PASS inner.SQLException.constructor.isInner is true
PASS inner.SVGAElement.isInner is true
@@ -565,6 +589,8 @@ PASS inner.Storage.isInner is true
PASS inner.Storage.constructor.isInner is true
PASS inner.StorageEvent.isInner is true
PASS inner.StorageEvent.constructor.isInner is true
PASS inner.String.isInner is true
PASS inner.String.constructor.isInner is true
PASS inner.StyleSheet.isInner is true
PASS inner.StyleSheet.constructor.isInner is true
PASS inner.StyleSheetList.isInner is true
@@ -651,6 +677,10 @@ PASS inner.confirm.isInner is true
PASS inner.confirm.constructor.isInner is true
PASS inner.console.isInner is true
PASS inner.console.constructor.isInner is true
PASS inner.decodeURI.isInner is true
PASS inner.decodeURI.constructor.isInner is true
PASS inner.decodeURIComponent.isInner is true
PASS inner.decodeURIComponent.constructor.isInner is true
FAIL inner.defaultStatus.isInner should be true. Was false.
FAIL inner.defaultStatus.constructor.isInner should be true. Was false.
FAIL inner.defaultstatus.isInner should be true. Was false.
@@ -661,6 +691,14 @@ PASS inner.dispatchEvent.isInner is true
PASS inner.dispatchEvent.constructor.isInner is true
PASS inner.document.isInner is true
PASS inner.document.constructor.isInner is true
PASS inner.encodeURI.isInner is true
PASS inner.encodeURI.constructor.isInner is true
PASS inner.encodeURIComponent.isInner is true
PASS inner.encodeURIComponent.constructor.isInner is true
PASS inner.escape.isInner is true
PASS inner.escape.constructor.isInner is true
PASS inner.eval.isInner is true
PASS inner.eval.constructor.isInner is true
PASS inner.find.isInner is true
PASS inner.find.constructor.isInner is true
PASS inner.focus.isInner is true
@@ -681,8 +719,12 @@ FAIL inner.innerHeight.isInner should be true. Was false.
FAIL inner.innerHeight.constructor.isInner should be true. Was false.
FAIL inner.innerWidth.isInner should be true. Was false.
FAIL inner.innerWidth.constructor.isInner should be true. Was false.
PASS inner.isFinite.isInner is true
PASS inner.isFinite.constructor.isInner is true
FAIL inner.isInner.isInner should be true. Was false.
FAIL inner.isInner.constructor.isInner should be true. Was false.
PASS inner.isNaN.isInner is true
PASS inner.isNaN.constructor.isInner is true
FAIL inner.length.isInner should be true. Was false.
FAIL inner.length.constructor.isInner should be true. Was false.
PASS inner.localStorage.isInner is true
@@ -715,6 +757,10 @@ FAIL inner.pageXOffset.isInner should be true. Was false.
FAIL inner.pageXOffset.constructor.isInner should be true. Was false.
FAIL inner.pageYOffset.isInner should be true. Was false.
FAIL inner.pageYOffset.constructor.isInner should be true. Was false.
PASS inner.parseFloat.isInner is true
PASS inner.parseFloat.constructor.isInner is true
PASS inner.parseInt.isInner is true
PASS inner.parseInt.constructor.isInner is true
PASS inner.personalbar.isInner is true
PASS inner.personalbar.constructor.isInner is true
PASS inner.postMessage.isInner is true
@@ -771,6 +817,8 @@ PASS inner.styleMedia.isInner is true
PASS inner.styleMedia.constructor.isInner is true
PASS inner.toolbar.isInner is true
PASS inner.toolbar.constructor.isInner is true
PASS inner.unescape.isInner is true
PASS inner.unescape.constructor.isInner is true
PASS inner.webkitConvertPointFromNodeToPage.isInner is true
PASS inner.webkitConvertPointFromNodeToPage.constructor.isInner is true
PASS inner.webkitConvertPointFromPageToNode.isInner is true
@@ -20,7 +20,9 @@ var skippedProperties = [
"ArrayBuffer",
"Int8Array", "Uint8Array", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array",
"FileError", "FileReader",
"indexedDB", "showModalDialog"
"indexedDB", "showModalDialog",
// Ignore this property because it only appears in debug builds.
"jscprint"
];

var skippedPropertiesSet = {};
@@ -31,11 +33,21 @@ for (var i = 0; i < skippedProperties.length; i++)
window.Object.prototype.isInner = false;
inner.Object.prototype.isInner = true;

var windowProperites = [];
for (property in window) {
windowProperites.push(property);
function propertiesOnObject(o) {
var namesSet = {};
while (o && typeof o == "object") {
var names = Object.getOwnPropertyNames(o);
for (var i = 0; i < names.length; ++i)
namesSet[names[i]] = 1;
o = Object.getPrototypeOf(o);
}
var result = [];
for (var p in namesSet)
result.push(p);
return result;
}
windowProperties = windowProperites.sort();

windowProperites = propertiesOnObject(window).sort();

for (var x = 0; x < windowProperites.length; x++) {
var property = windowProperites[x];

0 comments on commit e7a9c4c

Please sign in to comment.