File: test13_run.html

package info (click to toggle)
libjs-jstorage 0.3.1-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: javascript: 706; makefile: 13; xml: 8
file content (30 lines) | stat: -rw-r--r-- 937 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html>
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js"></script>
    <script src="../jstorage.js"></script>
    <script>

        function runTest(){
            if(typeof $.jStorage.get("jskey_str") != "string" || $.jStorage.get("jskey_str") !== "stringval"){
                return false;
            }
            if(typeof $.jStorage.get("jskey_num") != "number" || $.jStorage.get("jskey_num") !== 12345){
                return false;
            }
            if(typeof $.jStorage.get("jskey_bool") != "boolean" || $.jStorage.get("jskey_bool") !== false){
                return false;
            }
            if(typeof $.jStorage.get("jskey_obj") != "object" || $.jStorage.get("jskey_obj").test !== 123){
                return false;
            }

            return true;
        }
        parent.testReady(runTest());
    </script>
</head>
<body>

</body>
</html>