Test for some window properties that WebCore previously didn't enumerate.
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2006 06:17:15 +0000 (06:17 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2006 06:17:15 +0000 (06:17 +0000)
        * fast/js/window-properties2-expected.txt: Added.
        * fast/js/window-properties2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17130 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/js/window-properties-expected.txt
LayoutTests/fast/js/window-properties.html
LayoutTests/fast/js/window-properties2-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/window-properties2.html [new file with mode: 0644]

index 7ee08ca51daa0238581d2009dfa4ca21258e502d..2cc4ecc11d245cc1909790ea8c39c48361657887 100644 (file)
@@ -1,3 +1,10 @@
+2006-10-18  Geoffrey Garen  <ggaren@apple.com>
+
+        Test for some window properties that WebCore previously didn't enumerate.
+
+        * fast/js/window-properties2-expected.txt: Added.
+        * fast/js/window-properties2.html: Added.
+
 2006-10-18  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Beth.
index 715fedb3f9a0f1fe25d88ea739ad51173e20dc61..5e2f85c9507ee7f676b2559014bda276580d86e8 100644 (file)
@@ -345,16 +345,16 @@ window.document.links : function
 window.document.location : object (Location)
 window.document.location.toString : function
 window.document.location.assign : function
+window.document.location.reload : function
+window.document.location.replace : function
 window.document.location.host : string
 window.document.location.pathname : string
 window.document.location.port : string
 window.document.location.href : string
 window.document.location.search : string
-window.document.location.reload : function
 window.document.location.hash : string
 window.document.location.hostname : string
 window.document.location.protocol : string
-window.document.location.replace : function
 window.document.cookie : string
 window.document.plugins : function
 window.document.forms : function
@@ -963,8 +963,8 @@ window.document.defaultView.onmousewheel : null
 window.document.defaultView.history : object (History)
 window.document.defaultView.history.back : function
 window.document.defaultView.history.forward : function
-window.document.defaultView.history.length : number
 window.document.defaultView.history.go : function
+window.document.defaultView.history.length : number
 window.document.defaultView.prompt : function
 window.document.defaultView.top : object (DOMWindow)
 window.document.defaultView.top *** children skipped, already printed above under 'window.document.defaultView'
index 2f6e9c54b38240fee0f9a12f51e1adcd1400aaa6..87f5690d87fb46cdb664c1d61e9c1b906e50e28e 100644 (file)
@@ -23,8 +23,7 @@ function shouldSkipProperty(fullPropertyName, propertyValue) {
 
 function shouldSkipChildren(fullPropertyName, propertyValue) {
   if (propertyValue == logDiv
-    || fullPropertyName == 'window.document.body.lastChild'
-    || fullPropertyName == 'window.history.length')
+    || fullPropertyName == 'window.document.body.lastChild')
     return true;
 }
 
diff --git a/LayoutTests/fast/js/window-properties2-expected.txt b/LayoutTests/fast/js/window-properties2-expected.txt
new file mode 100644 (file)
index 0000000..dcaa140
--- /dev/null
@@ -0,0 +1,67 @@
+This test prints out the values of a few global objects that WebCore used to lack.
+
+
+
+===== window.location [object]: file:///Users/ggaren/Labyrinth/OpenSource/LayoutTests/fast/js/window-properties2.html=====
+toString: function
+assign: function
+host: string
+pathname: string
+port: string
+href: string
+search: string
+reload: function
+hash: string
+hostname: string
+protocol: string
+replace: function
+
+
+===== window.getSelection() [object]: =====
+setPosition: function
+modify: function
+setBaseAndExtent: function
+empty: function
+getRangeAt: function
+toString: function
+baseOffset: number
+collapseToEnd: function
+type: string
+focusNode: object
+focusOffset: number
+extentOffset: number
+anchorNode: object
+extentNode: object
+baseNode: object
+collapseToStart: function
+anchorOffset: number
+isCollapsed: boolean
+collapse: function
+
+
+===== window.history [object]: [object History]=====
+back: function
+forward: function
+length: number
+go: function
+
+
+===== window.locationbar [object]: [object BarInfo]=====
+visible: boolean
+
+
+===== window.menubar [object]: [object BarInfo]=====
+visible: boolean
+
+
+===== window.personalbar [object]: [object BarInfo]=====
+visible: boolean
+
+
+===== window.statusbar [object]: [object BarInfo]=====
+visible: boolean
+
+
+===== window.toolbar [object]: [object BarInfo]=====
+visible: boolean
+
diff --git a/LayoutTests/fast/js/window-properties2.html b/LayoutTests/fast/js/window-properties2.html
new file mode 100644 (file)
index 0000000..121e1e2
--- /dev/null
@@ -0,0 +1,32 @@
+<p>This test prints out the values of a few global objects that WebCore used to lack.</p>
+<hr>
+
+<pre id="pre"></pre>
+
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+    
+function log(s)
+{
+    document.getElementById('pre').appendChild(document.createTextNode(s));
+}
+
+function logObject(objectGetter)
+{
+    var o = eval(objectGetter);
+    log("\n\n===== " + objectGetter + " [" + typeof(o) + "]: " + o + "=====\n");
+    for (var p in o) {
+        log(p + ": " + typeof o[p] + "\n");
+    }
+}
+
+logObject('window.location');
+logObject('window.getSelection()');
+logObject('window.history');
+logObject('window.locationbar');
+logObject('window.menubar');
+logObject('window.personalbar');
+logObject('window.statusbar');
+logObject('window.toolbar');
+</script>
\ No newline at end of file