Index: LayoutTests/fast/dom/script-tests/constructed-objects-prototypes.js |
diff --git a/LayoutTests/fast/dom/script-tests/constructed-objects-prototypes.js b/LayoutTests/fast/dom/script-tests/constructed-objects-prototypes.js |
index 034b9252a06020778161cb7f05c99dc7ce010f52..4319e4f456cc0cde97092db3db441c2752972569 100644 |
--- a/LayoutTests/fast/dom/script-tests/constructed-objects-prototypes.js |
+++ b/LayoutTests/fast/dom/script-tests/constructed-objects-prototypes.js |
@@ -8,49 +8,7 @@ var inner = subframe.contentWindow; // Call it "inner" to make shouldBe output s |
window.Object.prototype.isInner = false; |
inner.Object.prototype.isInner = true; |
-function classNameForObject(object) |
-{ |
- // call will use the global object if passed null or undefined, so special case those: |
- if (object == null) |
- return null; |
- var result = Object.prototype.toString.call(object); |
- // remove '[object ' and ']' |
- return result.split(' ')[1].split(']')[0]; |
-} |
- |
-function constructorPropertiesOnWindow(globalObject) |
-{ |
- var constructorNames = []; |
- for (var property in globalObject) { |
arv (Not doing code reviews)
2013/04/24 15:34:08
Can we change the loop to use Object.getOwnPropert
|
- var value = inner[property]; |
- if (value == null) |
- continue; |
- var type = classNameForObject(value); |
- // Ignore these properties because they do not exist in all implementations. They will be tested separately |
- if (type == "WebGLRenderingContextConstructor" || |
- type == "ArrayBufferConstructor" || |
- type =="Float32ArrayConstructor" || |
- type =="Float64ArrayConstructor" || |
- type =="Int8ArrayConstructor" || |
- type =="Int16ArrayConstructor" || |
- type =="Int32ArrayConstructor" || |
- type =="Uint8ArrayConstructor" || |
- type =="Uint8ClampedArrayConstructor" || |
- type =="Uint16ArrayConstructor" || |
- type =="Uint32ArrayConstructor" || |
- type == "FileErrorConstructor" || |
- type == "FileReaderConstructor" || |
- type == "AudioContextConstructor" || |
- type == "SpeechSynthesisUtteranceConstructor") |
- continue; |
- if (!type.match('Constructor$')) |
- continue; |
- constructorNames.push(property); |
- } |
- return constructorNames.sort(); |
-} |
- |
-var constructorNames = constructorPropertiesOnWindow(inner); |
+var constructorNames = ["Image", "MediaController", "Option", "OverflowEvent", "ProgressEvent", "URL", "XMLHttpRequest"]; |
var argumentsForConstructor = { |
'Worker' : "'foo'", |