summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Tests/Window
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2020-08-31 14:08:10 +0100
committerAndreas Kling <kling@serenityos.org>2020-08-31 23:05:10 +0200
commit8aabec1c94251b859f227dd2d6e69f7426117723 (patch)
tree3c77da7ce14aade0be0f8ddf7e0f344c1c64aef2 /Libraries/LibWeb/Tests/Window
parent1c8312fa507cb2478d372d93aab7f71586d448c2 (diff)
downloadserenity-8aabec1c94251b859f227dd2d6e69f7426117723.zip
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.
Diffstat (limited to 'Libraries/LibWeb/Tests/Window')
-rw-r--r--Libraries/LibWeb/Tests/Window/window.window_frames_self.js8
1 files changed, 8 insertions, 0 deletions
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);
+ });
+});