tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / js / script-tests / for-in-avoid-duplicates.js
1 description(
2 "This tests that for/in statements don't report properties that are in both an object and its prototype more than once."
3 );
4
5
6 function constr() {
7     this.xxx = "foo";
8     this.yyy = "bar";
9 }
10
11 constr.prototype = { xxx: "baz", yyy: "quux" };
12
13 var obj = new constr();
14
15 var i = 0;
16 for (var prop in obj) {
17     ++i;
18 }
19
20 shouldBe("i", "2");