forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c43b93e
commit 331f26a
Showing
14 changed files
with
655 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Tests/LibWeb/Text/expected/wpt-import/IndexedDB/idbfactory_cmp.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Summary | ||
|
||
Harness status: OK | ||
|
||
Rerun | ||
|
||
Found 1 tests | ||
|
||
1 Pass | ||
Details | ||
Result Test Name MessagePass IDBFactory.cmp() |
13 changes: 13 additions & 0 deletions
13
Tests/LibWeb/Text/expected/wpt-import/IndexedDB/idbfactory_cmp2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Summary | ||
|
||
Harness status: OK | ||
|
||
Rerun | ||
|
||
Found 3 tests | ||
|
||
3 Pass | ||
Details | ||
Result Test Name MessagePass IDBFactory.cmp() - no argument | ||
Pass IDBFactory.cmp() - null | ||
Pass IDBFactory.cmp() - NaN |
14 changes: 14 additions & 0 deletions
14
Tests/LibWeb/Text/expected/wpt-import/IndexedDB/idbfactory_cmp3.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Summary | ||
|
||
Harness status: OK | ||
|
||
Rerun | ||
|
||
Found 4 tests | ||
|
||
4 Pass | ||
Details | ||
Result Test Name MessagePass Array v.s. Binary | ||
Pass Binary v.s. String | ||
Pass String v.s. Date | ||
Pass Date v.s. Number |
14 changes: 14 additions & 0 deletions
14
Tests/LibWeb/Text/expected/wpt-import/IndexedDB/idbfactory_cmp4.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Summary | ||
|
||
Harness status: OK | ||
|
||
Rerun | ||
|
||
Found 4 tests | ||
|
||
4 Pass | ||
Details | ||
Result Test Name MessagePass Compare in unsigned octet values (in the range [0, 255]) | ||
Pass Compare values in then same length | ||
Pass Compare values in different lengths | ||
Pass Compare when the values in the range of their minimal length are the same |
35 changes: 35 additions & 0 deletions
35
Tests/LibWeb/Text/expected/wpt-import/IndexedDB/keyorder.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Summary | ||
|
||
Harness status: OK | ||
|
||
Rerun | ||
|
||
Found 24 tests | ||
|
||
12 Pass | ||
12 Fail | ||
Details | ||
Result Test Name MessageFail Database readback sort - String < Array Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - String < Array | ||
Fail Database readback sort - float < String Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - float < String | ||
Fail Database readback sort - float < Date Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - float < Date | ||
Fail Database readback sort - float < Date < String < Array Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - float < Date < String < Array | ||
Fail Database readback sort - Date(1 sec ago) < Date(now) < Date(1 minute in future) Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - Date(1 sec ago) < Date(now) < Date(1 minute in future) | ||
Fail Database readback sort - -1.1 < 1 < 1.01337 < 1.013373 < 2 Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - -1.1 < 1 < 1.01337 < 1.013373 < 2 | ||
Fail Database readback sort - -Infinity < -0.01 < 0 < Infinity Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - -Infinity < -0.01 < 0 < Infinity | ||
Fail Database readback sort - "" < "a" < "ab" < "b" < "ba" Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - "" < "a" < "ab" < "b" < "ba" | ||
Fail Database readback sort - Arrays Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - Arrays | ||
Fail Database readback sort - Array.length: 10,000 < Array.length: 10,001 Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - Array.length: 10,000 < Array.length: 10,001 | ||
Fail Database readback sort - Infinity inside arrays Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - Infinity inside arrays | ||
Fail Database readback sort - Test different stuff at once Cannot access property "transaction" on undefined object "db" | ||
Pass IDBKey.cmp sorted - Test different stuff at once |
21 changes: 21 additions & 0 deletions
21
Tests/LibWeb/Text/input/wpt-import/IndexedDB/idbfactory_cmp.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>IDBFactory.cmp() - compared keys return correct value</title> | ||
<link rel="author" title="Microsoft" href="http://www.microsoft.com"> | ||
<script src=../resources/testharness.js></script> | ||
<script src=../resources/testharnessreport.js></script> | ||
<script src=resources/support.js></script> | ||
|
||
<script> | ||
test(function() { | ||
var greater = window.indexedDB.cmp(2, 1); | ||
var equal = window.indexedDB.cmp(2, 2); | ||
var less = window.indexedDB.cmp(1, 2); | ||
|
||
assert_equals(greater, 1, "greater"); | ||
assert_equals(equal, 0, "equal"); | ||
assert_equals(less, -1, "less"); | ||
}, "IDBFactory.cmp()"); | ||
</script> | ||
|
||
<div id=log></div> |
41 changes: 41 additions & 0 deletions
41
Tests/LibWeb/Text/input/wpt-import/IndexedDB/idbfactory_cmp2.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>IDBFactory.cmp() - invalid key</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<link rel="help" href="https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBFactory-cmp-short-any-first-any-second"> | ||
<script src=../resources/testharness.js></script> | ||
<script src=../resources/testharnessreport.js></script> | ||
<script src=resources/support.js></script> | ||
<div id=log></div> | ||
<script> | ||
test( function() { | ||
assert_throws_js(TypeError, function() { | ||
indexedDB.cmp(); | ||
}); | ||
}, "IDBFactory.cmp() - no argument"); | ||
|
||
test( function() { | ||
assert_throws_dom("DataError", function() { | ||
indexedDB.cmp(null, null); | ||
}); | ||
assert_throws_dom("DataError", function() { | ||
indexedDB.cmp(1, null); | ||
}); | ||
assert_throws_dom("DataError", function() { | ||
indexedDB.cmp(null, 1); | ||
}); | ||
}, "IDBFactory.cmp() - null"); | ||
|
||
test( function() { | ||
assert_throws_dom("DataError", function() { | ||
indexedDB.cmp(NaN, NaN); | ||
}); | ||
assert_throws_dom("DataError", function() { | ||
indexedDB.cmp(1, NaN); | ||
}); | ||
assert_throws_dom("DataError", function() { | ||
indexedDB.cmp(NaN, 1); | ||
}); | ||
}, "IDBFactory.cmp() - NaN"); | ||
</script> | ||
|
27 changes: 27 additions & 0 deletions
27
Tests/LibWeb/Text/input/wpt-import/IndexedDB/idbfactory_cmp3.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>IDBFactory.cmp() - compared keys in different types</title> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org"> | ||
<link rel="help" href="http://w3c.github.io/IndexedDB/#key-construct"> | ||
<script src=../resources/testharness.js></script> | ||
<script src=../resources/testharnessreport.js></script> | ||
|
||
<script> | ||
test(function() { | ||
assert_equals(indexedDB.cmp([0], new Uint8Array([0])), 1, "Array > Binary"); | ||
}, "Array v.s. Binary"); | ||
|
||
test(function() { | ||
assert_equals(indexedDB.cmp(new Uint8Array([0]), "0"), 1, "Binary > String"); | ||
}, "Binary v.s. String"); | ||
|
||
test(function() { | ||
assert_equals(indexedDB.cmp("", new Date(0)), 1, "String > Date"); | ||
}, "String v.s. Date"); | ||
|
||
test(function() { | ||
assert_equals(indexedDB.cmp(new Date(0), 0), 1, "Date > Number"); | ||
}, "Date v.s. Number"); | ||
</script> | ||
|
||
<div id=log></div> |
40 changes: 40 additions & 0 deletions
40
Tests/LibWeb/Text/input/wpt-import/IndexedDB/idbfactory_cmp4.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>IDBFactory.cmp() - comparison of binary keys</title> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org"> | ||
<link rel="help" href="http://w3c.github.io/IndexedDB/#key-construct"> | ||
<script src=../resources/testharness.js></script> | ||
<script src=../resources/testharnessreport.js></script> | ||
|
||
<script> | ||
test(function() { | ||
assert_equals(indexedDB.cmp(new Int8Array([-1]), new Uint8Array([0])), 1, | ||
"255(-1) shall be larger than 0"); | ||
}, "Compare in unsigned octet values (in the range [0, 255])"); | ||
|
||
test(function() { | ||
assert_equals(indexedDB.cmp( | ||
new Uint8Array([255, 254, 253]), | ||
new Uint8Array([255, 253, 254])), | ||
1, | ||
"[255, 254, 253] shall be larger than [255, 253, 254]"); | ||
}, "Compare values in then same length"); | ||
|
||
test(function() { | ||
assert_equals(indexedDB.cmp( | ||
new Uint8Array([255, 254]), | ||
new Uint8Array([255, 253, 254])), | ||
1, | ||
"[255, 254] shall be larger than [255, 253, 254]"); | ||
}, "Compare values in different lengths"); | ||
|
||
test(function() { | ||
assert_equals(indexedDB.cmp( | ||
new Uint8Array([255, 253, 254]), | ||
new Uint8Array([255, 253])), | ||
1, | ||
"[255, 253, 254] shall be larger than [255, 253]"); | ||
}, "Compare when the values in the range of their minimal length are the same"); | ||
</script> | ||
|
||
<div id=log></div> |
Oops, something went wrong.