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

Unified Diff: LayoutTests/fast/js/script-tests/global-constructors.js

Issue 14447006: Global constructors should be configurable and not enumerable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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/fast/js/script-tests/global-constructors.js
diff --git a/LayoutTests/fast/js/script-tests/global-constructors.js b/LayoutTests/fast/js/script-tests/global-constructors.js
deleted file mode 100644
index ae72ca20b369e4b1e35970a8e21082dc61aa3494..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/js/script-tests/global-constructors.js
+++ /dev/null
@@ -1,51 +0,0 @@
-description("This test documents our set of global constructors we expose on the window object (FF and Opera don't expose them on the window, btw). This also checks to make sure than any constructor attribute we expose has the expected constructor type.")
-
-var constructorNames = [];
-
-for (var name in window) {
- var value = window[name];
- var re = new RegExp("Constructor]$");
- var isConstructor = re.exec(value);
- if (isConstructor)
- constructorNames.push(name);
-}
-
-constructorNames.sort();
-
-for (var x in constructorNames) {
- var name = constructorNames[x];
- var expectedConstructorName = "'[object " + name + "Constructor]'";
-
- // Ignore these properties because they do not exist in all implementations. They will be tested separately
- if (name == "WebGLRenderingContext" ||
- name == "WebGLActiveInfo" ||
- name == "WebGLBuffer" ||
- name == "WebGLFramebuffer" ||
- name == "WebGLProgram" ||
- name == "WebGLRenderbuffer" ||
- name == "WebGLShader" ||
- name == "WebGLShaderPrecisionFormat" ||
- name == "WebGLTexture" ||
- name == "WebGLUniformLocation" ||
- name == "ArrayBuffer" ||
- name == "DataView" ||
- name == "Int8Array" ||
- name == "Uint8Array" ||
- name == "Uint8ClampedArray" ||
- name == "Int16Array" ||
- name == "Uint16Array" ||
- name == "Int32Array" ||
- name == "Uint32Array" ||
- name == "Float32Array" ||
- name == "Float64Array" ||
- name == "FileError" ||
- name == "FileReader" ||
- name == "AutocompleteErrorEvent")
- continue;
-
- if (name == "XMLDocument")
- // Gecko exposes an "XMLDocument" constructor, but we just use Document for XML documents instead of a custom sub-type
- expectedConstructorName = "'[object DocumentConstructor]'";
-
- shouldBe("" + name + ".toString()", expectedConstructorName);
-}

Powered by Google App Engine
This is Rietveld 408576698