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

Unified Diff: test/webkit/fast/js/kde/prototype_length.js

Issue 21070002: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « test/webkit/fast/js/kde/parse-expected.txt ('k') | test/webkit/fast/js/kde/prototype_length-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/fast/js/kde/prototype_length.js
diff --git a/test/webkit/has-own-property.js b/test/webkit/fast/js/kde/prototype_length.js
similarity index 51%
copy from test/webkit/has-own-property.js
copy to test/webkit/fast/js/kde/prototype_length.js
index 0e0e9ec68ba6dd14a54a39f15cd73fb5cc1ef187..2936fa55a948386e99375e451b82be6288a0424b 100644
--- a/test/webkit/has-own-property.js
+++ b/test/webkit/fast/js/kde/prototype_length.js
@@ -21,14 +21,40 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-description(
-"This test verifies the behaviour of Object.prototype.hasOwnProperty, as documented in ECMA-262 rev3 section 15.2.4.5."
-);
+description("KDE JS Test");
+shouldBe("Object.prototype.length","undefined");
+shouldBe("Function.prototype.length","0");
+shouldBe("Array.prototype.length","0");
+shouldBe("String.prototype.length","0");
+shouldBe("Boolean.prototype.length","undefined");
+shouldBe("Number.prototype.length","undefined");
+shouldBe("Date.prototype.length","undefined");
+shouldBe("RegExp.prototype.length","undefined");
+shouldBe("Error.prototype.length","undefined");
-shouldBe("typeof {foo : 'yum'}.hasOwnProperty", '"function"');
+// check !ReadOnly
+Array.prototype.length = 6;
+shouldBe("Array.prototype.length","6");
+// check ReadOnly
+Function.prototype.length = 7;
+shouldBe("Function.prototype.length","0");
+String.prototype.length = 8;
+shouldBe("String.prototype.length","0");
-shouldBeTrue("({foo : 'yum'}).hasOwnProperty('foo')");
-shouldBeTrue("''.hasOwnProperty('length')");
-shouldBeFalse("({foo : 'yum'}).hasOwnProperty('bar')");
-shouldBeFalse("({foo : 'yum'}).hasOwnProperty('toString')");
-shouldBeFalse("''.hasOwnProperty('toString')");
+// check DontDelete
+shouldBe("delete Array.prototype.length","false");
+shouldBe("delete Function.prototype.length","false");
+shouldBe("delete String.prototype.length","false");
+
+// check DontEnum
+var foundArrayPrototypeLength = false;
+for (i in Array.prototype) { if (i == "length") foundArrayPrototypeLength = true; }
+shouldBe("foundArrayPrototypeLength","false");
+
+var foundFunctionPrototypeLength = false;
+for (i in Function.prototype) { if (i == "length") foundFunctionPrototypeLength = true; }
+shouldBe("foundFunctionPrototypeLength","false");
+
+var foundStringPrototypeLength = false;
+for (i in String.prototype) { if (i == "length") foundStringPrototypeLength = true; }
+shouldBe("foundStringPrototypeLength","false");
« no previous file with comments | « test/webkit/fast/js/kde/parse-expected.txt ('k') | test/webkit/fast/js/kde/prototype_length-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698