From 8aabec1c94251b859f227dd2d6e69f7426117723 Mon Sep 17 00:00:00 2001 From: Luke Date: Mon, 31 Aug 2020 14:08:10 +0100 Subject: LibWeb: Expose window.self and window.frames "self" is a way to refer to the global object that will work in both a window context and a web worker context. "frames" apparently used to return a list of frame objects according to MDN, but it now just returns the window object. --- Libraries/LibWeb/Tests/Window/window.window_frames_self.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Libraries/LibWeb/Tests/Window/window.window_frames_self.js (limited to 'Libraries/LibWeb/Tests/Window') diff --git a/Libraries/LibWeb/Tests/Window/window.window_frames_self.js b/Libraries/LibWeb/Tests/Window/window.window_frames_self.js new file mode 100644 index 0000000000..1d7799843e --- /dev/null +++ b/Libraries/LibWeb/Tests/Window/window.window_frames_self.js @@ -0,0 +1,8 @@ +loadPage("file:///res/html/misc/blank.html"); + +afterInitialPageLoad(() => { + test("window.{window,frames,self} all return the Window object", () => { + expect(window.window).toBe(window.frames); + expect(window.window).toBe(window.self); + }); +}); -- cgit v1.2.3