Bug 1463221 [wpt PR 11096] - [SessionStorageS13N] Fix key decoding/encoding and site isolation., a=testonly

Automatic update from web-platform-tests[SessionStorageS13N] Fix key decoding/encoding and site isolation.

Allows namespaces to be bound multiple times for site isolation work,
fixes key encoding & decoding in the renderer, and fixes some tests.

Change-Id: Iac667af7f6edcb4774f9ef49cfc8fd0801060b31
Reviewed-on: https://chromium-review.googlesource.com/1065207
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560391}

--

wpt-commits: cf00fe1051b58f10f542fe396cc1872d31e37b60
wpt-pr: 11096
This commit is contained in:
Daniel Murphy 2018-05-23 17:14:41 +00:00 коммит произвёл moz-wptsync-bot
Родитель 08769326a4
Коммит 0686b1b4d0
3 изменённых файлов: 22 добавлений и 2 удалений

Просмотреть файл

@ -617203,7 +617203,7 @@
"testharness"
],
"webstorage/eventTestHarness.js": [
"7620e4b6d1badeb105c8f576ad0f03040cef5c66",
"1904bb024612309549e715cd1f5ca1e990a82aef",
"support"
],
"webstorage/event_basic.html": [
@ -617211,7 +617211,7 @@
"testharness"
],
"webstorage/event_basic.js": [
"6ec57795d1d437d08c2e1d8ff1aac8bc6fc24b7a",
"f3644a379740bede29593e04b9bef5dfd34c3641",
"support"
],
"webstorage/event_body_attribute.html": [

Просмотреть файл

@ -5,6 +5,10 @@ iframe.contentWindow.document.body.textContent = "Nothing to see here.";
storageEventList = new Array();
iframe.contentWindow.onstorage = function(e) {
if (iframe.contentWindow.sessionStorage === e.storageArea)
e.storageAreaString = "sessionStorage";
else if (iframe.contentWindow.localStorage === e.storageArea)
e.storageAreaString = "localStorage";
window.parent.storageEventList.push(e);
};

Просмотреть файл

@ -20,6 +20,8 @@ testStorages(function(storageString) {
assert_unreached(msg);
}
assert_equals(storageEventList.length, 1);
assert_equals(storageEventList[0].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[0].key, "FOO");
assert_equals(storageEventList[0].oldValue, null);
assert_equals(storageEventList[0].newValue, "BAR");
@ -38,18 +40,26 @@ testStorages(function(storageString) {
assert_unreached(msg);
}
assert_equals(storageEventList.length, 5);
assert_equals(storageEventList[1].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[1].key, "FU");
assert_equals(storageEventList[1].oldValue, null);
assert_equals(storageEventList[1].newValue, "BAR");
assert_equals(storageEventList[2].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[2].key, "a");
assert_equals(storageEventList[2].oldValue, null);
assert_equals(storageEventList[2].newValue, "1");
assert_equals(storageEventList[3].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[3].key, "b");
assert_equals(storageEventList[3].oldValue, null);
assert_equals(storageEventList[3].newValue, "2");
assert_equals(storageEventList[4].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[4].key, "b");
assert_equals(storageEventList[4].oldValue, "2");
assert_equals(storageEventList[4].newValue, "3");
@ -65,6 +75,8 @@ testStorages(function(storageString) {
assert_unreached(msg);
}
assert_equals(storageEventList.length, 6);
assert_equals(storageEventList[5].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[5].key, "FOO");
assert_equals(storageEventList[5].oldValue, "BAR");
assert_equals(storageEventList[5].newValue, null);
@ -80,6 +92,8 @@ testStorages(function(storageString) {
assert_unreached(msg);
}
assert_equals(storageEventList.length, 7);
assert_equals(storageEventList[6].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[6].key, "FU");
assert_equals(storageEventList[6].oldValue, "BAR");
assert_equals(storageEventList[6].newValue, null);
@ -95,6 +109,8 @@ testStorages(function(storageString) {
assert_unreached(msg);
}
assert_equals(storageEventList.length, 8);
assert_equals(storageEventList[7].storageAreaString, storageString,
"Storage event came from wrong storage type.");
assert_equals(storageEventList[7].key, null);
assert_equals(storageEventList[7].oldValue, null);
assert_equals(storageEventList[7].newValue, null);