crossorigin element resource loading should check HTTP redirection
[WebKit-https.git] / LayoutTests / storage / domstorage / window-attributes-exist.html
index 1f7624c..5228851 100644 (file)
@@ -2,8 +2,8 @@
 <head>
 <script>
 
-if (layoutTestController)
-    layoutTestController.dumpAsText();
+if (window.testRunner)
+    testRunner.dumpAsText();
 
 function log(a)
 {
@@ -22,27 +22,38 @@ function testStorage(name, storage)
         log("Storage object " + name + " has setItem");
     if ("removeItem" in storage)
         log("Storage object " + name + " has removeItem");
+    if ("clear" in storage)
+        log("Storage object " + name + " has clear");
 }
 
 function runTest()
 {
-    if (window.sessionStorage) {
+    if ("sessionStorage" in window) {
         log("window.sessionStorage exists");
         testStorage("sessionStorage", window.sessionStorage);
+        log("window.sessionStorage == window.sessionStorage: " + (window.sessionStorage == window.sessionStorage));
+        log("window.sessionStorage === window.sessionStorage: " + (window.sessionStorage === window.sessionStorage));
     } else
         log("window.sessionStorage DOES NOT exist");
 
-    if (window.localStorage) {
+    if ("localStorage" in window) {
         log("window.localStorage exists");
         testStorage("localStorage", window.localStorage);
+        log("window.localStorage == window.localStorage: " + (window.localStorage == window.localStorage));
+        log("window.localStorage === window.localStorage: " + (window.localStorage === window.localStorage));
     } else
         log("window.localStorage DOES NOT exist");
+
+    if ("onstorage" in window)
+        log("window.onstorage exists");
+    else
+        log("window.onstorage DOES NOT exist");
 }
 
 </script>
 </head>
 <body onload="runTest();">
-This test checks to see if window.localStorage and window.sessionStorage exist.<br>
+This test checks to see if window.localStorage, window.sessionStorage and window.onstorage exist.<br>
 <div id="logger"></div>
 </body>
 </html>