From fd09df71a44920fc6cc59d5d5f96145dd12bf454 Mon Sep 17 00:00:00 2001 From: Rohan Prinja Date: Sat, 30 Aug 2014 02:07:33 +0530 Subject: [PATCH] implement window.frames --- src/components/script/dom/webidls/Window.webidl | 1 + src/components/script/dom/window.rs | 5 +++++ .../html/browsers/the-window-object/window-aliases.html.ini | 5 ----- 3 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 src/test/wpt/metadata/html/browsers/the-window-object/window-aliases.html.ini diff --git a/src/components/script/dom/webidls/Window.webidl b/src/components/script/dom/webidls/Window.webidl index 8571f9c9b645..9cd6ed1c045e 100644 --- a/src/components/script/dom/webidls/Window.webidl +++ b/src/components/script/dom/webidls/Window.webidl @@ -30,6 +30,7 @@ // other browsing contexts //[Replaceable] readonly attribute WindowProxy frames; + readonly attribute Window frames; //[Replaceable] readonly attribute unsigned long length; //[Unforgeable] readonly attribute WindowProxy top; // attribute any opener; diff --git a/src/components/script/dom/window.rs b/src/components/script/dom/window.rs index 7d60c09a5fce..23b6c71e0294 100644 --- a/src/components/script/dom/window.rs +++ b/src/components/script/dom/window.rs @@ -195,6 +195,11 @@ impl<'a> WindowMethods for JSRef<'a, Window> { self.Window() } + // http://www.whatwg.org/html/#dom-frames + fn Frames(&self) -> Temporary { + self.Window() + } + fn Parent(&self) -> Temporary { //TODO - Once we support iframes correctly this needs to return the parent frame self.Window() diff --git a/src/test/wpt/metadata/html/browsers/the-window-object/window-aliases.html.ini b/src/test/wpt/metadata/html/browsers/the-window-object/window-aliases.html.ini deleted file mode 100644 index e7df55d4411f..000000000000 --- a/src/test/wpt/metadata/html/browsers/the-window-object/window-aliases.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[window-aliases.html] - type: testharness - [frames should be the global object] - expected: FAIL -