From 7a663162975a7193f1d77abf9cb0e574e4017d8e Mon Sep 17 00:00:00 2001 From: Jim Broadbent Date: Sun, 20 Oct 2024 20:40:17 +0100 Subject: [PATCH] LibWeb/Storage: Return undefined for non-existent key/index access All tests at now pass: http://wpt.live/webstorage/defineProperty.window.html --- Tests/LibWeb/Text/expected/localStorage.txt | 4 ++++ Tests/LibWeb/Text/input/localStorage.html | 7 +++++++ Userland/Libraries/LibWeb/HTML/Storage.cpp | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Tests/LibWeb/Text/expected/localStorage.txt b/Tests/LibWeb/Text/expected/localStorage.txt index a5ea54de542..37bc923eb44 100644 --- a/Tests/LibWeb/Text/expected/localStorage.txt +++ b/Tests/LibWeb/Text/expected/localStorage.txt @@ -1,6 +1,10 @@ +undefined +null value value other other +undefined +null foo foo diff --git a/Tests/LibWeb/Text/input/localStorage.html b/Tests/LibWeb/Text/input/localStorage.html index 32715a3ecf2..85fc7b4df29 100644 --- a/Tests/LibWeb/Text/input/localStorage.html +++ b/Tests/LibWeb/Text/input/localStorage.html @@ -1,6 +1,10 @@