diff options
author | Steve Block <steveblock@google.com> | 2010-02-25 10:58:37 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-25 11:17:52 +0000 |
commit | cfb0617749a64f2e177386b030d46007b8c4b179 (patch) | |
tree | 033b0b4e1b1eaa96831b52fc1ec6675132f33035 /LayoutTests/storage/domstorage/localstorage/string-conversion.html | |
parent | 4175d59b46f96005f0c64978b1a94e3fe60f1e8e (diff) | |
download | external_webkit-cfb0617749a64f2e177386b030d46007b8c4b179.zip external_webkit-cfb0617749a64f2e177386b030d46007b8c4b179.tar.gz external_webkit-cfb0617749a64f2e177386b030d46007b8c4b179.tar.bz2 |
Adds layout tests for HTML5 features
The following layout tests should all pass on Android, as they are for recently
implemented HTML5 features ...
- fast/dom/Geolocation
- storage
- http/tests/appcache
This change adds these tests to the Android tree, at the current WebKit revision
r54731. This is so that we can easily keep track of which tests should always be
green, and so that we can add Android-specific test results.
We also add the following paths ...
- fast/js/resources - used by the Geolocation tests
- http/conf - used by the Appcache tests
Tests that are currently failing are added to the DumpRenderTree skipped list
temporarily, to keep all tests green.
Change-Id: Id96c05e3746ed64e4e4c40c99567b8def688f90a
Diffstat (limited to 'LayoutTests/storage/domstorage/localstorage/string-conversion.html')
-rw-r--r-- | LayoutTests/storage/domstorage/localstorage/string-conversion.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/LayoutTests/storage/domstorage/localstorage/string-conversion.html b/LayoutTests/storage/domstorage/localstorage/string-conversion.html new file mode 100644 index 0000000..aa8bdfd --- /dev/null +++ b/LayoutTests/storage/domstorage/localstorage/string-conversion.html @@ -0,0 +1,54 @@ +<html> +<head> +<script src="resources/clearLocalStorage.js"></script> +<script> + +if (window.layoutTestController) + layoutTestController.dumpAsText(); + +function log(a) +{ + document.getElementById("logger").innerHTML += a + "<br>"; +} + +function runTest() +{ + if (!window.localStorage) { + log("window.localStorage DOES NOT exist"); + return; + } + + log("Length is " + localStorage.length); + + log("Testing implicit setters"); + localStorage.a = null; + log("Type/value for null is " + typeof localStorage.a + "/" + localStorage.a); + localStorage.b = 0; + log("Type/value for 0 is " + typeof localStorage.b + "/" + localStorage.b); + localStorage.c = function(){}; + log("Type/value for function(){} is " + typeof localStorage.c + "/" + localStorage.c); + + log("Testing explicit setters"); + localStorage.setItem('d', null); + log("Type/value for null is " + typeof localStorage.d + "/" + localStorage.d); + localStorage.setItem('e', 0); + log("Type/value for 0 is " + typeof localStorage.e + "/" + localStorage.e); + localStorage.setItem('f', function(){}); + log("Type/value for function(){} is " + typeof localStorage.f + "/" + localStorage.f); + + log("Testing index setters"); + localStorage['g'] = null; + log("Type/value for null is " + typeof localStorage.g + "/" + localStorage.g); + localStorage['h'] = 0; + log("Type/value for 0 is " + typeof localStorage.h + "/" + localStorage.h); + localStorage['i'] = function(){}; + log("Type/value for function(){} is " + typeof localStorage.i + "/" + localStorage.i); +} + +</script> +</head> +<body onload="runTest();"> +This test case verifies that local storage only stores strings. +<div id="logger"></div> +</body> +</html> |