From 1f61a549a35ae317479f914c454fbee3580869d6 Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Thu, 9 Feb 2017 14:28:37 -0600 Subject: [PATCH 1/2] Added some same-origin-domain checks. --- components/constellation/constellation.rs | 10 +- components/net_traits/pub_domains.rs | 11 +- components/script/devtools.rs | 3 +- components/script/dom/document.rs | 5 +- components/script/dom/history.rs | 3 +- components/script/dom/htmliframeelement.rs | 40 +++--- components/script/dom/location.rs | 114 +++++++++++++----- components/script/dom/webidls/Location.webidl | 28 ++--- components/script/dom/window.rs | 17 ++- components/script/script_thread.rs | 11 +- components/script/webdriver_handlers.rs | 21 ++-- components/url/lib.rs | 2 + .../metadata/FileAPI/url/origin.sub.html.ini | 3 +- tests/wpt/metadata/cors/remote-origin.htm.ini | 91 +++++++------- .../security_location_0.htm.ini | 5 - .../security-window/window-security.html.ini | 24 ---- .../frameElement.html.ini | 3 +- .../iframe-load-event.html.ini | 5 - .../iframe_sandbox_allow_script.html.ini | 2 +- .../templates-copy-document-owner.html.ini | 5 - ...late-contents-owner-document-type.html.ini | 8 -- .../template-contents-owner-test-002.html.ini | 12 -- .../definitions/template-contents.html.ini | 14 --- .../innerhtml-on-templates/innerhtml.html.ini | 5 - .../content-attribute.html.ini | 8 -- .../node-document-changes.html.ini | 11 -- .../template-content-node-document.html.ini | 5 - .../template-descendant-body.html.ini | 5 - .../template-descendant-frameset.html.ini | 11 -- .../template-descendant-head.html.ini | 5 - .../generating-of-implied-end-tags.html.ini | 8 -- .../ignore-body-token.html.ini | 5 - .../ignore-frameset-token.html.ini | 5 - .../ignore-head-token.html.ini | 5 - .../ignore-html-token.html.ini | 5 - .../start-tag-html.html.ini | 5 - ...emplate-end-tag-without-start-one.html.ini | 5 - .../end-tag-frameset.html.ini | 5 - .../generating-of-implied-end-tags.html.ini | 8 -- ...emplate-end-tag-without-start-one.html.ini | 5 - .../template-child-nodes.html.ini | 8 -- .../template-owner-document.html.ini | 11 -- .../test_unique_performance_objects.html.ini | 3 - tests/wpt/mozilla/meta/MANIFEST.json | 2 +- .../mozilla/referrer-policy/generic/common.js | 4 +- 45 files changed, 223 insertions(+), 348 deletions(-) delete mode 100644 tests/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.htm.ini delete mode 100644 tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-document-type.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-002.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/innerhtml.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/content-attribute.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/node-document-changes.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-content-node-document.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-body.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-head.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-body-token.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-frameset-token.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-head-token.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-html-token.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/template-end-tag-without-start-one.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/appending-to-a-template/template-child-nodes.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/template/creating-an-element-for-the-token/template-owner-document.html.ini delete mode 100644 tests/wpt/metadata/navigation-timing/test_unique_performance_objects.html.ini diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 391fa1a679d..ca2f871472f 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -108,7 +108,7 @@ use servo_config::opts; use servo_config::prefs::PREFS; use servo_rand::{Rng, SeedableRng, ServoRng, random}; use servo_remutex::ReentrantMutex; -use servo_url::ServoUrl; +use servo_url::{Host, ServoUrl}; use std::borrow::ToOwned; use std::collections::{HashMap, VecDeque}; use std::iter::once; @@ -229,13 +229,13 @@ pub struct Constellation { /// event loop for each registered domain name (aka eTLD+1) in /// each top-level frame. We store the event loops in a map /// indexed by top-level frame id (as a `FrameId`) and registered - /// domain name (as a `String`) to event loops. This double + /// domain name (as a `Host`) to event loops. This double /// indirection ensures that separate tabs do not share event /// loops, even if the same domain is loaded in each. /// It is important that scripts with the same eTLD+1 /// share an event loop, since they can use `document.domain` /// to become same-origin, at which point they can share DOM objects. - event_loops: HashMap>>, + event_loops: HashMap>>, /// The set of all the pipelines in the browser. /// (See the `pipeline` module for more details.) @@ -606,10 +606,10 @@ impl Constellation None => (None, None), Some(host) => { let event_loop = self.event_loops.get(&top_level_frame_id) - .and_then(|map| map.get(host)) + .and_then(|map| map.get(&host)) .and_then(|weak| weak.upgrade()); match event_loop { - None => (None, Some(String::from(host))), + None => (None, Some(host)), Some(event_loop) => (Some(event_loop.clone()), None), } }, diff --git a/components/net_traits/pub_domains.rs b/components/net_traits/pub_domains.rs index 47ebe6f9775..c98f10d90eb 100644 --- a/components/net_traits/pub_domains.rs +++ b/components/net_traits/pub_domains.rs @@ -15,7 +15,7 @@ //! those cases are not present. use servo_config::resource_files::read_resource_file; -use servo_url::ServoUrl; +use servo_url::{Host, ImmutableOrigin, ServoUrl}; use std::collections::HashSet; use std::iter::FromIterator; use std::str::from_utf8; @@ -146,6 +146,11 @@ pub fn is_reg_domain(domain: &str) -> bool { /// Returns None if the URL has no host name. /// Returns the registered suffix for the host name if it is a domain. /// Leaves the host name alone if it is an IP address. -pub fn reg_host<'a>(url: &'a ServoUrl) -> Option<&'a str> { - url.domain().map(reg_suffix).or(url.host_str()) +pub fn reg_host<'a>(url: &'a ServoUrl) -> Option { + match url.origin() { + ImmutableOrigin::Tuple(_, Host::Domain(domain), _) => Some(Host::Domain(String::from(reg_suffix(&*domain)))), + ImmutableOrigin::Tuple(_, Host::Ipv4(address), _) => Some(Host::Ipv4(address)), + ImmutableOrigin::Tuple(_, Host::Ipv6(address), _) => Some(Host::Ipv6(address)), + ImmutableOrigin::Opaque(_) => None, + } } diff --git a/components/script/devtools.rs b/components/script/devtools.rs index b0f585d8db8..7172f2bdf9d 100644 --- a/components/script/devtools.rs +++ b/components/script/devtools.rs @@ -10,7 +10,6 @@ use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclar use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods; use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; -use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, jsstring_to_str}; use dom::bindings::inheritance::Castable; @@ -261,6 +260,6 @@ pub fn handle_request_animation_frame(documents: &Documents, pub fn handle_reload(documents: &Documents, id: PipelineId) { if let Some(win) = documents.find_window(id) { - win.Location().Reload(); + win.Location().reload_without_origin_check(); } } diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 29d7227dee9..ac3b715802f 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -3396,7 +3396,10 @@ impl DocumentMethods for Document { let entry_responsible_document = GlobalScope::entry().as_window().Document(); - if !self.origin.same_origin(&entry_responsible_document.origin) { + // This check should probably be same-origin-domain + // https://github.com/whatwg/html/issues/2282 + // https://github.com/whatwg/html/pull/2288 + if !self.origin.same_origin_domain(&entry_responsible_document.origin) { // Step 4. return Err(Error::Security); } diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs index 0e1aea4bf10..f034a604174 100644 --- a/components/script/dom/history.rs +++ b/components/script/dom/history.rs @@ -4,7 +4,6 @@ use dom::bindings::codegen::Bindings::HistoryBinding; use dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods; -use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::inheritance::Castable; use dom::bindings::js::{JS, Root}; @@ -65,7 +64,7 @@ impl HistoryMethods for History { } else if delta < 0 { TraversalDirection::Back(-delta as usize) } else { - self.window.Location().Reload(); + self.window.Location().reload_without_origin_check(); return; }; diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index dd8c13de449..5e9891bdcc4 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -327,20 +327,6 @@ impl HTMLIFrameElement { false } } - - pub fn get_content_window(&self) -> Option> { - self.pipeline_id.get() - .and_then(|pipeline_id| ScriptThread::find_document(pipeline_id)) - .and_then(|document| { - let current_global = GlobalScope::current(); - let current_document = current_global.as_window().Document(); - if document.origin().same_origin(current_document.origin()) { - Some(Root::from_ref(document.window())) - } else { - None - } - }) - } } pub trait HTMLIFrameElementLayoutMethods { @@ -512,15 +498,33 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { // https://html.spec.whatwg.org/multipage/#dom-iframe-contentwindow fn GetContentWindow(&self) -> Option> { - match self.get_content_window() { - Some(ref window) => Some(window.browsing_context()), - None => None + if self.pipeline_id.get().is_some() { + ScriptThread::find_browsing_context(self.frame_id) + } else { + None } } // https://html.spec.whatwg.org/multipage/#dom-iframe-contentdocument + // https://html.spec.whatwg.org/multipage/#concept-bcc-content-document fn GetContentDocument(&self) -> Option> { - self.get_content_window().map(|window| window.Document()) + // Step 1. + let pipeline_id = match self.pipeline_id.get() { + None => return None, + Some(pipeline_id) => pipeline_id, + }; + // Step 2-3. + let document = match ScriptThread::find_document(pipeline_id) { + None => return None, + Some(document) => document, + }; + // Step 4. + let current = GlobalScope::current().as_window().Document(); + if !current.origin().same_origin_domain(document.origin()) { + return None; + } + // Step 5. + Some(document) } // Experimental mozbrowser implementation is based on the webidl diff --git a/components/script/dom/location.rs b/components/script/dom/location.rs index d06ec02d4a2..3e3a3176cf0 100644 --- a/components/script/dom/location.rs +++ b/components/script/dom/location.rs @@ -4,10 +4,12 @@ use dom::bindings::codegen::Bindings::LocationBinding; use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; -use dom::bindings::error::{Error, ErrorResult}; +use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; +use dom::bindings::error::{Error, ErrorResult, Fallible}; use dom::bindings::js::{JS, Root}; use dom::bindings::reflector::{Reflector, reflect_dom_object}; use dom::bindings::str::{DOMString, USVString}; +use dom::globalscope::GlobalScope; use dom::urlhelper::UrlHelper; use dom::window::Window; use dom_struct::dom_struct; @@ -43,11 +45,27 @@ impl Location { setter(&mut url, value); self.window.load_url(url, false, false, None); } + + fn check_same_origin_domain(&self) -> ErrorResult { + let entry_document = GlobalScope::entry().as_window().Document(); + let this_document = self.window.Document(); + if entry_document.origin().same_origin_domain(this_document.origin()) { + Ok(()) + } else { + Err(Error::Security) + } + } + + // https://html.spec.whatwg.org/multipage/#dom-location-reload + pub fn reload_without_origin_check(&self) { + self.window.load_url(self.get_url(), true, true, None); + } } impl LocationMethods for Location { // https://html.spec.whatwg.org/multipage/#dom-location-assign fn Assign(&self, url: USVString) -> ErrorResult { + // Note: no call to self.check_same_origin_domain() // TODO: per spec, we should use the _API base URL_ specified by the // _entry settings object_. let base_url = self.window.get_url(); @@ -60,12 +78,15 @@ impl LocationMethods for Location { } // https://html.spec.whatwg.org/multipage/#dom-location-reload - fn Reload(&self) { + fn Reload(&self) -> ErrorResult { + try!(self.check_same_origin_domain()); self.window.load_url(self.get_url(), true, true, None); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-replace fn Replace(&self, url: USVString) -> ErrorResult { + // Note: no call to self.check_same_origin_domain() // TODO: per spec, we should use the _API base URL_ specified by the // _entry settings object_. let base_url = self.window.get_url(); @@ -78,97 +99,124 @@ impl LocationMethods for Location { } // https://html.spec.whatwg.org/multipage/#dom-location-hash - fn Hash(&self) -> USVString { - UrlHelper::Hash(&self.get_url()) + fn GetHash(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Hash(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-hash - fn SetHash(&self, mut value: USVString) { + fn SetHash(&self, mut value: USVString) -> ErrorResult { if value.0.is_empty() { value = USVString("#".to_owned()); } + try!(self.check_same_origin_domain()); self.set_url_component(value, UrlHelper::SetHash); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-host - fn Host(&self) -> USVString { - UrlHelper::Host(&self.get_url()) + fn GetHost(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Host(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-host - fn SetHost(&self, value: USVString) { + fn SetHost(&self, value: USVString) -> ErrorResult { + try!(self.check_same_origin_domain()); self.set_url_component(value, UrlHelper::SetHost); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-origin - fn Origin(&self) -> USVString { - UrlHelper::Origin(&self.get_url()) + fn GetOrigin(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Origin(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-hostname - fn Hostname(&self) -> USVString { - UrlHelper::Hostname(&self.get_url()) + fn GetHostname(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Hostname(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-hostname - fn SetHostname(&self, value: USVString) { + fn SetHostname(&self, value: USVString) -> ErrorResult { + try!(self.check_same_origin_domain()); self.set_url_component(value, UrlHelper::SetHostname); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-href - fn Href(&self) -> USVString { - UrlHelper::Href(&self.get_url()) + fn GetHref(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Href(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-href - fn SetHref(&self, value: USVString) { - if let Ok(url) = self.window.get_url().join(&value.0) { - self.window.load_url(url, false, false, None); - } + fn SetHref(&self, value: USVString) -> ErrorResult { + // Note: no call to self.check_same_origin_domain() + let url = match self.window.get_url().join(&value.0) { + Ok(url) => url, + Err(e) => return Err(Error::Type(format!("Couldn't parse URL: {}", e))), + }; + self.window.load_url(url, false, false, None); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-pathname - fn Pathname(&self) -> USVString { - UrlHelper::Pathname(&self.get_url()) + fn GetPathname(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Pathname(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-pathname - fn SetPathname(&self, value: USVString) { + fn SetPathname(&self, value: USVString) -> ErrorResult { + try!(self.check_same_origin_domain()); self.set_url_component(value, UrlHelper::SetPathname); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-port - fn Port(&self) -> USVString { - UrlHelper::Port(&self.get_url()) + fn GetPort(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Port(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-port - fn SetPort(&self, value: USVString) { + fn SetPort(&self, value: USVString) -> ErrorResult { + try!(self.check_same_origin_domain()); self.set_url_component(value, UrlHelper::SetPort); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-protocol - fn Protocol(&self) -> USVString { - UrlHelper::Protocol(&self.get_url()) + fn GetProtocol(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Protocol(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-protocol - fn SetProtocol(&self, value: USVString) { + fn SetProtocol(&self, value: USVString) -> ErrorResult { + try!(self.check_same_origin_domain()); self.set_url_component(value, UrlHelper::SetProtocol); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-location-href - fn Stringifier(&self) -> DOMString { - DOMString::from(self.Href().0) + fn Stringifier(&self) -> Fallible { + Ok(DOMString::from(try!(self.GetHref()).0)) } // https://html.spec.whatwg.org/multipage/#dom-location-search - fn Search(&self) -> USVString { - UrlHelper::Search(&self.get_url()) + fn GetSearch(&self) -> Fallible { + try!(self.check_same_origin_domain()); + Ok(UrlHelper::Search(&self.get_url())) } // https://html.spec.whatwg.org/multipage/#dom-location-search - fn SetSearch(&self, value: USVString) { + fn SetSearch(&self, value: USVString) -> ErrorResult { + try!(self.check_same_origin_domain()); self.set_url_component(value, UrlHelper::SetSearch); + Ok(()) } } diff --git a/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl index d611a20b883..6413bd3846a 100644 --- a/components/script/dom/webidls/Location.webidl +++ b/components/script/dom/webidls/Location.webidl @@ -4,26 +4,24 @@ // https://html.spec.whatwg.org/multipage/#location [Exposed=Window, Unforgeable] interface Location { - /*stringifier*/ attribute USVString href; - readonly attribute USVString origin; - attribute USVString protocol; - attribute USVString host; - attribute USVString hostname; - attribute USVString port; - attribute USVString pathname; - attribute USVString search; - attribute USVString hash; + /*stringifier*/ [Throws] attribute USVString href; + [Throws] readonly attribute USVString origin; + [Throws] attribute USVString protocol; + [Throws] attribute USVString host; + [Throws] attribute USVString hostname; + [Throws] attribute USVString port; + [Throws] attribute USVString pathname; + [Throws] attribute USVString search; + [Throws] attribute USVString hash; - [Throws] - void assign(USVString url); - [Throws] - void replace(USVString url); - void reload(); + [Throws] void assign(USVString url); + [Throws] void replace(USVString url); + [Throws] void reload(); //[SameObject] readonly attribute USVString[] ancestorOrigins; // This is only doing as well as gecko right now. // https://github.com/servo/servo/issues/7590 is on file for // adding attribute stringifier support. - stringifier; + [Throws] stringifier; }; diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index fcb7f85d4cf..2be65b4160c 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -42,7 +42,7 @@ use dom::location::Location; use dom::mediaquerylist::{MediaQueryList, WeakMediaQueryListVec}; use dom::messageevent::MessageEvent; use dom::navigator::Navigator; -use dom::node::{Node, from_untrusted_node_address, window_from_node, NodeDamage}; +use dom::node::{Node, from_untrusted_node_address, document_from_node, window_from_node, NodeDamage}; use dom::performance::Performance; use dom::promise::Promise; use dom::screen::Screen; @@ -528,7 +528,20 @@ impl WindowMethods for Window { // https://html.spec.whatwg.org/multipage/#dom-frameelement fn GetFrameElement(&self) -> Option> { - self.browsing_context().frame_element().map(Root::from_ref) + // Steps 1-3. + if let Some(context) = self.browsing_context.get() { + // Step 4-5. + if let Some(container) = context.frame_element() { + // Step 6. + let container_doc = document_from_node(container); + let current_doc = GlobalScope::current().as_window().Document(); + if current_doc.origin().same_origin_domain(container_doc.origin()) { + // Step 7. + return Some(Root::from_ref(container)); + } + } + } + None } // https://html.spec.whatwg.org/multipage/#dom-navigator diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index e877e904ceb..15604c5b7cf 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -27,7 +27,6 @@ use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods; use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState}; use dom::bindings::codegen::Bindings::EventBinding::EventInit; -use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; use dom::bindings::codegen::Bindings::TransitionEventBinding::TransitionEventInit; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, StringificationBehavior}; @@ -644,6 +643,14 @@ impl ScriptThread { })) } + pub fn find_browsing_context(id: FrameId) -> Option> { + SCRIPT_THREAD_ROOT.with(|root| root.get().and_then(|script_thread| { + let script_thread = unsafe { &*script_thread }; + script_thread.browsing_contexts.borrow().get(&id) + .map(|context| Root::from_ref(&**context)) + })) + } + /// Creates a new script thread. pub fn new(state: InitialScriptState, port: Receiver, @@ -2101,7 +2108,7 @@ impl ScriptThread { fn handle_reload(&self, pipeline_id: PipelineId) { let window = self.documents.borrow().find_window(pipeline_id); if let Some(window) = window { - window.Location().Reload(); + window.Location().reload_without_origin_check(); } } diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs index e1599d7caef..6618bac4241 100644 --- a/components/script/webdriver_handlers.rs +++ b/components/script/webdriver_handlers.rs @@ -113,29 +113,24 @@ pub fn handle_get_frame_id(documents: &Documents, pipeline: PipelineId, webdriver_frame_id: WebDriverFrameId, reply: IpcSender, ()>>) { - let window = match webdriver_frame_id { + let result = match webdriver_frame_id { WebDriverFrameId::Short(_) => { // This isn't supported yet Ok(None) }, WebDriverFrameId::Element(x) => { - match find_node_by_unique_id(documents, pipeline, x) { - Some(ref node) => { - match node.downcast::() { - Some(ref elem) => Ok(elem.get_content_window()), - None => Err(()) - } - }, - None => Err(()) - } + find_node_by_unique_id(documents, pipeline, x) + .and_then(|node| node.downcast::().map(|elem| elem.pipeline_id())) + .ok_or(()) }, WebDriverFrameId::Parent => { - documents.find_window(pipeline).map(|window| window.parent()).ok_or(()) + documents.find_window(pipeline) + .map(|window| window.parent_info().map(|(parent_id, _)| parent_id)) + .ok_or(()) } }; - let frame_id = window.map(|x| x.map(|x| x.upcast::().pipeline_id())); - reply.send(frame_id).unwrap() + reply.send(result).unwrap() } pub fn handle_find_element_css(documents: &Documents, pipeline: PipelineId, selector: String, diff --git a/components/url/lib.rs b/components/url/lib.rs index e8d8d363fbf..9e3948fc5ab 100644 --- a/components/url/lib.rs +++ b/components/url/lib.rs @@ -28,6 +28,8 @@ use std::path::Path; use std::sync::Arc; use url::{Url, Position}; +pub use url::Host; + #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct ServoUrl(Arc); diff --git a/tests/wpt/metadata/FileAPI/url/origin.sub.html.ini b/tests/wpt/metadata/FileAPI/url/origin.sub.html.ini index c08adebef97..1dc19da4374 100644 --- a/tests/wpt/metadata/FileAPI/url/origin.sub.html.ini +++ b/tests/wpt/metadata/FileAPI/url/origin.sub.html.ini @@ -1,5 +1,6 @@ [origin.sub.html] type: testharness + expected: TIMEOUT [Verify serialization of non-ascii origin in Blob URLs] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/cors/remote-origin.htm.ini b/tests/wpt/metadata/cors/remote-origin.htm.ini index 57a120246c1..e9a518810d1 100644 --- a/tests/wpt/metadata/cors/remote-origin.htm.ini +++ b/tests/wpt/metadata/cors/remote-origin.htm.ini @@ -1,137 +1,138 @@ [remote-origin.htm] type: testharness + expected: TIMEOUT [Allow origin: *] - expected: FAIL + expected: TIMEOUT [Allow origin: _*__] - expected: FAIL + expected: TIMEOUT [Allow origin: [tab\]*] - expected: FAIL + expected: TIMEOUT [Allow origin: http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Allow origin: _http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Allow origin: _http://www1.web-platform.test:8000___[tab\]_] - expected: FAIL + expected: TIMEOUT [Allow origin: [tab\]http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: //www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: ://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: ftp://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: http:://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: http:/www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: http:www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000?] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000/] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000_/] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000#] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000%23] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000:80] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000,_*] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000\\0] - expected: FAIL + expected: TIMEOUT [Disallow origin: HTTP://WWW1.WEB-PLATFORM.TEST:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: HTTP://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://WWW1.WEB-PLATFORM.TEST:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: -] - expected: FAIL + expected: TIMEOUT [Disallow origin: **] - expected: FAIL + expected: TIMEOUT [Disallow origin: \\0*] - expected: FAIL + expected: TIMEOUT [Disallow origin: *\\0] - expected: FAIL + expected: TIMEOUT [Disallow origin: '*'] - expected: FAIL + expected: TIMEOUT [Disallow origin: "*"] - expected: FAIL + expected: TIMEOUT [Disallow origin: *_*] - expected: FAIL + expected: TIMEOUT [Disallow origin: *http://*] - expected: FAIL + expected: TIMEOUT [Disallow origin: *http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: *_http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: *,_http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: \\0http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: null_http://www1.web-platform.test:8000] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://example.net] - expected: FAIL + expected: TIMEOUT [Disallow origin: null] - expected: FAIL + expected: TIMEOUT [Disallow origin: ] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://web-platform.test:8000/cors/remote-origin.htm] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://web-platform.test:8000/cors/] - expected: FAIL + expected: TIMEOUT [Disallow origin: http://www1.web-platform.test:8000/cors/] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.htm.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.htm.ini deleted file mode 100644 index eb94f650336..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-location-interface/security_location_0.htm.ini +++ /dev/null @@ -1,5 +0,0 @@ -[security_location_0.htm] - type: testharness - [Accessing location object from different origins doesn't raise SECURITY_ERR exception] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/the-window-object/security-window/window-security.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/security-window/window-security.html.ini index 5fb19d68ce2..4fc54b9edaa 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/security-window/window-security.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/security-window/window-security.html.ini @@ -342,39 +342,15 @@ [A SecurityError exception should not be thrown when window.closed is accessed from a different origin.] expected: FAIL - [A SecurityError exception should not be thrown when window.frames is accessed from a different origin.] - expected: FAIL - [A SecurityError exception should not be thrown when window.length is accessed from a different origin.] expected: FAIL - [A SecurityError exception should not be thrown when window.location is accessed from a different origin.] - expected: FAIL - [A SecurityError exception should not be thrown when window.opener is accessed from a different origin.] expected: FAIL - [A SecurityError exception should not be thrown when window.parent is accessed from a different origin.] - expected: FAIL - - [A SecurityError exception should not be thrown when window.self is accessed from a different origin.] - expected: FAIL - - [A SecurityError exception should not be thrown when window.top is accessed from a different origin.] - expected: FAIL - - [A SecurityError exception should not be thrown when window.window is accessed from a different origin.] - expected: FAIL - [A SecurityError exception should not be thrown when window.blur is accessed from a different origin.] expected: FAIL - [A SecurityError exception should not be thrown when window.close is accessed from a different origin.] - expected: FAIL - [A SecurityError exception should not be thrown when window.focus is accessed from a different origin.] expected: FAIL - [A SecurityError exception should not be thrown when window.postMessage is accessed from a different origin.] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.html.ini b/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.html.ini index 14dcf4b686f..96ec6c1081b 100644 --- a/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.html.ini +++ b/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.html.ini @@ -1,5 +1,6 @@ [frameElement.html] type: testharness + expected: TIMEOUT [The window's frameElement attribute must return its container element if it is a nested browsing context] expected: FAIL @@ -7,5 +8,5 @@ expected: FAIL [The window's frameElement attribute must return null if the container's document does not have the same effective script origin] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html.ini deleted file mode 100644 index 92316d4d4a7..00000000000 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[iframe-load-event.html] - type: testharness - [load event of blob URL] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini index 10e46d478e3..be4402dbca6 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini @@ -1,6 +1,6 @@ [iframe_sandbox_allow_script.html] type: testharness - expected: ERROR + expected: TIMEOUT [iframe_sandbox_allow_scripts] expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner.html.ini deleted file mode 100644 index 40f9199c5df..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[templates-copy-document-owner.html] - type: testharness - [ownerDocument of cloned template content is set to template content owner. Test loading HTML document from file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-document-type.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-document-type.html.ini deleted file mode 100644 index 059169ec00a..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-document-type.html.ini +++ /dev/null @@ -1,8 +0,0 @@ -[template-contents-owner-document-type.html] - type: testharness - [The template contents owner document type is HTML document (case when document has browsing context and the template is created by HTML parser)] - expected: FAIL - - [The template contents owner document type is HTML document (case when document has browsing context and the template is created by createElement())] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-002.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-002.html.ini deleted file mode 100644 index e5075dc283d..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-002.html.ini +++ /dev/null @@ -1,12 +0,0 @@ -[template-contents-owner-test-002.html] - type: testharness - disabled: https://github.com/servo/servo/issues/9723 - [The template contents owner document must be different from template owner document, which has browsing context. Template element is created by createElement()] - expected: FAIL - - [The template contents owner document must be different from template owner document, which has browsing context. Template element is created via innerHTML] - expected: FAIL - - [The template contents owner document must be different from template owner document, which has browsing context. Template element is created by HTML parser] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents.html.ini deleted file mode 100644 index f394f7448a2..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/definitions/template-contents.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[template-contents.html] - type: testharness - [The template contents must be a DocumentFragment (the empty template tag inside HTML file loaded in iframe)] - expected: FAIL - - [The template contents must be a DocumentFragment (non empty template tag inside HTML file loaded in iframe)] - expected: FAIL - - [The template contents must be a DocumentFragment (the template tag with some text inside HTML file loaded in iframe)] - expected: FAIL - - [The template contents must be a DocumentFragment (the template tag with nested template tag inside HTML file loaded in iframe)] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/innerhtml.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/innerhtml.html.ini deleted file mode 100644 index 450eda06a9e..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/innerhtml.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[innerhtml.html] - type: testharness - [innerHTML of template element replaces all referenced by the content attribute. Test loading of HTML document from a file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/content-attribute.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/content-attribute.html.ini deleted file mode 100644 index 5a2af5e1653..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/content-attribute.html.ini +++ /dev/null @@ -1,8 +0,0 @@ -[content-attribute.html] - type: testharness - [Content attribute of template element is read-only. Text value of content attribute of template tag should be ignored, when loading document from a file] - expected: FAIL - - [Content attribute of template element is read-only. Test content attribute of a document loaded from a file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/node-document-changes.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/node-document-changes.html.ini deleted file mode 100644 index 997d4d6c63a..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/node-document-changes.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[node-document-changes.html] - type: testharness - [Changing of template element's node document. Test document loaded from a file] - expected: FAIL - - [Changing of template element's node document. Test the case when both old and new owner documents of template element have browsing context] - expected: FAIL - - [Changing of template element's node document. Adobt template element into a document that has a browsing context] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-content-node-document.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-content-node-document.html.ini deleted file mode 100644 index ac620e1efbd..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-content-node-document.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[template-content-node-document.html] - type: testharness - [Node document of the template content attribute must be template contents owner. Load HTML file with multiple template elements] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-body.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-body.html.ini deleted file mode 100644 index 77aa831c1a8..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-body.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[template-descendant-body.html] - type: testharness - [Template element as a descendant of the body element. Test loading from a file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html.ini deleted file mode 100644 index 9499e6c5abe..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[template-descendant-frameset.html] - type: testharness - [Template element as a descendant of the frameset element. Test loading from a file] - expected: FAIL - - [Template element as a descendant of the frameset element. Test template element is assigned to frameset's innerHTML)] - expected: FAIL - - [Template element as a descendant of the frameset element. Test template element appended to frameset by appendChild()] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-head.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-head.html.ini deleted file mode 100644 index ae1482660d7..00000000000 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-template-element/template-element/template-descendant-head.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[template-descendant-head.html] - type: testharness - [Template element as a descendant of the head element. Test loading from a file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags.html.ini deleted file mode 100644 index f45ba45ce66..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags.html.ini +++ /dev/null @@ -1,8 +0,0 @@ -[generating-of-implied-end-tags.html] - type: testharness - [Generating of implied end tags. Test table elements. Loading of HTML document from a file] - expected: FAIL - - [Generating of implied end tags. Test div element. Loading of HTML document from a file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-body-token.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-body-token.html.ini deleted file mode 100644 index fc735163558..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-body-token.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[ignore-body-token.html] - type: testharness - [Ignore BODY token. Test loading a HTML file with BODY tag inside template] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-frameset-token.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-frameset-token.html.ini deleted file mode 100644 index 38e9ede8421..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-frameset-token.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[ignore-frameset-token.html] - type: testharness - [Ignore frameset token. Test loading a HTML file with FRAMESET tag inside template] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-head-token.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-head-token.html.ini deleted file mode 100644 index ebc02594e19..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-head-token.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[ignore-head-token.html] - type: testharness - [Ignore HEAD token. Test loading a HTML file with HEAD tag inside template] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-html-token.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-html-token.html.ini deleted file mode 100644 index 284cd1254b2..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-html-token.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[ignore-html-token.html] - type: testharness - [Ignore HTML token. Test loading a HTML file with HTML tag inside template] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html.ini deleted file mode 100644 index 148ed2e3b18..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[start-tag-html.html] - type: testharness - [In body insertion mode: html start tag should add only absent attributes] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one.html.ini deleted file mode 100644 index e9fa8c8480c..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[template-end-tag-without-start-one.html] - type: testharness - [ tag in HTML body without start one should be ignored. Test HTML document loaded from file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset.html.ini deleted file mode 100644 index 9d9d49e816e..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[end-tag-frameset.html] - type: testharness - [ tag in HTML head without start one should be ignored. Test HTML document loaded from file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/appending-to-a-template/template-child-nodes.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/appending-to-a-template/template-child-nodes.html.ini deleted file mode 100644 index d8b72c18c32..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/appending-to-a-template/template-child-nodes.html.ini +++ /dev/null @@ -1,8 +0,0 @@ -[template-child-nodes.html] - type: testharness - [Template child nodes must be appended to template content node. Load HTML document from a file] - expected: FAIL - - [Template child nodes must be appended to nested template content node. Load HTML document from a file] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/template/creating-an-element-for-the-token/template-owner-document.html.ini b/tests/wpt/metadata/html/syntax/parsing/template/creating-an-element-for-the-token/template-owner-document.html.ini deleted file mode 100644 index 57afa31e095..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/template/creating-an-element-for-the-token/template-owner-document.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[template-owner-document.html] - type: testharness - [Test ownerDocument property of two elements in a template. Load HTML document from a file, current DOCUMENT has browsing context] - expected: FAIL - - [Test ownerDocument property of the element in a template. Load HTML document from a file, current DOCUMENT has browsing context] - expected: FAIL - - [Test ownerDocument property of the element in a nested template. Load HTML document from a file, current DOCUMENT has browsing context] - expected: FAIL - diff --git a/tests/wpt/metadata/navigation-timing/test_unique_performance_objects.html.ini b/tests/wpt/metadata/navigation-timing/test_unique_performance_objects.html.ini deleted file mode 100644 index 42a39a1d795..00000000000 --- a/tests/wpt/metadata/navigation-timing/test_unique_performance_objects.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[test_unique_performance_objects.html] - type: testharness - expected: ERROR diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index c53b72ba96c..65472be2d67 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -25696,7 +25696,7 @@ "support" ], "mozilla/referrer-policy/generic/common.js": [ - "1f4a0fa9285ad504cba75c01b4938c9da78cace3", + "6882adfd624da27cd226e1575988e85ad4e0a562", "support" ], "mozilla/referrer-policy/generic/referrer-policy-test-case.js": [ diff --git a/tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/common.js b/tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/common.js index 3cebc2040c9..c93fad93e8a 100644 --- a/tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/common.js +++ b/tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/common.js @@ -195,8 +195,8 @@ function queryAnchor(url, callback, referrer_policy) { var url_with_params = url + "&id=" + id + "&tagAttrs=" + JSON.stringify(referrer_policy); var iframe = appendIframeToBody(url_with_params); iframe.addEventListener("load", function listener() { - if ((iframe.contentWindow !== null) && - (iframe.contentWindow.location.toString() === url_with_params)) { + if ((iframe.contentDocument !== null) && + (iframe.contentDocument.location.toString() === url_with_params)) { return; } From 5348b63e3833f3251bb5ef110a3f14dd581b60c9 Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Fri, 10 Feb 2017 17:24:44 -0600 Subject: [PATCH 2/2] Implement setter for document.domain --- components/constellation/constellation.rs | 3 + components/net_traits/pub_domains.rs | 5 +- components/script/dom/document.rs | 85 ++++++++++++++++++- components/script/dom/history.rs | 8 +- components/script/dom/htmliframeelement.rs | 8 +- components/script/dom/location.rs | 2 +- components/script/dom/webidls/Document.webidl | 2 +- components/script/dom/webidls/History.webidl | 2 +- components/script/dom/window.rs | 30 ++++--- components/script/script_thread.rs | 2 +- tests/wpt/metadata/MANIFEST.json | 19 +++++ .../wpt/metadata/html/dom/interfaces.html.ini | 3 - .../iframe_sandbox_allow_script.html.ini | 3 +- .../parsing/html5lib_adoption02.html.ini | 11 --- .../parsing/html5lib_comments01.html.ini | 11 --- .../parsing/html5lib_doctype01.html.ini | 11 --- .../parsing/html5lib_domjs-unsafe.html.ini | 11 --- .../parsing/html5lib_entities01.html.ini | 11 --- .../parsing/html5lib_entities02.html.ini | 11 --- .../parsing/html5lib_html5test-com.html.ini | 11 --- .../syntax/parsing/html5lib_inbody01.html.ini | 11 --- .../html5lib_innerHTML_tests4.html.ini | 14 --- .../html5lib_innerHTML_tests6.html.ini | 14 --- .../html5lib_innerHTML_tests7.html.ini | 14 --- ...l5lib_innerHTML_tests_innerHTML_1.html.ini | 14 --- .../syntax/parsing/html5lib_isindex.html.ini | 11 --- .../parsing/html5lib_main-element.html.ini | 11 --- .../html5lib_menuitem-element.html.ini | 68 --------------- .../html5lib_namespace-sensitivity.html.ini | 11 --- ...ng-spec-changes-plain-text-unsafe.html.ini | 11 --- .../html5lib_pending-spec-changes.html.ini | 11 --- .../html5lib_plain-text-unsafe.html.ini | 11 --- .../syntax/parsing/html5lib_ruby.html.ini | 71 ---------------- .../parsing/html5lib_scriptdata01.html.ini | 11 --- .../html5lib_scripted_adoption01.html.ini | 11 --- .../parsing/html5lib_scripted_ark.html.ini | 11 --- .../html5lib_scripted_webkit01.html.ini | 11 --- .../syntax/parsing/html5lib_tables01.html.ini | 11 --- .../syntax/parsing/html5lib_tests1.html.ini | 11 --- .../syntax/parsing/html5lib_tests10.html.ini | 11 --- .../syntax/parsing/html5lib_tests11.html.ini | 11 --- .../syntax/parsing/html5lib_tests12.html.ini | 11 --- .../syntax/parsing/html5lib_tests14.html.ini | 11 --- .../syntax/parsing/html5lib_tests15.html.ini | 11 --- .../syntax/parsing/html5lib_tests16.html.ini | 11 --- .../syntax/parsing/html5lib_tests17.html.ini | 11 --- .../syntax/parsing/html5lib_tests18.html.ini | 11 --- .../syntax/parsing/html5lib_tests19.html.ini | 11 --- .../syntax/parsing/html5lib_tests2.html.ini | 11 --- .../syntax/parsing/html5lib_tests21.html.ini | 11 --- .../syntax/parsing/html5lib_tests22.html.ini | 11 --- .../syntax/parsing/html5lib_tests23.html.ini | 11 --- .../syntax/parsing/html5lib_tests24.html.ini | 11 --- .../syntax/parsing/html5lib_tests25.html.ini | 11 --- .../syntax/parsing/html5lib_tests26.html.ini | 11 --- .../syntax/parsing/html5lib_tests3.html.ini | 11 --- .../syntax/parsing/html5lib_tests5.html.ini | 11 --- .../syntax/parsing/html5lib_tests6.html.ini | 11 --- .../syntax/parsing/html5lib_tests7.html.ini | 11 --- .../syntax/parsing/html5lib_tests8.html.ini | 11 --- .../syntax/parsing/html5lib_tests9.html.ini | 11 --- .../syntax/parsing/html5lib_tricky01.html.ini | 11 --- .../syntax/parsing/html5lib_webkit01.html.ini | 11 --- .../syntax/parsing/html5lib_webkit02.html.ini | 11 --- ...ument-open-same-origin-domain.sub.html.ini | 5 -- tests/wpt/metadata/workers/data-url.html.ini | 6 -- .../document_domain_setter.html | 68 +++++++++++++++ .../document_domain_setter_iframe.html | 12 +++ 68 files changed, 217 insertions(+), 736 deletions(-) delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_adoption02.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_comments01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_doctype01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_domjs-unsafe.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_entities01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_entities02.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_html5test-com.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_inbody01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests4.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests6.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests7.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests_innerHTML_1.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_isindex.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_main-element.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_menuitem-element.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_namespace-sensitivity.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes-plain-text-unsafe.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_plain-text-unsafe.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_ruby.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_scriptdata01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_adoption01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_ark.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_webkit01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tables01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests1.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests10.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests11.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests12.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests14.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests15.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests16.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests17.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests18.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests19.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests2.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests21.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests22.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests23.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests24.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests25.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests26.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests3.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests5.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests6.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests7.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests8.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tests9.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_tricky01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_webkit01.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini delete mode 100644 tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub.html.ini delete mode 100644 tests/wpt/metadata/workers/data-url.html.ini create mode 100644 tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_iframe.html diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index ca2f871472f..9d3a1cb517b 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -600,6 +600,8 @@ impl Constellation None => self.root_frame_id, }; + debug!("Creating new pipeline {} in top-level frame {}.", pipeline_id, top_level_frame_id); + let (event_loop, host) = match sandbox { IFrameSandboxState::IFrameSandboxed => (None, None), IFrameSandboxState::IFrameUnsandboxed => match reg_host(&load_data.url) { @@ -673,6 +675,7 @@ impl Constellation }; if let Some(host) = host { + debug!("Adding new host entry {} for top-level frame {}.", host, top_level_frame_id); self.event_loops.entry(top_level_frame_id) .or_insert_with(HashMap::new) .insert(host, Rc::downgrade(&pipeline.event_loop)); diff --git a/components/net_traits/pub_domains.rs b/components/net_traits/pub_domains.rs index c98f10d90eb..613b60c3c0c 100644 --- a/components/net_traits/pub_domains.rs +++ b/components/net_traits/pub_domains.rs @@ -146,11 +146,10 @@ pub fn is_reg_domain(domain: &str) -> bool { /// Returns None if the URL has no host name. /// Returns the registered suffix for the host name if it is a domain. /// Leaves the host name alone if it is an IP address. -pub fn reg_host<'a>(url: &'a ServoUrl) -> Option { +pub fn reg_host(url: &ServoUrl) -> Option { match url.origin() { ImmutableOrigin::Tuple(_, Host::Domain(domain), _) => Some(Host::Domain(String::from(reg_suffix(&*domain)))), - ImmutableOrigin::Tuple(_, Host::Ipv4(address), _) => Some(Host::Ipv4(address)), - ImmutableOrigin::Tuple(_, Host::Ipv6(address), _) => Some(Host::Ipv6(address)), + ImmutableOrigin::Tuple(_, ip, _) => Some(ip), ImmutableOrigin::Opaque(_) => None, } } diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index ac3b715802f..5041c7f23c0 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -103,6 +103,7 @@ use msg::constellation_msg::{FrameId, Key, KeyModifiers, KeyState}; use net_traits::{FetchResponseMsg, IpcSend, ReferrerPolicy}; use net_traits::CookieSource::NonHTTP; use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl}; +use net_traits::pub_domains::is_pub_domain; use net_traits::request::RequestInit; use net_traits::response::HttpsState; use num_traits::ToPrimitive; @@ -1988,6 +1989,55 @@ impl LayoutDocumentHelpers for LayoutJS { } } +// https://html.spec.whatwg.org/multipage/#is-a-registrable-domain-suffix-of-or-is-equal-to +// The spec says to return a bool, we actually return an Option containing +// the parsed host in the successful case, to avoid having to re-parse the host. +fn get_registrable_domain_suffix_of_or_is_equal_to(host_suffix_string: &str, original_host: Host) -> Option { + // Step 1 + if host_suffix_string.is_empty() { + return None; + } + + // Step 2-3. + let host = match Host::parse(host_suffix_string) { + Ok(host) => host, + Err(_) => return None, + }; + + // Step 4. + if host != original_host { + // Step 4.1 + let host = match host { + Host::Domain(ref host) => host, + _ => return None, + }; + let original_host = match original_host { + Host::Domain(ref original_host) => original_host, + _ => return None, + }; + + // Step 4.2 + let (prefix, suffix) = match original_host.len().checked_sub(host.len()) { + Some(index) => original_host.split_at(index), + None => return None, + }; + if !prefix.ends_with(".") { + return None; + } + if suffix != host { + return None; + } + + // Step 4.3 + if is_pub_domain(host) { + return None; + } + } + + // Step 5 + Some(host) +} + /// https://url.spec.whatwg.org/#network-scheme fn url_has_network_scheme(url: &ServoUrl) -> bool { match url.scheme() { @@ -2472,7 +2522,7 @@ impl DocumentMethods for Document { false } - // https://html.spec.whatwg.org/multipage/#relaxing-the-same-origin-restriction + // https://html.spec.whatwg.org/multipage/#dom-document-domain fn Domain(&self) -> DOMString { // Step 1. if !self.has_browsing_context { @@ -2489,6 +2539,35 @@ impl DocumentMethods for Document { } } + // https://html.spec.whatwg.org/multipage/#dom-document-domain + fn SetDomain(&self, value: DOMString) -> ErrorResult { + // Step 1. + if !self.has_browsing_context { + return Err(Error::Security); + } + + // TODO: Step 2. "If this Document object's active sandboxing + // flag set has its sandboxed document.domain browsing context + // flag set, then throw a "SecurityError" DOMException." + + // Steps 3-4. + let effective_domain = match self.origin.effective_domain() { + Some(effective_domain) => effective_domain, + None => return Err(Error::Security), + }; + + // Step 5 + let host = match get_registrable_domain_suffix_of_or_is_equal_to(&*value, effective_domain) { + None => return Err(Error::Security), + Some(host) => host, + }; + + // Step 6 + self.origin.set_domain(host); + + Ok(()) + } + // https://html.spec.whatwg.org/multipage/#dom-document-referrer fn Referrer(&self) -> DOMString { match self.referrer { @@ -3396,10 +3475,10 @@ impl DocumentMethods for Document { let entry_responsible_document = GlobalScope::entry().as_window().Document(); - // This check should probably be same-origin-domain + // This check is same-origin not same-origin-domain. // https://github.com/whatwg/html/issues/2282 // https://github.com/whatwg/html/pull/2288 - if !self.origin.same_origin_domain(&entry_responsible_document.origin) { + if !self.origin.same_origin(&entry_responsible_document.origin) { // Step 4. return Err(Error::Security); } diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs index f034a604174..537e9cbbb22 100644 --- a/components/script/dom/history.rs +++ b/components/script/dom/history.rs @@ -4,7 +4,9 @@ use dom::bindings::codegen::Bindings::HistoryBinding; use dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods; +use dom::bindings::codegen::Bindings::LocationBinding::LocationBinding::LocationMethods; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; +use dom::bindings::error::Fallible; use dom::bindings::inheritance::Castable; use dom::bindings::js::{JS, Root}; use dom::bindings::reflector::{Reflector, reflect_dom_object}; @@ -58,17 +60,17 @@ impl HistoryMethods for History { } // https://html.spec.whatwg.org/multipage/#dom-history-go - fn Go(&self, delta: i32) { + fn Go(&self, delta: i32) -> Fallible<()> { let direction = if delta > 0 { TraversalDirection::Forward(delta as usize) } else if delta < 0 { TraversalDirection::Back(-delta as usize) } else { - self.window.Location().reload_without_origin_check(); - return; + return self.window.Location().Reload(); }; self.traverse_history(direction); + Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-history-back diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 5e9891bdcc4..599f2f69c36 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -498,11 +498,7 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { // https://html.spec.whatwg.org/multipage/#dom-iframe-contentwindow fn GetContentWindow(&self) -> Option> { - if self.pipeline_id.get().is_some() { - ScriptThread::find_browsing_context(self.frame_id) - } else { - None - } + self.pipeline_id.get().and_then(|_| ScriptThread::find_browsing_context(self.frame_id)) } // https://html.spec.whatwg.org/multipage/#dom-iframe-contentdocument @@ -514,6 +510,8 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { Some(pipeline_id) => pipeline_id, }; // Step 2-3. + // Note that this lookup will fail if the document is dissimilar-origin, + // so we should return None in that case. let document = match ScriptThread::find_document(pipeline_id) { None => return None, Some(document) => document, diff --git a/components/script/dom/location.rs b/components/script/dom/location.rs index 3e3a3176cf0..399e3748722 100644 --- a/components/script/dom/location.rs +++ b/components/script/dom/location.rs @@ -65,7 +65,7 @@ impl Location { impl LocationMethods for Location { // https://html.spec.whatwg.org/multipage/#dom-location-assign fn Assign(&self, url: USVString) -> ErrorResult { - // Note: no call to self.check_same_origin_domain() + try!(self.check_same_origin_domain()); // TODO: per spec, we should use the _API base URL_ specified by the // _entry settings object_. let base_url = self.window.get_url(); diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index 46e5ce05abf..e3c67851011 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -81,7 +81,7 @@ partial /*sealed*/ interface Document { // resource metadata management [/*PutForwards=href, */Unforgeable] readonly attribute Location? location; - readonly attribute DOMString domain; + [SetterThrows] attribute DOMString domain; readonly attribute DOMString referrer; [Throws] attribute DOMString cookie; diff --git a/components/script/dom/webidls/History.webidl b/components/script/dom/webidls/History.webidl index c0c1635264a..56171470877 100644 --- a/components/script/dom/webidls/History.webidl +++ b/components/script/dom/webidls/History.webidl @@ -10,7 +10,7 @@ interface History { readonly attribute unsigned long length; // attribute ScrollRestoration scrollRestoration; // readonly attribute any state; - void go(optional long delta = 0); + [Throws] void go(optional long delta = 0); void back(); void forward(); // void pushState(any data, DOMString title, optional USVString? url = null); diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 2be65b4160c..50a2a57c41e 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -42,7 +42,7 @@ use dom::location::Location; use dom::mediaquerylist::{MediaQueryList, WeakMediaQueryListVec}; use dom::messageevent::MessageEvent; use dom::navigator::Navigator; -use dom::node::{Node, from_untrusted_node_address, document_from_node, window_from_node, NodeDamage}; +use dom::node::{Node, NodeDamage, document_from_node, from_untrusted_node_address, window_from_node}; use dom::performance::Performance; use dom::promise::Promise; use dom::screen::Screen; @@ -529,19 +529,23 @@ impl WindowMethods for Window { // https://html.spec.whatwg.org/multipage/#dom-frameelement fn GetFrameElement(&self) -> Option> { // Steps 1-3. - if let Some(context) = self.browsing_context.get() { - // Step 4-5. - if let Some(container) = context.frame_element() { - // Step 6. - let container_doc = document_from_node(container); - let current_doc = GlobalScope::current().as_window().Document(); - if current_doc.origin().same_origin_domain(container_doc.origin()) { - // Step 7. - return Some(Root::from_ref(container)); - } - } + let context = match self.browsing_context.get() { + None => return None, + Some(context) => context, + }; + // Step 4-5. + let container = match context.frame_element() { + None => return None, + Some(container) => container, + }; + // Step 6. + let container_doc = document_from_node(container); + let current_doc = GlobalScope::current().as_window().Document(); + if !current_doc.origin().same_origin_domain(container_doc.origin()) { + return None; } - None + // Step 7. + Some(Root::from_ref(container)) } // https://html.spec.whatwg.org/multipage/#dom-navigator diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 15604c5b7cf..97d1c36d637 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1355,7 +1355,7 @@ impl ScriptThread { /// Handles activity change message fn handle_set_document_activity_msg(&self, id: PipelineId, activity: DocumentActivity) { - debug!("Setting activity of {} to be {:?}.", id, activity); + debug!("Setting activity of {} to be {:?} in {:?}.", id, activity, thread::current().name()); let document = self.documents.borrow().find_document(id); if let Some(document) = document { document.set_activity(activity); diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 975eb852e8f..e760fc86e06 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -45200,6 +45200,11 @@ {} ] ], + "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_iframe.html": [ + [ + {} + ] + ], "html/browsers/sandboxing/.gitkeep": [ [ {} @@ -89305,6 +89310,12 @@ {} ] ], + "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html": [ + [ + "/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html", + {} + ] + ], "html/browsers/sandboxing/sandbox-allow-same-origin.html": [ [ "/html/browsers/sandboxing/sandbox-allow-same-origin.html", @@ -166892,6 +166903,14 @@ "9839a9c24ce78ec42da8a60d2175df06e19983c1", "testharness" ], + "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html": [ + "1f0408464d8d98341c9537c3e3356cacbcf2f489", + "testharness" + ], + "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_iframe.html": [ + "d33427abcc87693bce1f5610f460aad12cb99759", + "support" + ], "html/browsers/sandboxing/.gitkeep": [ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index 9d198261b01..e5cd8989a31 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -1,8 +1,5 @@ [interfaces.html] type: testharness - [Document interface: attribute domain] - expected: FAIL - [Document interface: attribute dir] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini index be4402dbca6..50e5f5e4ec3 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html.ini @@ -1,6 +1,7 @@ [iframe_sandbox_allow_script.html] type: testharness - expected: TIMEOUT + expected: ERROR + bug: https://github.com/servo/servo/issues/14368 [iframe_sandbox_allow_scripts] expected: NOTRUN diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_adoption02.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_adoption02.html.ini deleted file mode 100644 index eac3411d62f..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_adoption02.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_adoption02.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_adoption02.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_adoption02.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_comments01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_comments01.html.ini deleted file mode 100644 index 7defa9d0d5c..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_comments01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_comments01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_comments01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_comments01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_doctype01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_doctype01.html.ini deleted file mode 100644 index 33c39a87d51..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_doctype01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_doctype01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_doctype01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_doctype01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_domjs-unsafe.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_domjs-unsafe.html.ini deleted file mode 100644 index 68a267aa91c..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_domjs-unsafe.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_domjs-unsafe.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_domjs-unsafe.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_domjs-unsafe.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_entities01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_entities01.html.ini deleted file mode 100644 index e69dfdeffd3..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_entities01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_entities01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_entities01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_entities01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_entities02.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_entities02.html.ini deleted file mode 100644 index e7cda5c5808..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_entities02.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_entities02.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_entities02.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_entities02.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_html5test-com.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_html5test-com.html.ini deleted file mode 100644 index 37dba2d22a4..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_html5test-com.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_html5test-com.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_html5test-com.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_html5test-com.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_inbody01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_inbody01.html.ini deleted file mode 100644 index 9e80b67f4f5..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_inbody01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_inbody01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_inbody01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_inbody01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests4.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests4.html.ini deleted file mode 100644 index 39a159d0500..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests4.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[html5lib_innerHTML_tests4.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests4.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests4.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests4.html] - type: testharness diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests6.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests6.html.ini deleted file mode 100644 index 131fa1fa295..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests6.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[html5lib_innerHTML_tests6.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests6.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests6.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests6.html] - type: testharness diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests7.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests7.html.ini deleted file mode 100644 index 09eccaced4d..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests7.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[html5lib_innerHTML_tests7.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests7.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests7.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests7.html] - type: testharness diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests_innerHTML_1.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests_innerHTML_1.html.ini deleted file mode 100644 index b825bb79715..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_innerHTML_tests_innerHTML_1.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[html5lib_innerHTML_tests_innerHTML_1.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests_innerHTML_1.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests_innerHTML_1.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_innerHTML_tests_innerHTML_1.html] - type: testharness diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_isindex.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_isindex.html.ini deleted file mode 100644 index a1949a1b116..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_isindex.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_isindex.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_isindex.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_isindex.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_main-element.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_main-element.html.ini deleted file mode 100644 index a3dfd52d67b..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_main-element.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_main-element.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_main-element.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_main-element.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_menuitem-element.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_menuitem-element.html.ini deleted file mode 100644 index b1f04c4c665..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_menuitem-element.html.ini +++ /dev/null @@ -1,68 +0,0 @@ -[html5lib_menuitem-element.html?run_type=uri] - type: testharness - [html5lib_menuitem-element.html e61b5db0435eb768ec21c1aa7355c649e7969c17] - expected: FAIL - - [html5lib_menuitem-element.html 9c975c544402eed521499270b0e97cfa78f155b0] - expected: FAIL - - [html5lib_menuitem-element.html d46fa11c0107d59c84778beae84f388f55bffc31] - expected: FAIL - - [html5lib_menuitem-element.html afcd3b1e3317ac609ddab924d836ba1e3873b80f] - expected: FAIL - - [html5lib_menuitem-element.html 95c0c6923fe609297c1592f2cb82bb9f2d0f5aed] - expected: FAIL - - [html5lib_menuitem-element.html e2772fe779cbcefb4458f169a0cd495cf7115845] - expected: FAIL - - [html5lib_menuitem-element.html 7a9fa28f6207f045ebb0aa49938debd0c1e7123e] - expected: FAIL - - [html5lib_menuitem-element.html 798bb352d9f256153340661e1277e44674f1026d] - expected: FAIL - - [html5lib_menuitem-element.html f2b5a63d94f108207a7a998216222dc24bea4850] - expected: FAIL - - [html5lib_menuitem-element.html 778c027d06495eb361dd83baa561feb3a21ec3ea] - expected: FAIL - - [html5lib_menuitem-element.html e4670bee2ce790e82c26a33319b7fe082fbbdaea] - expected: FAIL - - [html5lib_menuitem-element.html 79307be24287ca5d0533dfa81b91dd826f5f5e0e] - expected: FAIL - - [html5lib_menuitem-element.html 9b995cb730b12529e8e755e4a0b0a2e73d1dfcfa] - expected: FAIL - - [html5lib_menuitem-element.html d4586cd7706bbb3a5b127c52c1f2861d1a3fb781] - expected: FAIL - - [html5lib_menuitem-element.html e2adbd7bf4c7480343cfb8f69289c824be613853] - expected: FAIL - - [html5lib_menuitem-element.html b56d35c73f38f04ad6fdf51aa88f4b70a93ddc48] - expected: FAIL - - [html5lib_menuitem-element.html 0f95585196dae2b1b5164e8c27897699c464c35f] - expected: FAIL - - [html5lib_menuitem-element.html 03664aa93a55daceccc26d99c0aef841d8862af5] - expected: FAIL - - [html5lib_menuitem-element.html 6d596b9e342db2306365fbdfb7615377c5b26347] - expected: FAIL - - [html5lib_menuitem-element.html 4b712b488be9ee047c139c1b0cd955bae990b8e5] - expected: FAIL - - -[html5lib_menuitem-element.html?run_type=write_single] - type: testharness - -[html5lib_menuitem-element.html?run_type=write] - type: testharness diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_namespace-sensitivity.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_namespace-sensitivity.html.ini deleted file mode 100644 index d8a9aeeda11..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_namespace-sensitivity.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_namespace-sensitivity.html?run_type=write] - type: testharness - -[html5lib_namespace-sensitivity.html?run_type=write_single] - type: testharness - -[html5lib_namespace-sensitivity.html?run_type=uri] - type: testharness - [html5lib_namespace-sensitivity.html de0a2051123e97a540e3aeb58375103bda021122] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes-plain-text-unsafe.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes-plain-text-unsafe.html.ini deleted file mode 100644 index 7fc7dac4755..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes-plain-text-unsafe.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_pending-spec-changes-plain-text-unsafe.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_pending-spec-changes-plain-text-unsafe.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_pending-spec-changes-plain-text-unsafe.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes.html.ini deleted file mode 100644 index 54e4bbc0da2..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_pending-spec-changes.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_pending-spec-changes.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_pending-spec-changes.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_pending-spec-changes.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_plain-text-unsafe.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_plain-text-unsafe.html.ini deleted file mode 100644 index b14d95df56c..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_plain-text-unsafe.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_plain-text-unsafe.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_plain-text-unsafe.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_plain-text-unsafe.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_ruby.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_ruby.html.ini deleted file mode 100644 index 036c27427f3..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_ruby.html.ini +++ /dev/null @@ -1,71 +0,0 @@ -[html5lib_ruby.html?run_type=write] - type: testharness - -[html5lib_ruby.html?run_type=write_single] - type: testharness - -[html5lib_ruby.html?run_type=uri] - type: testharness - [html5lib_ruby.html 6ee9e8955aa3a8a3af1838c1b728d8392e1cccca] - expected: FAIL - - [html5lib_ruby.html 03bbba49b30ec908e06e3c84e1fcede1ac7508ff] - expected: FAIL - - [html5lib_ruby.html de7c3ce0c3484dc3a111d00c34c68f7dea8a013a] - expected: FAIL - - [html5lib_ruby.html 720c6bad03d4e4fd5ec7cb06bf4ec8ba5f277486] - expected: FAIL - - [html5lib_ruby.html b3640f1eae210be30f138bbc6dc71e0864240224] - expected: FAIL - - [html5lib_ruby.html 3179776aceeadf1740d71e2d2e6385bb84ab97c0] - expected: FAIL - - [html5lib_ruby.html d26f2542fc6fcee4e737b578c8db716a96a22ade] - expected: FAIL - - [html5lib_ruby.html 17d5c46418a50b35d893516440b0e091c31bd581] - expected: FAIL - - [html5lib_ruby.html da1e119d0642e3b82a3537326a3fbc3b8c4e9706] - expected: FAIL - - [html5lib_ruby.html bb2028f026500e8f77bd3b8e1f906c28045e6f20] - expected: FAIL - - [html5lib_ruby.html c78f8740b860a39eb27035e19e29b240d0bfa4a8] - expected: FAIL - - [html5lib_ruby.html 9e880cf547d015ef52c3377064a9afd92ba26afe] - expected: FAIL - - [html5lib_ruby.html 9ed529d1072800af3fcccf268b41d6594480b749] - expected: FAIL - - [html5lib_ruby.html 42a6c56b0abc484cbc3d2b7517551c4aa3efc5d3] - expected: FAIL - - [html5lib_ruby.html 139a1e8af17546b7964354779331960096481b3c] - expected: FAIL - - [html5lib_ruby.html 0050f08d71e8dd050d8129afe674b580387468d9] - expected: FAIL - - [html5lib_ruby.html 5f9f25a089e72b4a4e5d7ebbacb440349c53f52f] - expected: FAIL - - [html5lib_ruby.html 099a0a617119e858c8e716e0ea9854ed1198ccf1] - expected: FAIL - - [html5lib_ruby.html 2cca13809bffb5fa34d03ad73d5727b75d2f96b5] - expected: FAIL - - [html5lib_ruby.html f08a5ba63069cc6eb3804d94ec59b8b33e6f9b91] - expected: FAIL - - [html5lib_ruby.html 606924ac3b043141563d94141973a11eda8015ab] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_scriptdata01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_scriptdata01.html.ini deleted file mode 100644 index 044516e7fe6..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_scriptdata01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_scriptdata01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scriptdata01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scriptdata01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_adoption01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_adoption01.html.ini deleted file mode 100644 index ba1580b7981..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_adoption01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_scripted_adoption01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scripted_adoption01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scripted_adoption01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_ark.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_ark.html.ini deleted file mode 100644 index 86d58d6326b..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_ark.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_scripted_ark.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scripted_ark.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scripted_ark.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_webkit01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_webkit01.html.ini deleted file mode 100644 index 37bf64000a5..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_scripted_webkit01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_scripted_webkit01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scripted_webkit01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_scripted_webkit01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tables01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tables01.html.ini deleted file mode 100644 index 065fa9b20b5..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tables01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tables01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tables01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tables01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests1.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests1.html.ini deleted file mode 100644 index 14cb43fac54..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests1.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests1.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests1.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests1.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests10.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests10.html.ini deleted file mode 100644 index 945ad33a479..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests10.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests10.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests10.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests10.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests11.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests11.html.ini deleted file mode 100644 index 494f748d349..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests11.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests11.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests11.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests11.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests12.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests12.html.ini deleted file mode 100644 index 3d76d84e83e..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests12.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests12.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests12.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests12.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests14.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests14.html.ini deleted file mode 100644 index 84a26e5e692..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests14.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests14.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests14.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests14.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests15.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests15.html.ini deleted file mode 100644 index 26a4d5bc5af..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests15.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests15.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests15.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests15.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests16.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests16.html.ini deleted file mode 100644 index ccae170a886..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests16.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests16.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests16.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests16.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests17.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests17.html.ini deleted file mode 100644 index 42808206564..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests17.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests17.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests17.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests17.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests18.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests18.html.ini deleted file mode 100644 index e28e37b2256..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests18.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests18.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests18.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests18.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests19.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests19.html.ini deleted file mode 100644 index 18a6fedc403..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests19.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests19.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests19.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests19.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests2.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests2.html.ini deleted file mode 100644 index f459beff871..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests2.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests2.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests2.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests2.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests21.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests21.html.ini deleted file mode 100644 index e1dcbf18626..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests21.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests21.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests21.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests21.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests22.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests22.html.ini deleted file mode 100644 index c389e3d2c95..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests22.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests22.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests22.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests22.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests23.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests23.html.ini deleted file mode 100644 index 526c981bf34..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests23.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests23.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests23.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests23.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests24.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests24.html.ini deleted file mode 100644 index 4d7ad8f53dc..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests24.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests24.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests24.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests24.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests25.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests25.html.ini deleted file mode 100644 index 459a1c90805..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests25.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests25.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests25.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests25.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests26.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests26.html.ini deleted file mode 100644 index 6dec0cea81d..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests26.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests26.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests26.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests26.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests3.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests3.html.ini deleted file mode 100644 index ac89200ff78..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests3.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests3.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests3.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests3.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests5.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests5.html.ini deleted file mode 100644 index 7fb35f3a301..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests5.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests5.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests5.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests5.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests6.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests6.html.ini deleted file mode 100644 index 8f74d1648ef..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests6.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests6.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests6.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests6.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests7.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests7.html.ini deleted file mode 100644 index 930baf50f27..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests7.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests7.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests7.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests7.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests8.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests8.html.ini deleted file mode 100644 index 7a626b1d624..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests8.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests8.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests8.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests8.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests9.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests9.html.ini deleted file mode 100644 index 7639694d3a7..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests9.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tests9.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests9.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tests9.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tricky01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tricky01.html.ini deleted file mode 100644 index 1b5264c5d7a..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tricky01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_tricky01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tricky01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_tricky01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit01.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit01.html.ini deleted file mode 100644 index a6d7137016c..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit01.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_webkit01.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_webkit01.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_webkit01.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini deleted file mode 100644 index 81b8cb7ab25..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[html5lib_webkit02.html?run_type=uri] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_webkit02.html?run_type=write] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 - -[html5lib_webkit02.html?run_type=write_single] - type: testharness - disabled: https://github.com/servo/servo/issues/9329 diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub.html.ini deleted file mode 100644 index 6e9d69182c8..00000000000 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[origin-check-in-document-open-same-origin-domain.sub.html] - type: testharness - [It should not be possible to open same origin-domain (but not same origin) documents.] - expected: FAIL - diff --git a/tests/wpt/metadata/workers/data-url.html.ini b/tests/wpt/metadata/workers/data-url.html.ini deleted file mode 100644 index 315740342a1..00000000000 --- a/tests/wpt/metadata/workers/data-url.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[data-url.html] - type: testharness - expected: ERROR - [worker has opaque origin] - expected: FAIL - diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html b/tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html new file mode 100644 index 00000000000..bf5b0bc84fd --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html @@ -0,0 +1,68 @@ + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_iframe.html b/tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_iframe.html new file mode 100644 index 00000000000..d3d5260af3f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_iframe.html @@ -0,0 +1,12 @@ + + + + + + + + + +