Revision eab2a930c67983a17d698050eef0dc85a3787dde authored by Hwanseung Lee on 26 March 2018, 15:54:44 UTC, committed by Chromium WPT Sync on 26 March 2018, 15:54:44 UTC
block-size[1], inline-size[2], max-block-size[3], max-inline-size[4], min-block-size[5], min-inline-size[6] are added to support in whitelist. and test file are also added. [1]https://drafts.csswg.org/css-logical-1/#propdef-block-size [2]https://drafts.csswg.org/css-logical-1/#propdef-inline-size [3]https://drafts.csswg.org/css-logical-1/#propdef-max-block-size [4]https://drafts.csswg.org/css-logical-1/#propdef-max-inline-size [5]https://drafts.csswg.org/css-logical-1/#propdef-min-block-size [6]https://drafts.csswg.org/css-logical-1/#propdef-min-inline-size Bug: 820299 Change-Id: I97c589deea28bfedc82ec1b1686ceaf9979cb95e Reviewed-on: https://chromium-review.googlesource.com/973561 Commit-Queue: Hwanseung Lee <hwanseung@chromium.org> Reviewed-by: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#545802}
1 parent 3b57b11
storage_key.html
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>WebStorage Test: Storage - key(index)</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
["localStorage", "sessionStorage"].forEach(function(name) {
test(function() {
var storage = window[name];
storage.clear();
storage.setItem("name", "user1");
storage.setItem("age", "20");
storage.setItem("a", "1");
storage.setItem("b", "2");
var keys = ["name", "age", "a", "b"];
function doTest(index) {
test(function() {
var key = storage.key(index);
assert_not_equals(key, null);
assert_true(keys.indexOf(key) >= 0,
"Unexpected key " + key + " found.");
}, name + ".key(" + index + ") should return the right thing.");
}
for (var i = 0; i < keys.length; ++i) {
doTest(i);
doTest(i + 0x100000000);
}
test(function() {
assert_equals(storage.key(-1), null, "storage.key(-1)");
assert_equals(storage.key(4), null, "storage.key(4)");
}, name + ".key() should return null for out-of-range arguments.");
}, name + ".key");
test(function() {
var get_keys = function(s) {
var keys = [];
for (var i = 0; i < s.length; ++i) {
keys.push(s.key(i));
}
return keys;
};
var storage = window[name];
storage.clear();
storage.setItem("name", "user1");
storage.setItem("age", "20");
storage.setItem("a", "1");
storage.setItem("b", "2");
var expected_keys = get_keys(storage);
storage.setItem("name", "user2");
assert_array_equals(get_keys(storage), expected_keys);
}, name + ".key with value changes");
});
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...