OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <meta charset=utf-8> | |
3 <title>IDBFactory.cmp() - compared keys in different types</title> | |
4 <link rel="author" title="Mozilla" href="https://www.mozilla.org"> | |
5 <link rel="help" href="http://w3c.github.io/IndexedDB/#key-construct"> | |
6 <script src=/resources/testharness.js></script> | |
7 <script src=/resources/testharnessreport.js></script> | |
8 | |
9 <script> | |
10 test(function() { | |
11 assert_equals(indexedDB.cmp([0], new Uint8Array([0])), 1, "Array > Binary"); | |
12 }, "Array v.s. Binary"); | |
13 | |
14 test(function() { | |
15 assert_equals(indexedDB.cmp(new Uint8Array([0]), "0"), 1, "Binary > String")
; | |
16 }, "Binary v.s. String"); | |
17 | |
18 test(function() { | |
19 assert_equals(indexedDB.cmp("", new Date(0)), 1, "String > Date"); | |
20 }, "String v.s. Date"); | |
21 | |
22 test(function() { | |
23 assert_equals(indexedDB.cmp(new Date(0), 0), 1, "Date > Number"); | |
24 }, "Date v.s. Number"); | |
25 </script> | |
26 | |
27 <div id=log></div> | |
OLD | NEW |