diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2014-10-17 09:48:31 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2014-10-29 14:31:47 -0700 |
commit | fe123ad07ce048c11c2820481c9fd54ce296202d (patch) | |
tree | 920d2a5cf4ca502aa1e6a2b761528c4080af9b84 | |
parent | 65a0d1fe9a14e09b675cc24cb59c9aebf1615020 (diff) | |
download | servo-fe123ad07ce048c11c2820481c9fd54ce296202d.tar.gz servo-fe123ad07ce048c11c2820481c9fd54ce296202d.zip |
Switch to synchronous script loading
This removes the old code for asyncronously loading scripts during HTML
parsing and then executing them afterward.
Fixes #3356.
39 files changed, 284 insertions, 1006 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 90c0ae5a5c4..76505df7148 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -55,7 +55,7 @@ use dom::range::Range; use dom::treewalker::TreeWalker; use dom::uievent::UIEvent; use dom::window::{Window, WindowHelpers}; -use parse::html::build_element_from_tag; +use parse::html::{build_element_from_tag, ScriptCreated}; use servo_util::namespace; use servo_util::str::{DOMString, split_html_space_chars}; @@ -529,7 +529,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> { } let local_name = local_name.as_slice().to_ascii_lower(); let name = QualName::new(ns!(HTML), Atom::from_slice(local_name.as_slice())); - Ok(build_element_from_tag(name, None, self)) + Ok(build_element_from_tag(name, None, self, ScriptCreated)) } // http://dom.spec.whatwg.org/#dom-document-createelementns @@ -574,7 +574,8 @@ impl<'a> DocumentMethods for JSRef<'a, Document> { if ns == ns!(HTML) { let name = QualName::new(ns!(HTML), Atom::from_slice(local_name_from_qname)); - Ok(build_element_from_tag(name, prefix_from_qname.map(|s| s.to_string()), self)) + Ok(build_element_from_tag(name, prefix_from_qname.map(|s| s.to_string()), self, + ScriptCreated)) } else { Ok(Element::new(local_name_from_qname.to_string(), ns, prefix_from_qname.map(|s| s.to_string()), self)) diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index 9c20435f67a..19731e3932f 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -2,12 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use dom::attr::Attr; +use dom::attr::AttrHelpers; use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use dom::bindings::codegen::Bindings::HTMLScriptElementBinding; use dom::bindings::codegen::Bindings::HTMLScriptElementBinding::HTMLScriptElementMethods; use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use dom::bindings::codegen::InheritTypes::HTMLScriptElementDerived; -use dom::bindings::codegen::InheritTypes::{ElementCast, NodeCast}; +use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast, NodeCast}; use dom::bindings::js::{JSRef, Temporary, OptionalRootable}; use dom::bindings::utils::{Reflectable, Reflector}; use dom::document::Document; @@ -15,10 +17,12 @@ use dom::element::{HTMLScriptElementTypeId, Element, AttributeHandlers}; use dom::eventtarget::{EventTarget, NodeTargetTypeId}; use dom::htmlelement::HTMLElement; use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node}; +use dom::virtualmethods::VirtualMethods; use dom::window::WindowHelpers; use encoding::all::UTF_8; use encoding::types::{Encoding, DecodeReplace}; +use parse::html::{ElementCreator, ParserCreated}; use servo_net::resource_task::load_whole_resource; use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS, StaticStringVec}; use std::cell::Cell; @@ -53,20 +57,20 @@ impl HTMLScriptElementDerived for EventTarget { impl HTMLScriptElement { fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>, - parser_inserted: bool) -> HTMLScriptElement { + creator: ElementCreator) -> HTMLScriptElement { HTMLScriptElement { htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, prefix, document), already_started: Cell::new(false), - parser_inserted: Cell::new(parser_inserted), - non_blocking: Cell::new(!parser_inserted), + parser_inserted: Cell::new(creator == ParserCreated), + non_blocking: Cell::new(creator != ParserCreated), ready_to_be_parser_executed: Cell::new(false), } } #[allow(unrooted_must_root)] pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>, - parser_inserted: bool) -> Temporary<HTMLScriptElement> { - let element = HTMLScriptElement::new_inherited(localName, prefix, document, parser_inserted); + creator: ElementCreator) -> Temporary<HTMLScriptElement> { + let element = HTMLScriptElement::new_inherited(localName, prefix, document, creator); Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap) } } @@ -77,6 +81,9 @@ pub trait HTMLScriptElementHelpers { /// Prepare a script, steps 6 and 7. fn is_javascript(self) -> bool; + + /// Set the "already started" flag (<https://whatwg.org/html/#already-started>) + fn mark_already_started(self); } /// Supported script types as defined by @@ -232,6 +239,50 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> { } } } + + fn mark_already_started(self) { + self.already_started.set(true); + } +} + +impl<'a> VirtualMethods for JSRef<'a, HTMLScriptElement> { + fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { + let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); + Some(htmlelement as &VirtualMethods) + } + + fn after_set_attr(&self, attr: JSRef<Attr>) { + match self.super_type() { + Some(ref s) => s.after_set_attr(attr), + _ => (), + } + let node: JSRef<Node> = NodeCast::from_ref(*self); + if attr.local_name() == &atom!("src") && !self.parser_inserted.get() && node.is_in_doc() { + self.prepare(); + } + } + + fn child_inserted(&self, child: JSRef<Node>) { + match self.super_type() { + Some(ref s) => s.child_inserted(child), + _ => (), + } + let node: JSRef<Node> = NodeCast::from_ref(*self); + if !self.parser_inserted.get() && node.is_in_doc() { + self.prepare(); + } + } + + fn bind_to_tree(&self, tree_in_doc: bool) { + match self.super_type() { + Some(ref s) => s.bind_to_tree(tree_in_doc), + _ => () + } + + if tree_in_doc && !self.parser_inserted.get() { + self.prepare(); + } + } } impl<'a> HTMLScriptElementMethods for JSRef<'a, HTMLScriptElement> { diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 7748ee13ccc..38884630e3b 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -45,7 +45,7 @@ use dom::text::Text; use dom::virtualmethods::{VirtualMethods, vtable_for}; use dom::window::Window; use geom::rect::Rect; -use parse::html::build_element_from_tag; +use parse::html::{build_element_from_tag, ScriptCreated}; use layout_interface::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC, LayoutChan, ReapLayoutDataMsg}; use devtools_traits::NodeInfo; @@ -1521,7 +1521,7 @@ impl Node { local: element.local_name().clone() }; let element = build_element_from_tag(name, - Some(element.prefix().as_slice().to_string()), *document); + Some(element.prefix().as_slice().to_string()), *document, ScriptCreated); NodeCast::from_temporary(element) }, TextNodeTypeId => { diff --git a/components/script/dom/servohtmlparser.rs b/components/script/dom/servohtmlparser.rs index f88c0777437..b16b02cfdcc 100644 --- a/components/script/dom/servohtmlparser.rs +++ b/components/script/dom/servohtmlparser.rs @@ -13,7 +13,6 @@ use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::node::TrustedNodeAddress; use dom::document::{Document, DocumentHelpers}; -use parse::html::JSMessage; use parse::Parser; use servo_util::task_state; @@ -28,7 +27,6 @@ use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts}; #[must_root] #[jstraceable] pub struct Sink { - pub js_chan: Sender<JSMessage>, pub base_url: Option<Url>, pub document: JS<Document>, } @@ -55,11 +53,9 @@ impl Parser for ServoHTMLParser{ impl ServoHTMLParser { #[allow(unrooted_must_root)] - pub fn new(js_chan: Sender<JSMessage>, base_url: Option<Url>, document: JSRef<Document>) - -> Temporary<ServoHTMLParser> { + pub fn new(base_url: Option<Url>, document: JSRef<Document>) -> Temporary<ServoHTMLParser> { let window = document.window().root(); let sink = Sink { - js_chan: js_chan, base_url: base_url, document: JS::from_rooted(document), }; diff --git a/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs index edde69f8f10..e5f20f99f06 100644 --- a/components/script/dom/virtualmethods.rs +++ b/components/script/dom/virtualmethods.rs @@ -18,6 +18,7 @@ use dom::bindings::codegen::InheritTypes::HTMLLinkElementCast; use dom::bindings::codegen::InheritTypes::HTMLObjectElementCast; use dom::bindings::codegen::InheritTypes::HTMLOptGroupElementCast; use dom::bindings::codegen::InheritTypes::HTMLOptionElementCast; +use dom::bindings::codegen::InheritTypes::HTMLScriptElementCast; use dom::bindings::codegen::InheritTypes::HTMLSelectElementCast; use dom::bindings::codegen::InheritTypes::HTMLStyleElementCast; use dom::bindings::codegen::InheritTypes::HTMLTableCellElementCast; @@ -37,6 +38,7 @@ use dom::element::HTMLLinkElementTypeId; use dom::element::HTMLObjectElementTypeId; use dom::element::HTMLOptGroupElementTypeId; use dom::element::HTMLOptionElementTypeId; +use dom::element::HTMLScriptElementTypeId; use dom::element::HTMLSelectElementTypeId; use dom::element::HTMLStyleElementTypeId; use dom::element::HTMLTableDataCellElementTypeId; @@ -56,6 +58,7 @@ use dom::htmllinkelement::HTMLLinkElement; use dom::htmlobjectelement::HTMLObjectElement; use dom::htmloptgroupelement::HTMLOptGroupElement; use dom::htmloptionelement::HTMLOptionElement; +use dom::htmlscriptelement::HTMLScriptElement; use dom::htmlselectelement::HTMLSelectElement; use dom::htmlstyleelement::HTMLStyleElement; use dom::htmltablecellelement::HTMLTableCellElement; @@ -189,6 +192,10 @@ pub fn vtable_for<'a>(node: &'a JSRef<'a, Node>) -> &'a VirtualMethods + 'a { let element: &'a JSRef<'a, HTMLOptionElement> = HTMLOptionElementCast::to_borrowed_ref(node).unwrap(); element as &'a VirtualMethods + 'a } + ElementNodeTypeId(HTMLScriptElementTypeId) => { + let element: &'a JSRef<'a, HTMLScriptElement> = HTMLScriptElementCast::to_borrowed_ref(node).unwrap(); + element as &'a VirtualMethods + 'a + } ElementNodeTypeId(HTMLSelectElementTypeId) => { let element: &'a JSRef<'a, HTMLSelectElement> = HTMLSelectElementCast::to_borrowed_ref(node).unwrap(); element as &'a VirtualMethods + 'a diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs index 39001fe8f7f..c802e6de9aa 100644 --- a/components/script/parse/html.rs +++ b/components/script/parse/html.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::attr::AttrHelpers; -use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use dom::bindings::codegen::InheritTypes::{NodeCast, ElementCast, HTMLScriptElementCast}; use dom::bindings::js::{JS, JSRef, Temporary, OptionalRootable, Root}; @@ -23,82 +22,26 @@ use parse::Parser; use encoding::all::UTF_8; use encoding::types::{Encoding, DecodeReplace}; -use servo_net::resource_task::{Load, LoadData, Payload, Done, ResourceTask, load_whole_resource}; +use servo_net::resource_task::{Load, LoadData, Payload, Done, ResourceTask}; use servo_msg::constellation_msg::LoadData as MsgLoadData; -use servo_util::task::spawn_named; use servo_util::task_state; use servo_util::task_state::InHTMLParser; use servo_util::str::DOMString; use std::ascii::StrAsciiExt; -use std::comm::{channel, Sender, Receiver}; +use std::comm::channel; use std::str::MaybeOwned; -use url::{Url, UrlParser}; +use url::Url; use http::headers::HeaderEnum; use time; use html5ever::Attribute; use html5ever::tree_builder::{TreeSink, QuirksMode, NodeOrText, AppendNode, AppendText}; use string_cache::QualName; -pub struct JSFile { - pub data: String, - pub url: Option<Url>, -} - -pub type JSResult = Vec<JSFile>; - pub enum HTMLInput { InputString(String), InputUrl(Url), } -pub enum JSMessage { - JSTaskNewFile(Url), - JSTaskNewInlineScript(String, Option<Url>), - JSTaskExit -} - -/// Messages generated by the HTML parser upon discovery of additional resources -pub enum HtmlDiscoveryMessage { - HtmlDiscoveredScript(JSResult) -} - -pub struct HtmlParserResult { - pub discovery_port: Receiver<HtmlDiscoveryMessage>, -} - -fn js_script_listener(to_parent: Sender<HtmlDiscoveryMessage>, - from_parent: Receiver<JSMessage>, - resource_task: ResourceTask) { - let mut result_vec = vec!(); - - loop { - match from_parent.recv_opt() { - Ok(JSTaskNewFile(url)) => { - match load_whole_resource(&resource_task, url.clone()) { - Err(_) => { - error!("error loading script {:s}", url.serialize()); - } - Ok((metadata, bytes)) => { - let decoded = UTF_8.decode(bytes.as_slice(), DecodeReplace).unwrap(); - result_vec.push(JSFile { - data: decoded.to_string(), - url: Some(metadata.final_url), - }); - } - } - } - Ok(JSTaskNewInlineScript(data, url)) => { - result_vec.push(JSFile { data: data, url: url }); - } - Ok(JSTaskExit) | Err(()) => { - break; - } - } - } - - assert!(to_parent.send_opt(HtmlDiscoveredScript(result_vec)).is_ok()); -} - // Parses an RFC 2616 compliant date/time string, and returns a localized // date/time string in a format suitable for document.lastModified. fn parse_last_modified(timestamp: &str) -> String { @@ -123,9 +66,16 @@ fn parse_last_modified(timestamp: &str) -> String { } } +#[deriving(PartialEq)] +pub enum ElementCreator { + ParserCreated, + ScriptCreated, +} + pub fn build_element_from_tag(name: QualName, prefix: Option<DOMString>, - document: JSRef<Document>) -> Temporary<Element> { + document: JSRef<Document>, + creator: ElementCreator) -> Temporary<Element> { if name.ns != ns!(HTML) { return Element::new(name.local.as_slice().to_string(), name.ns, None, document); } @@ -233,7 +183,7 @@ pub fn build_element_from_tag(name: QualName, atom!("ruby") => make!(HTMLElement), atom!("s") => make!(HTMLElement), atom!("samp") => make!(HTMLElement), - atom!("script") => make!(HTMLScriptElement, true), + atom!("script") => make!(HTMLScriptElement, creator), atom!("section") => make!(HTMLElement), atom!("select") => make!(HTMLSelectElement), atom!("small") => make!(HTMLElement), @@ -307,7 +257,7 @@ impl<'a> TreeSink<TrustedNodeAddress> for servohtmlparser::Sink { fn create_element(&mut self, name: QualName, attrs: Vec<Attribute>) -> TrustedNodeAddress { let doc = self.document.root(); - let elem = build_element_from_tag(name, None, *doc).root(); + let elem = build_element_from_tag(name, None, *doc, ParserCreated).root(); for attr in attrs.into_iter() { elem.set_attribute_from_parser(attr.name, attr.value, None); @@ -378,42 +328,16 @@ impl<'a> TreeSink<TrustedNodeAddress> for servohtmlparser::Sink { error!("remove_from_parent not implemented!"); } - fn mark_script_already_started(&mut self, _node: TrustedNodeAddress) { - error!("mark_script_already_started not implemented!"); + fn mark_script_already_started(&mut self, node: TrustedNodeAddress) { + let node: Root<Node> = unsafe { JS::from_trusted_node_address(node).root() }; + let script: Option<JSRef<HTMLScriptElement>> = HTMLScriptElementCast::to_ref(*node); + script.map(|script| script.mark_already_started()); } fn complete_script(&mut self, node: TrustedNodeAddress) { let node: Root<Node> = unsafe { JS::from_trusted_node_address(node).root() }; - let script: Option<JSRef<HTMLScriptElement>> = - HTMLScriptElementCast::to_ref(*node); - let script = match script { - Some(script) if script.is_javascript() => script, - _ => return, - }; - - let script_element: JSRef<Element> = ElementCast::from_ref(script); - match script_element.get_attribute(ns!(""), &atom!("src")).root() { - Some(src) => { - debug!("found script: {:s}", src.deref().Value()); - let mut url_parser = UrlParser::new(); - match self.base_url { - None => (), - Some(ref base_url) => { - url_parser.base_url(base_url); - } - }; - match url_parser.parse(src.deref().value().as_slice()) { - Ok(new_url) => self.js_chan.send(JSTaskNewFile(new_url)), - Err(e) => debug!("Parsing url {:s} failed: {:?}", src.deref().Value(), e) - }; - } - None => { - let scriptnode: JSRef<Node> = NodeCast::from_ref(script); - let data = Node::collect_text_contents(scriptnode.children()); - debug!("script data = {:?}", data); - self.js_chan.send(JSTaskNewInlineScript(data, self.base_url.clone())); - } - } + let script: Option<JSRef<HTMLScriptElement>> = HTMLScriptElementCast::to_ref(*node); + script.map(|script| script.prepare()); } } @@ -422,17 +346,7 @@ pub fn parse_html(page: &Page, document: JSRef<Document>, input: HTMLInput, resource_task: ResourceTask, - msg_load_data: Option<MsgLoadData>) - -> HtmlParserResult { - // Spawn a JS parser to receive JavaScript. - let (discovery_chan, discovery_port) = channel(); - let resource_task2 = resource_task.clone(); - let js_result_chan = discovery_chan.clone(); - let (js_chan, js_msg_port) = channel(); - spawn_named("parse_html:js", proc() { - js_script_listener(js_result_chan, js_msg_port, resource_task2.clone()); - }); - + msg_load_data: Option<MsgLoadData>) { let (base_url, load_response) = match input { InputUrl(ref url) => { // Wait for the LoadResponse so that the parser knows the final URL. @@ -480,7 +394,7 @@ pub fn parse_html(page: &Page, }, }; - let parser = ServoHTMLParser::new(js_chan.clone(), base_url.clone(), document).root(); + let parser = ServoHTMLParser::new(base_url.clone(), document).root(); let parser: JSRef<ServoHTMLParser> = *parser; task_state::enter(InHTMLParser); @@ -520,9 +434,4 @@ pub fn parse_html(page: &Page, task_state::exit(InHTMLParser); debug!("finished parsing"); - js_chan.send(JSTaskExit); - - HtmlParserResult { - discovery_port: discovery_port, - } } diff --git a/components/script/script_task.rs b/components/script/script_task.rs index cbcdfea03ac..deb6aaded80 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -16,7 +16,6 @@ use dom::bindings::conversions::{FromJSValConvertible, Empty}; use dom::bindings::global; use dom::bindings::js::{JS, JSRef, RootCollection, Temporary, OptionalRootable}; use dom::bindings::trace::JSTraceable; -use dom::bindings::utils::Reflectable; use dom::bindings::utils::{wrap_for_same_compartment, pre_wrap}; use dom::document::{Document, HTMLDocument, DocumentHelpers, FromParser}; use dom::element::{Element, HTMLButtonElementTypeId, HTMLInputElementTypeId}; @@ -29,7 +28,7 @@ use dom::node::{ElementNodeTypeId, Node, NodeHelpers}; use dom::window::{Window, WindowHelpers}; use dom::worker::{Worker, TrustedWorkerAddress}; use dom::xmlhttprequest::{TrustedXHRAddress, XMLHttpRequest, XHRProgress}; -use parse::html::{InputString, InputUrl, HtmlParserResult, HtmlDiscoveredScript, parse_html}; +use parse::html::{InputString, InputUrl, parse_html}; use layout_interface::{ScriptLayoutChan, LayoutChan, ReflowForDisplay}; use layout_interface; use page::{Page, IterablePage, Frame}; @@ -62,7 +61,6 @@ use js::jsapi::{JSContext, JSRuntime, JSTracer}; use js::jsapi::{JS_SetGCParameter, JSGC_MAX_BYTES}; use js::jsapi::{JS_SetGCCallback, JSGCStatus, JSGC_BEGIN, JSGC_END}; use js::rust::{Cx, RtUtils}; -use js::rust::with_compartment; use js; use url::Url; @@ -797,13 +795,6 @@ impl ScriptTask { InputString(strval.unwrap_or("".to_string())) }; - // Parse HTML. - // - // Note: We can parse the next document in parallel with any previous documents. - let HtmlParserResult { discovery_port } - = parse_html(&*page, *document, parser_input, self.resource_task.clone(), - Some(load_data)); - { // Create the root frame. let mut frame = page.mut_frame(); @@ -813,18 +804,9 @@ impl ScriptTask { }); } - document.set_ready_state(DocumentReadyStateValues::Interactive); + parse_html(&*page, *document, parser_input, self.resource_task.clone(), Some(load_data)); - let mut js_scripts = None; - loop { - match discovery_port.recv_opt() { - Ok(HtmlDiscoveredScript(scripts)) => { - assert!(js_scripts.is_none()); - js_scripts = Some(scripts); - } - Err(()) => break - } - } + document.set_ready_state(DocumentReadyStateValues::Interactive); // Kick off the initial reflow of the page. debug!("kicking off initial reflow of {}", url); @@ -841,31 +823,6 @@ impl ScriptTask { *page_url = Some((url.clone(), false)); } - // Receive the JavaScript scripts. - assert!(js_scripts.is_some()); - let js_scripts = js_scripts.take().unwrap(); - debug!("js_scripts: {:?}", js_scripts); - - with_compartment((**cx).ptr, window.reflector().get_jsobject(), || { - // Evaluate every script in the document. - for file in js_scripts.iter() { - let global_obj = window.reflector().get_jsobject(); - let filename = match file.url { - None => String::new(), - Some(ref url) => url.serialize(), - }; - - //FIXME: this should have some kind of error handling, or explicitly - // drop an exception on the floor. - match cx.evaluate_script(global_obj, file.data.clone(), filename, 1) { - Ok(_) => (), - Err(_) => println!("evaluate_script failed") - } - - window.flush_layout(ReflowForDisplay); - } - }); - // https://html.spec.whatwg.org/multipage/#the-end step 4 let event = Event::new(&global::Window(*window), "DOMContentLoaded".to_string(), DoesNotBubble, NotCancelable).root(); diff --git a/tests/content/test_collections.html b/tests/content/test_collections.html index 61cf77ed61f..61215300e6a 100644 --- a/tests/content/test_collections.html +++ b/tests/content/test_collections.html @@ -5,6 +5,64 @@ page </title> <base href="./"></base> <script src="harness.js"></script> +</head> +<body> + +<div id="first" name="test">fffff<br><br><br><br>fffffffffffffffff</div> +<div id="second">ggg</div> +<span id="third" name="test">hhhhhhhh</span> +<div id="fourth">iiiiiiiiiiiiiiiiiii</div> +<a href="http://www.mozilla.org"></a> +<img src="test.jpg"/> +<embed></embed> +<form> + <fieldset> + <legend>legend</legend> + <label for="">label<input type="text" value="input" /></label> + </fieldset> +</form> +<hr /> +<canvas/> +<p>pppppppppp</p> +<q>qqqqqqqqqqqqqqqqqqqqqqqqqqq</q> +<progress max="100" value="80">80%</progress> +<applet></applet> +<input type="text" value="input"/> +<iframe></iframe> +<ol type="1"> + <li>li</li> +</ol> +<table> + <caption>sample table</caption> + <colgroup> + <col/> + </colgroup> + <tbody> + <tr><th>head</th></tr> + <tr><td>data</td></tr> + </tbody> +</table> +<section>section</section> +<aside>aside</aside> +<b>b</b> +<i>i</i> +<small>small</small> +<textarea>textarea</textarea> +<time datetime="2014-02-14">Valentines day</time> +<area></area> +<data></data> +<template></template> +<pre>pre</pre> +<audio> + <source src="horse.ogg" type="audio/ogg"> + <source src="horse.mp3" type="audio/mpeg"> +</audio> +<video src=""> + <track></track> +</video> + +<foo-á>hi</foo-á> + <script> function check_collection(obj, num, classes, name) { is_a(obj, HTMLCollection); @@ -81,63 +139,5 @@ check_tag("foo-á", 1, [HTMLUnknownElement], "FOO-á"); finish(); </script> -</head> -<body> - -<div id="first" name="test">fffff<br><br><br><br>fffffffffffffffff</div> -<div id="second">ggg</div> -<span id="third" name="test">hhhhhhhh</span> -<div id="fourth">iiiiiiiiiiiiiiiiiii</div> -<a href="http://www.mozilla.org"></a> -<img src="test.jpg"/> -<embed></embed> -<form> - <fieldset> - <legend>legend</legend> - <label for="">label<input type="text" value="input" /></label> - </fieldset> -</form> -<hr /> -<canvas/> -<p>pppppppppp</p> -<q>qqqqqqqqqqqqqqqqqqqqqqqqqqq</q> -<progress max="100" value="80">80%</progress> -<applet></applet> -<input type="text" value="input"/> -<iframe></iframe> -<ol type="1"> - <li>li</li> -</ol> -<table> - <caption>sample table</caption> - <colgroup> - <col/> - </colgroup> - <tbody> - <tr><th>head</th></tr> - <tr><td>data</td></tr> - </tbody> -</table> -<section>section</section> -<aside>aside</aside> -<b>b</b> -<i>i</i> -<small>small</small> -<textarea>textarea</textarea> -<time datetime="2014-02-14">Valentines day</time> -<area></area> -<data></data> -<template></template> -<pre>pre</pre> -<audio> - <source src="horse.ogg" type="audio/ogg"> - <source src="horse.mp3" type="audio/mpeg"> -</audio> -<video src=""> - <track></track> -</video> - -<foo-á>hi</foo-á> - </body> </html> diff --git a/tests/content/test_document_adoptNode.html b/tests/content/test_document_adoptNode.html index eef34b80723..e3f36fb7f47 100644 --- a/tests/content/test_document_adoptNode.html +++ b/tests/content/test_document_adoptNode.html @@ -2,6 +2,9 @@ <html> <head> <script src="harness.js"></script> + </head> + <body> + <div id="foo"><div id="bar"></div></div> <script> let foo = document.getElementById("foo"); let doc = document.implementation.createHTMLDocument("title"); @@ -18,8 +21,5 @@ finish(); </script> - </head> - <body> - <div id="foo"><div id="bar"></div></div> </body> </html> diff --git a/tests/content/test_document_links_cache.html b/tests/content/test_document_links_cache.html index ec6525510dc..bf4086ff0cc 100644 --- a/tests/content/test_document_links_cache.html +++ b/tests/content/test_document_links_cache.html @@ -2,6 +2,8 @@ <html> <head> <script src="harness.js"></script> + </head> + <body> <script> var links = document.links; is(links, document.links); @@ -33,5 +35,5 @@ finish(); </script> - </head> + </body> </html> diff --git a/tests/content/test_document_readystate.html b/tests/content/test_document_readystate.html index ef845b69981..911d6043e6f 100644 --- a/tests/content/test_document_readystate.html +++ b/tests/content/test_document_readystate.html @@ -2,14 +2,13 @@ <head> <script src="harness.js"></script> </head> -<!-- gNumChanges should be 2 once synchronous script execution is supported --> -<body onload="is(document.readyState, 'complete'); is(gNumChanges, 1); finish()"> +<body onload="is(document.readyState, 'complete'); is(gNumChanges, 2); finish()"> <script> gNumChanges = 0; document.addEventListener('readystatechange', function() { gNumChanges++; }, true); - is(document.readyState, "interactive"); + is(document.readyState, "loading"); </script> </body> </html> diff --git a/tests/content/test_element_className.html b/tests/content/test_element_className.html index 041b7af2576..743d0f21f20 100644 --- a/tests/content/test_element_className.html +++ b/tests/content/test_element_className.html @@ -2,6 +2,10 @@ <html> <head> <script src="harness.js"></script> + </head> + <body> + <div id="foo-1" class="foo"></div> + <div id="foo-2" class="baz"></div> <script> let foo1 = document.getElementById("foo-1"); let foo2 = document.getElementById("foo-2"); @@ -30,9 +34,5 @@ finish(); </script> - </head> - <body> - <div id="foo-1" class="foo"></div> - <div id="foo-2" class="baz"></div> </body> </html> diff --git a/tests/content/test_enabled_disabled_selectors.html b/tests/content/test_enabled_disabled_selectors.html index e72e768a986..8e0c2c2fd26 100644 --- a/tests/content/test_enabled_disabled_selectors.html +++ b/tests/content/test_enabled_disabled_selectors.html @@ -3,6 +3,54 @@ <head> <title>Tests for :enabled and :disabled selectors</title> <script src="harness.js"></script> + </head> + <body> + <button id="button-1"></button> + <button id="button-2" disabled></button> + + <input id="input-1"></input> + <input id="input-2" disabled></input> + + <option id="option-1"></option> + <option id="option-2" disabled></option> + + <select id="select-1"></select> + <select id="select-2" disabled></select> + + <textarea id="textarea-1"></textarea> + <textarea id="textarea-2" disabled></textarea> + + <optgroup disabled> + <option id="option-3"></option> + </optgroup> + + <fieldset disabled> + <fieldset> + <button id="button-3"></button> + <input id="input-3"></input> + <select id="select-3"></select> + <textarea id="textarea-3"></textarea> + </fieldset> + </fieldset> + + <fieldset disabled> + <legend> + <button id="button-4"></button> + <input id="input-4"></input> + <select id="select-4"></select> + <textarea id="textarea-4"></textarea> + </legend> + </fieldset> + + <fieldset disabled> + <legend></legend> + <legend> + <button id="button-5"></button> + <input id="input-5"></input> + <select id="select-5"></select> + <textarea id="textarea-5"></textarea> + </legend> + </fieldset> <script> { // Simple initialization checks. var list, i, elem; @@ -127,53 +175,5 @@ finish(); </script> - </head> - <body> - <button id="button-1"></button> - <button id="button-2" disabled></button> - - <input id="input-1"></input> - <input id="input-2" disabled></input> - - <option id="option-1"></option> - <option id="option-2" disabled></option> - - <select id="select-1"></select> - <select id="select-2" disabled></select> - - <textarea id="textarea-1"></textarea> - <textarea id="textarea-2" disabled></textarea> - - <optgroup disabled> - <option id="option-3"></option> - </optgroup> - - <fieldset disabled> - <fieldset> - <button id="button-3"></button> - <input id="input-3"></input> - <select id="select-3"></select> - <textarea id="textarea-3"></textarea> - </fieldset> - </fieldset> - - <fieldset disabled> - <legend> - <button id="button-4"></button> - <input id="input-4"></input> - <select id="select-4"></select> - <textarea id="textarea-4"></textarea> - </legend> - </fieldset> - - <fieldset disabled> - <legend></legend> - <legend> - <button id="button-5"></button> - <input id="input-5"></input> - <select id="select-5"></select> - <textarea id="textarea-5"></textarea> - </legend> - </fieldset> </body> </html> diff --git a/tests/content/test_getBoundingClientRect.html b/tests/content/test_getBoundingClientRect.html index 560b92d0a20..c1ad4a81437 100644 --- a/tests/content/test_getBoundingClientRect.html +++ b/tests/content/test_getBoundingClientRect.html @@ -1,25 +1,6 @@ <html> <head> <script src="harness.js"></script> -<script> -is_function(DOMRect, "DOMRect"); - -var elems = document.getElementsByTagName('div'); -var rect = elems[0].getBoundingClientRect(); -is_a(rect, DOMRect); - -geq(rect.top, 100); -geq(rect.bottom, 200); -geq(rect.left, 100); -geq(rect.right, 200); - -is(rect.width, 100); -is(rect.height, 100); -is(rect.width, rect.right - rect.left); -is(rect.height, rect.bottom - rect.top); - -finish(); -</script> <style> div { margin-top: 100px; @@ -31,5 +12,24 @@ div { </head> <body> <div>my div</div> + <script> + is_function(DOMRect, "DOMRect"); + + var elems = document.getElementsByTagName('div'); + var rect = elems[0].getBoundingClientRect(); + is_a(rect, DOMRect); + + geq(rect.top, 100); + geq(rect.bottom, 200); + geq(rect.left, 100); + geq(rect.right, 200); + + is(rect.width, 100); + is(rect.height, 100); + is(rect.width, rect.right - rect.left); + is(rect.height, rect.bottom - rect.top); + + finish(); + </script> </body> </html> diff --git a/tests/content/test_htmlcollection.html b/tests/content/test_htmlcollection.html index d7a0b44dce5..6ee77fa8157 100644 --- a/tests/content/test_htmlcollection.html +++ b/tests/content/test_htmlcollection.html @@ -2,6 +2,17 @@ <html> <head> <script src="harness.js"></script> + </head> + <body> + <div id="foo-1" class="foo"></div> + <div id="foo-2" class="foo"></div> + <div id="bar" class="bar"></div> + <div id="live" class="live"></div> + <div id="class-example"> + <p id="p1" class="aaa bbb"/> + <p id="p2" class="aaa ccc"/> + <p id="p3" class="bbb ccc"/> + </div> <script> let foo1 = document.getElementById("foo-1"); let foo2 = document.getElementById("foo-2"); @@ -104,16 +115,5 @@ finish(); </script> - </head> - <body> - <div id="foo-1" class="foo"></div> - <div id="foo-2" class="foo"></div> - <div id="bar" class="bar"></div> - <div id="live" class="live"></div> - <div id="class-example"> - <p id="p1" class="aaa bbb"/> - <p id="p2" class="aaa ccc"/> - <p id="p3" class="bbb ccc"/> - </div> </body> </html> diff --git a/tests/content/test_htmlspacechars.html b/tests/content/test_htmlspacechars.html index dc9166f48b2..7ce5ab3695f 100644 --- a/tests/content/test_htmlspacechars.html +++ b/tests/content/test_htmlspacechars.html @@ -2,11 +2,6 @@ <html> <head> <script src="harness.js"></script> - <script> - is(document.getElementsByClassName("foo").length, 6); - is_not(document.getElementById("bar").className, "ggg foo"); - finish(); - </script> </head> <body> <!-- \u0020 Space --> @@ -23,5 +18,10 @@ <div id="foo-6" class="fff foo"></div> <!-- Non-HTML space character --> <div id="bar" class="gggfoo"></div> + <script> + is(document.getElementsByClassName("foo").length, 6); + is_not(document.getElementById("bar").className, "ggg foo"); + finish(); + </script> </body> </html> diff --git a/tests/content/test_parentNode_querySelector.html b/tests/content/test_parentNode_querySelector.html index 556a45ba81a..b91205e7922 100644 --- a/tests/content/test_parentNode_querySelector.html +++ b/tests/content/test_parentNode_querySelector.html @@ -2,6 +2,12 @@ <html> <head> <script src="harness.js"></script> + </head> + <body> + <div id="foo"></div> + <div id="foo\bar"></div> + <div id="foo:bar"></div> + <div id="bar" class="myClass"></p> <script> { // document.querySelector let div = document.getElementById("foo"); @@ -60,11 +66,5 @@ } finish(); </script> - </head> - <body> - <div id="foo"></div> - <div id="foo\bar"></div> - <div id="foo:bar"></div> - <div id="bar" class="myClass"></p> </body> </html> diff --git a/tests/content/test_parentNode_querySelectorAll.html b/tests/content/test_parentNode_querySelectorAll.html index 599e017e61f..f07ecb5187b 100644 --- a/tests/content/test_parentNode_querySelectorAll.html +++ b/tests/content/test_parentNode_querySelectorAll.html @@ -2,6 +2,13 @@ <html> <head> <script src="harness.js"></script> + </head> + <body> + <div id="parent"> + <div id="foo" class="test"></div> + <div id="bar" class="test"></div> + <div id="baz" class="test"></div> + </div> <script> let foo = document.getElementById("foo"); let bar = document.getElementById("bar"); @@ -48,12 +55,5 @@ finish(); </script> - </head> - <body> - <div id="parent"> - <div id="foo" class="test"></div> - <div id="bar" class="test"></div> - <div id="baz" class="test"></div> - </div> </body> </html> diff --git a/tests/content/test_prototypes.html b/tests/content/test_prototypes.html index c2f012b57fa..cfb5fb35c3f 100644 --- a/tests/content/test_prototypes.html +++ b/tests/content/test_prototypes.html @@ -3,22 +3,24 @@ <meta charset="utf-8"> <script src="harness.js"></script> </head> -<body> +<body onload="test()"> <foo-á>foo</foo-á> <script> -is_a(window.document, Node); -gc(); // ensure that our document rooting works; subsequent accesses should be valid. -is_a(window.document, Node); -is(window.document.nodeType, Node.DOCUMENT_NODE); -is_a(window.document.documentElement, Node); -is_a(window.document.documentElement, Element); -is_a(window.document.documentElement, HTMLElement); -is_a(window.document.documentElement, HTMLHtmlElement); -is_a(window.document, Document); -is(window.document.documentElement.tagName, "HTML"); -is_a(window.document.getElementsByTagName('foo-á')[0], HTMLUnknownElement); -is(window.document.getElementsByTagName('foo-á')[0].tagName, "FOO-á"); -finish(); +function test() { + is_a(window.document, Node); + gc(); // ensure that our document rooting works; subsequent accesses should be valid. + is_a(window.document, Node); + is(window.document.nodeType, Node.DOCUMENT_NODE); + is_a(window.document.documentElement, Node); + is_a(window.document.documentElement, Element); + is_a(window.document.documentElement, HTMLElement); + is_a(window.document.documentElement, HTMLHtmlElement); + is_a(window.document, Document); + is(window.document.documentElement.tagName, "HTML"); + is_a(window.document.getElementsByTagName('foo-á')[0], HTMLUnknownElement); + is(window.document.getElementsByTagName('foo-á')[0].tagName, "FOO-á"); + finish(); +} </script> </body> </html> diff --git a/tests/content/test_textcontent.html b/tests/content/test_textcontent.html index b56c05d48a9..1720abca8a0 100644 --- a/tests/content/test_textcontent.html +++ b/tests/content/test_textcontent.html @@ -1,6 +1,10 @@ <html> <head> <script src="harness.js"></script> +</head> +<body> +<div>this is + text content</div> <script> var div = document.getElementsByTagName('div')[0]; is(div.textContent, "this is\n text content"); @@ -9,9 +13,5 @@ is(div.textContent, newContent); finish(); </script> -</head> -<body> -<div>this is - text content</div> </body> </html> diff --git a/tests/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini b/tests/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini index 43f2e92d311..1b6854862e9 100644 --- a/tests/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini +++ b/tests/wpt/metadata/dom/nodes/Document-createElement-namespace.html.ini @@ -1,3 +1,3 @@ [Document-createElement-namespace.html] type: testharness - expected: TIMEOUT + expected: CRASH diff --git a/tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-readyState.html.ini b/tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-readyState.html.ini deleted file mode 100644 index 2daf39c9ffe..00000000000 --- a/tests/wpt/metadata/html/dom/documents/resource-metadata-management/document-readyState.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[document-readyState.html] - type: testharness - [readystatechange event is fired each time document.readyState changes] - expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini index b085723ee8d..1e6de9c769c 100644 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini +++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-languages-02.html.ini @@ -1,20 +1,5 @@ [script-languages-02.html] type: testharness - [Script should run with type=""] - expected: FAIL - - [Script should run with type="application/ecmascript"] - expected: FAIL - - [Script should run with type="application/javascript"] - expected: FAIL - - [Script should run with type="application/x-ecmascript"] - expected: FAIL - - [Script should run with type="application/x-javascript"] - expected: FAIL - [Script should run with type="APPLICATION/ECMASCRIPT"] expected: FAIL @@ -27,162 +12,6 @@ [Script should run with type="APPLICATION/X-JAVASCRIPT"] expected: FAIL - [Script should run with type="application/ecmascript "] - expected: FAIL - - [Script should run with type="application/javascript "] - expected: FAIL - - [Script should run with type="application/x-ecmascript "] - expected: FAIL - - [Script should run with type="application/x-javascript "] - expected: FAIL - - [Script should run with type=" application/ecmascript"] - expected: FAIL - - [Script should run with type=" application/javascript"] - expected: FAIL - - [Script should run with type=" application/x-ecmascript"] - expected: FAIL - - [Script should run with type=" application/x-javascript"] - expected: FAIL - - [Script should run with type="application/ecmascript\\t"] - expected: FAIL - - [Script should run with type="application/javascript\\t"] - expected: FAIL - - [Script should run with type="application/x-ecmascript\\t"] - expected: FAIL - - [Script should run with type="application/x-javascript\\t"] - expected: FAIL - - [Script should run with type="\\tapplication/ecmascript"] - expected: FAIL - - [Script should run with type="\\tapplication/javascript"] - expected: FAIL - - [Script should run with type="\\tapplication/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\tapplication/x-javascript"] - expected: FAIL - - [Script should run with type="application/ecmascript\\n"] - expected: FAIL - - [Script should run with type="application/javascript\\n"] - expected: FAIL - - [Script should run with type="application/x-ecmascript\\n"] - expected: FAIL - - [Script should run with type="application/x-javascript\\n"] - expected: FAIL - - [Script should run with type="\\napplication/ecmascript"] - expected: FAIL - - [Script should run with type="\\napplication/javascript"] - expected: FAIL - - [Script should run with type="\\napplication/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\napplication/x-javascript"] - expected: FAIL - - [Script should run with type="application/ecmascript\\r"] - expected: FAIL - - [Script should run with type="application/javascript\\r"] - expected: FAIL - - [Script should run with type="application/x-ecmascript\\r"] - expected: FAIL - - [Script should run with type="application/x-javascript\\r"] - expected: FAIL - - [Script should run with type="\\rapplication/ecmascript"] - expected: FAIL - - [Script should run with type="\\rapplication/javascript"] - expected: FAIL - - [Script should run with type="\\rapplication/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\rapplication/x-javascript"] - expected: FAIL - - [Script should run with type="application/ecmascript\\f"] - expected: FAIL - - [Script should run with type="application/javascript\\f"] - expected: FAIL - - [Script should run with type="application/x-ecmascript\\f"] - expected: FAIL - - [Script should run with type="application/x-javascript\\f"] - expected: FAIL - - [Script should run with type="\\fapplication/ecmascript"] - expected: FAIL - - [Script should run with type="\\fapplication/javascript"] - expected: FAIL - - [Script should run with type="\\fapplication/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\fapplication/x-javascript"] - expected: FAIL - - [Script should run with type="text/ecmascript"] - expected: FAIL - - [Script should run with type="text/javascript"] - expected: FAIL - - [Script should run with type="text/javascript1.0"] - expected: FAIL - - [Script should run with type="text/javascript1.1"] - expected: FAIL - - [Script should run with type="text/javascript1.2"] - expected: FAIL - - [Script should run with type="text/javascript1.3"] - expected: FAIL - - [Script should run with type="text/javascript1.4"] - expected: FAIL - - [Script should run with type="text/javascript1.5"] - expected: FAIL - - [Script should run with type="text/jscript"] - expected: FAIL - - [Script should run with type="text/livescript"] - expected: FAIL - - [Script should run with type="text/x-ecmascript"] - expected: FAIL - - [Script should run with type="text/x-javascript"] - expected: FAIL - [Script should run with type="TEXT/ECMASCRIPT"] expected: FAIL @@ -219,405 +48,6 @@ [Script should run with type="TEXT/X-JAVASCRIPT"] expected: FAIL - [Script should run with type="text/ecmascript "] - expected: FAIL - - [Script should run with type="text/javascript "] - expected: FAIL - - [Script should run with type="text/javascript1.0 "] - expected: FAIL - - [Script should run with type="text/javascript1.1 "] - expected: FAIL - - [Script should run with type="text/javascript1.2 "] - expected: FAIL - - [Script should run with type="text/javascript1.3 "] - expected: FAIL - - [Script should run with type="text/javascript1.4 "] - expected: FAIL - - [Script should run with type="text/javascript1.5 "] - expected: FAIL - - [Script should run with type="text/jscript "] - expected: FAIL - - [Script should run with type="text/livescript "] - expected: FAIL - - [Script should run with type="text/x-ecmascript "] - expected: FAIL - - [Script should run with type="text/x-javascript "] - expected: FAIL - - [Script should run with type=" text/ecmascript"] - expected: FAIL - - [Script should run with type=" text/javascript"] - expected: FAIL - - [Script should run with type=" text/javascript1.0"] - expected: FAIL - - [Script should run with type=" text/javascript1.1"] - expected: FAIL - - [Script should run with type=" text/javascript1.2"] - expected: FAIL - - [Script should run with type=" text/javascript1.3"] - expected: FAIL - - [Script should run with type=" text/javascript1.4"] - expected: FAIL - - [Script should run with type=" text/javascript1.5"] - expected: FAIL - - [Script should run with type=" text/jscript"] - expected: FAIL - - [Script should run with type=" text/livescript"] - expected: FAIL - - [Script should run with type=" text/x-ecmascript"] - expected: FAIL - - [Script should run with type=" text/x-javascript"] - expected: FAIL - - [Script should run with type="text/ecmascript\\t"] - expected: FAIL - - [Script should run with type="text/javascript\\t"] - expected: FAIL - - [Script should run with type="text/javascript1.0\\t"] - expected: FAIL - - [Script should run with type="text/javascript1.1\\t"] - expected: FAIL - - [Script should run with type="text/javascript1.2\\t"] - expected: FAIL - - [Script should run with type="text/javascript1.3\\t"] - expected: FAIL - - [Script should run with type="text/javascript1.4\\t"] - expected: FAIL - - [Script should run with type="text/javascript1.5\\t"] - expected: FAIL - - [Script should run with type="text/jscript\\t"] - expected: FAIL - - [Script should run with type="text/livescript\\t"] - expected: FAIL - - [Script should run with type="text/x-ecmascript\\t"] - expected: FAIL - - [Script should run with type="text/x-javascript\\t"] - expected: FAIL - - [Script should run with type="\\ttext/ecmascript"] - expected: FAIL - - [Script should run with type="\\ttext/javascript"] - expected: FAIL - - [Script should run with type="\\ttext/javascript1.0"] - expected: FAIL - - [Script should run with type="\\ttext/javascript1.1"] - expected: FAIL - - [Script should run with type="\\ttext/javascript1.2"] - expected: FAIL - - [Script should run with type="\\ttext/javascript1.3"] - expected: FAIL - - [Script should run with type="\\ttext/javascript1.4"] - expected: FAIL - - [Script should run with type="\\ttext/javascript1.5"] - expected: FAIL - - [Script should run with type="\\ttext/jscript"] - expected: FAIL - - [Script should run with type="\\ttext/livescript"] - expected: FAIL - - [Script should run with type="\\ttext/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\ttext/x-javascript"] - expected: FAIL - - [Script should run with type="text/ecmascript\\n"] - expected: FAIL - - [Script should run with type="text/javascript\\n"] - expected: FAIL - - [Script should run with type="text/javascript1.0\\n"] - expected: FAIL - - [Script should run with type="text/javascript1.1\\n"] - expected: FAIL - - [Script should run with type="text/javascript1.2\\n"] - expected: FAIL - - [Script should run with type="text/javascript1.3\\n"] - expected: FAIL - - [Script should run with type="text/javascript1.4\\n"] - expected: FAIL - - [Script should run with type="text/javascript1.5\\n"] - expected: FAIL - - [Script should run with type="text/jscript\\n"] - expected: FAIL - - [Script should run with type="text/livescript\\n"] - expected: FAIL - - [Script should run with type="text/x-ecmascript\\n"] - expected: FAIL - - [Script should run with type="text/x-javascript\\n"] - expected: FAIL - - [Script should run with type="\\ntext/ecmascript"] - expected: FAIL - - [Script should run with type="\\ntext/javascript"] - expected: FAIL - - [Script should run with type="\\ntext/javascript1.0"] - expected: FAIL - - [Script should run with type="\\ntext/javascript1.1"] - expected: FAIL - - [Script should run with type="\\ntext/javascript1.2"] - expected: FAIL - - [Script should run with type="\\ntext/javascript1.3"] - expected: FAIL - - [Script should run with type="\\ntext/javascript1.4"] - expected: FAIL - - [Script should run with type="\\ntext/javascript1.5"] - expected: FAIL - - [Script should run with type="\\ntext/jscript"] - expected: FAIL - - [Script should run with type="\\ntext/livescript"] - expected: FAIL - - [Script should run with type="\\ntext/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\ntext/x-javascript"] - expected: FAIL - - [Script should run with type="text/ecmascript\\r"] - expected: FAIL - - [Script should run with type="text/javascript\\r"] - expected: FAIL - - [Script should run with type="text/javascript1.0\\r"] - expected: FAIL - - [Script should run with type="text/javascript1.1\\r"] - expected: FAIL - - [Script should run with type="text/javascript1.2\\r"] - expected: FAIL - - [Script should run with type="text/javascript1.3\\r"] - expected: FAIL - - [Script should run with type="text/javascript1.4\\r"] - expected: FAIL - - [Script should run with type="text/javascript1.5\\r"] - expected: FAIL - - [Script should run with type="text/jscript\\r"] - expected: FAIL - - [Script should run with type="text/livescript\\r"] - expected: FAIL - - [Script should run with type="text/x-ecmascript\\r"] - expected: FAIL - - [Script should run with type="text/x-javascript\\r"] - expected: FAIL - - [Script should run with type="\\rtext/ecmascript"] - expected: FAIL - - [Script should run with type="\\rtext/javascript"] - expected: FAIL - - [Script should run with type="\\rtext/javascript1.0"] - expected: FAIL - - [Script should run with type="\\rtext/javascript1.1"] - expected: FAIL - - [Script should run with type="\\rtext/javascript1.2"] - expected: FAIL - - [Script should run with type="\\rtext/javascript1.3"] - expected: FAIL - - [Script should run with type="\\rtext/javascript1.4"] - expected: FAIL - - [Script should run with type="\\rtext/javascript1.5"] - expected: FAIL - - [Script should run with type="\\rtext/jscript"] - expected: FAIL - - [Script should run with type="\\rtext/livescript"] - expected: FAIL - - [Script should run with type="\\rtext/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\rtext/x-javascript"] - expected: FAIL - - [Script should run with type="text/ecmascript\\f"] - expected: FAIL - - [Script should run with type="text/javascript\\f"] - expected: FAIL - - [Script should run with type="text/javascript1.0\\f"] - expected: FAIL - - [Script should run with type="text/javascript1.1\\f"] - expected: FAIL - - [Script should run with type="text/javascript1.2\\f"] - expected: FAIL - - [Script should run with type="text/javascript1.3\\f"] - expected: FAIL - - [Script should run with type="text/javascript1.4\\f"] - expected: FAIL - - [Script should run with type="text/javascript1.5\\f"] - expected: FAIL - - [Script should run with type="text/jscript\\f"] - expected: FAIL - - [Script should run with type="text/livescript\\f"] - expected: FAIL - - [Script should run with type="text/x-ecmascript\\f"] - expected: FAIL - - [Script should run with type="text/x-javascript\\f"] - expected: FAIL - - [Script should run with type="\\ftext/ecmascript"] - expected: FAIL - - [Script should run with type="\\ftext/javascript"] - expected: FAIL - - [Script should run with type="\\ftext/javascript1.0"] - expected: FAIL - - [Script should run with type="\\ftext/javascript1.1"] - expected: FAIL - - [Script should run with type="\\ftext/javascript1.2"] - expected: FAIL - - [Script should run with type="\\ftext/javascript1.3"] - expected: FAIL - - [Script should run with type="\\ftext/javascript1.4"] - expected: FAIL - - [Script should run with type="\\ftext/javascript1.5"] - expected: FAIL - - [Script should run with type="\\ftext/jscript"] - expected: FAIL - - [Script should run with type="\\ftext/livescript"] - expected: FAIL - - [Script should run with type="\\ftext/x-ecmascript"] - expected: FAIL - - [Script should run with type="\\ftext/x-javascript"] - expected: FAIL - - [Script should run with language=""] - expected: FAIL - - [Script should run with language="ecmascript"] - expected: FAIL - - [Script should run with language="javascript"] - expected: FAIL - - [Script should run with language="javascript1.0"] - expected: FAIL - - [Script should run with language="javascript1.1"] - expected: FAIL - - [Script should run with language="javascript1.2"] - expected: FAIL - - [Script should run with language="javascript1.3"] - expected: FAIL - - [Script should run with language="javascript1.4"] - expected: FAIL - - [Script should run with language="javascript1.5"] - expected: FAIL - - [Script should run with language="jscript"] - expected: FAIL - - [Script should run with language="livescript"] - expected: FAIL - - [Script should run with language="x-ecmascript"] - expected: FAIL - - [Script should run with language="x-javascript"] - expected: FAIL - [Script should run with language="ECMASCRIPT"] expected: FAIL diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/013.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/013.html.ini deleted file mode 100644 index ccb3f3090d7..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/013.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[013.html] - type: testharness - [ scheduler: DOM added inline script earlier in document] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/016.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/016.html.ini deleted file mode 100644 index bf00a2bf3f8..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/016.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[016.html] - type: testharness - [ scheduler: DOM added inline script later in document] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/025.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/025.html.ini deleted file mode 100644 index 4c6825d633a..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/025.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[025.html] - type: testharness - [ scheduler: DOM added script, .src set on script with content] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/036.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/036.html.ini deleted file mode 100644 index f1f5fa4da38..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/036.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[036.html] - type: testharness - [ scheduler: DOM cloning] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/037.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/037.html.ini deleted file mode 100644 index 52efbc68148..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/037.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[037.html] - type: testharness - [ scheduler: DOM movement with appendChild, inline] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/048.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/048.html.ini deleted file mode 100644 index a62ede9a84a..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/048.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[048.html] - type: testharness - [ scheduler: adding inline script which sets its own .src ] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/052.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/052.html.ini deleted file mode 100644 index ddda41aa5a3..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/052.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[052.html] - type: testharness - [ scheduler: interaction of parsing and script execution - external script ] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/056.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/056.html.ini deleted file mode 100644 index ef0e50bedb3..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/056.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[056.html] - type: testharness - [ scheduler: appending code to initially empty SCRIPT tag in DOM ] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/069.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/069.html.ini index c0a3251892a..602df71772f 100644 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/069.html.ini +++ b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/069.html.ini @@ -1,6 +1,5 @@ [069.html] type: testharness - expected: TIMEOUT [scheduler: external files added through DOM should not block further parsing while loading] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/104.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/104.html.ini deleted file mode 100644 index 7436c8d2d6c..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/104.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[104.html] - type: testharness - [ scheduler: adding defer attribute at runtime] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/116.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/116.html.ini index adb954dc246..1a984804ce6 100644 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/116.html.ini +++ b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/116.html.ini @@ -1,6 +1,5 @@ [116.html] type: testharness - expected: TIMEOUT [scheduler: adding script to head of frameset document] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/124.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/124.html.ini deleted file mode 100644 index 99948245ba0..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/124.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[124.html] - type: testharness - [scheduler: altering the type attribute and changing script data inline script ] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/127.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/127.html.ini deleted file mode 100644 index 803e846492f..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/127.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[127.html] - type: testharness - [scheduler: appending non-text children to script ] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/129.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/129.html.ini deleted file mode 100644 index e18cfba0012..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/129.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[129.html] - type: testharness - [scheduler: appending multiple script elements] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/133.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/133.html.ini deleted file mode 100644 index 91c80df2d42..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/133.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[133.html] - type: testharness - [scheduler: inline HTML script added by SVG script ] - expected: FAIL - diff --git a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/145.html.ini b/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/145.html.ini deleted file mode 100644 index b4836dc60d5..00000000000 --- a/tests/wpt/metadata/old-tests/submission/Opera/script_scheduling/145.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[145.html] - type: testharness - [scheduler: SVG inline script adding text to empty script ] - expected: FAIL - |