[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    tests/khtmltests/regression
From:       Harri Porten <porten () kde ! org>
Date:       2005-05-31 23:13:13
Message-ID: 1117581193.818210.11193.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 420391 by porten:

testing prototype property lookup order fix (bug #98979, fix r420390)


 M  +55 -0     baseline/ecma/window_global.html-dom  
 M  +13 -0     tests/ecma/window_global.html  


--- trunk/tests/khtmltests/regression/baseline/ecma/window_global.html-dom #420390:420391
@@ -74,6 +74,48 @@
         BR
         #text "
 "
+        B
+          FONT color="green"
+            #text "PASS"
+        #text " window.prototype is undefined."
+        BR
+        #text "
+"
+        B
+          FONT color="green"
+            #text "PASS"
+        #text " !!window.__proto__ is true"
+        BR
+        #text "
+"
+        B
+          FONT color="green"
+            #text "PASS"
+        #text " Object.prototype.isPrototypeOf(window) is true"
+        BR
+        #text "
+"
+        B
+          FONT color="green"
+            #text "PASS"
+        #text " window.hasOwnProperty is Number.hasOwnProperty"
+        BR
+        #text "
+"
+        B
+          FONT color="green"
+            #text "PASS"
+        #text " Object.prototype.foo = 11; window.foo is 11"
+        BR
+        #text "
+"
+        B
+          FONT color="green"
+            #text "PASS"
+        #text " Object.prototype.closed = 11; window.closed is false"
+        BR
+        #text "
+"
         P
           #text " End Of Test"
       #text "
@@ -87,6 +129,19 @@
         var parent = 33;
         shouldBe("parent", "33");
 
+        // non-logical behavior
+        shouldBeUndefined("window.prototype");
+        if (Number.__proto__) {
+           shouldBeTrue("!!window.__proto__");
+           // interesting to look at in Firefox: window.__proto__ and 
+           // window.__proto__.__proto__
+        }
+        shouldBeTrue("Object.prototype.isPrototypeOf(window)");
+        shouldBe("window.hasOwnProperty", "Number.hasOwnProperty");
+
+        shouldBe("Object.prototype.foo = 11; window.foo", "11");
+        shouldBe("Object.prototype.closed = 11; window.closed", "false");
+
         debug("End Of Test");
       "
       #text "
--- trunk/tests/khtmltests/regression/tests/ecma/window_global.html #420390:420391
@@ -61,6 +61,19 @@
         var parent = 33;
         shouldBe("parent", "33");
 
+        // non-logical behavior
+        shouldBeUndefined("window.prototype");
+        if (Number.__proto__) {
+           shouldBeTrue("!!window.__proto__");
+           // interesting to look at in Firefox: window.__proto__ and 
+           // window.__proto__.__proto__
+        }
+        shouldBeTrue("Object.prototype.isPrototypeOf(window)");
+        shouldBe("window.hasOwnProperty", "Number.hasOwnProperty");
+
+        shouldBe("Object.prototype.foo = 11; window.foo", "11");
+        shouldBe("Object.prototype.closed = 11; window.closed", "false");
+
         debug("End Of Test");
       </script>
   </body>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic