Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / domstorage / window-attributes-exist.html
blob52288512769eeb5da7c1d1c9b3a4d0fdbc9582c5
1 <html>
2 <head>
3 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 function log(a)
10 document.getElementById("logger").innerHTML += a + "<br>";
13 function testStorage(name, storage)
15 if ("length" in storage)
16 log("Storage object " + name + " has length");
17 if ("key" in storage)
18 log("Storage object " + name + " has key");
19 if ("getItem" in storage)
20 log("Storage object " + name + " has getItem");
21 if ("setItem" in storage)
22 log("Storage object " + name + " has setItem");
23 if ("removeItem" in storage)
24 log("Storage object " + name + " has removeItem");
25 if ("clear" in storage)
26 log("Storage object " + name + " has clear");
29 function runTest()
31 if ("sessionStorage" in window) {
32 log("window.sessionStorage exists");
33 testStorage("sessionStorage", window.sessionStorage);
34 log("window.sessionStorage == window.sessionStorage: " + (window.sessionStorage == window.sessionStorage));
35 log("window.sessionStorage === window.sessionStorage: " + (window.sessionStorage === window.sessionStorage));
36 } else
37 log("window.sessionStorage DOES NOT exist");
39 if ("localStorage" in window) {
40 log("window.localStorage exists");
41 testStorage("localStorage", window.localStorage);
42 log("window.localStorage == window.localStorage: " + (window.localStorage == window.localStorage));
43 log("window.localStorage === window.localStorage: " + (window.localStorage === window.localStorage));
44 } else
45 log("window.localStorage DOES NOT exist");
47 if ("onstorage" in window)
48 log("window.onstorage exists");
49 else
50 log("window.onstorage DOES NOT exist");
53 </script>
54 </head>
55 <body onload="runTest();">
56 This test checks to see if window.localStorage, window.sessionStorage and window.onstorage exist.<br>
57 <div id="logger"></div>
58 </body>
59 </html>