From bb8166bb978cca01e06125490f8367b684776cef Mon Sep 17 00:00:00 2001 From: Javed Nissar Date: Tue, 17 Sep 2019 17:58:06 -0400 Subject: [PATCH 1/4] Add PerformanceResourceTiming: TimingAllowCheck The purpose of this commit is to implement https://w3c.github.io/resource-timing/#dfn-timing-allow-check --- components/net/http_loader.rs | 31 ++++++++++++++++++++++++++++--- components/net_traits/lib.rs | 22 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index 225751e2cd5..fa936501fe5 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -37,6 +37,7 @@ use hyper::{Body, Client, Method, Response as HyperResponse, StatusCode}; use hyper_serde::Serde; use msg::constellation_msg::{HistoryStateId, PipelineId}; use net_traits::quality::{quality_to_value, Quality, QualityItem}; +use net_traits::request::Origin::Origin as SpecificOrigin; use net_traits::request::{CacheMode, CredentialsMode, Destination, Origin}; use net_traits::request::{RedirectMode, Referrer, Request, RequestMode}; use net_traits::request::{ResponseTainting, ServiceWorkersMode}; @@ -44,6 +45,7 @@ use net_traits::response::{HttpsState, Response, ResponseBody, ResponseType}; use net_traits::{CookieSource, FetchMetadata, NetworkError, ReferrerPolicy}; use net_traits::{RedirectEndValue, RedirectStartValue, ResourceAttribute, ResourceFetchTiming}; use openssl::ssl::SslConnectorBuilder; +use servo_arc::Arc; use servo_url::{ImmutableOrigin, ServoUrl}; use std::collections::{HashMap, HashSet}; use std::error::Error; @@ -51,7 +53,7 @@ use std::iter::FromIterator; use std::mem; use std::ops::Deref; use std::str::FromStr; -use std::sync::{Arc, Mutex, RwLock}; +use std::sync::{Mutex, RwLock}; use std::time::{Duration, SystemTime}; use time::{self, Tm}; use tokio::prelude::{future, Future, Stream}; @@ -631,7 +633,7 @@ pub fn http_fetch( request.redirect_count as u16, )); - response.resource_timing = context.timing.lock().unwrap().clone(); + response.resource_timing = Arc::clone(&context.timing); // Step 6 response @@ -828,7 +830,6 @@ fn http_network_or_cache_fetch( ) -> Response { // Step 2 let mut response: Option = None; - // Step 4 let mut revalidating_flag = false; @@ -1302,8 +1303,32 @@ fn http_network_fetch( } } + let header_strings: Vec<&str> = res + .headers() + .get_all("Timing-Allow-Origin") + .iter() + .map(|header_value| header_value.to_str().unwrap_or("")) + .collect(); + let wildcard_present = header_strings.iter().any(|header_str| *header_str == "*"); + // The spec: https://www.w3.org/TR/resource-timing-2/#sec-timing-allow-origin + // says that a header string is either an origin or a wildcard so we can just do a straight + // check against the document origin + let req_origin_in_timing_allow = header_strings + .iter() + .any(|header_str| match request.origin { + SpecificOrigin(ref immutable_request_origin) => { + *header_str == immutable_request_origin.ascii_serialization() + }, + _ => false, + }); + + if !req_origin_in_timing_allow && !wildcard_present { + context.timing.lock().unwrap().mark_timing_check_failed(); + } + let timing = context.timing.lock().unwrap().clone(); let mut response = Response::new(url.clone(), timing); + response.status = Some(( res.status(), res.status().canonical_reason().unwrap_or("").into(), diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs index 369c1efedaa..46a48af443e 100644 --- a/components/net_traits/lib.rs +++ b/components/net_traits/lib.rs @@ -232,6 +232,8 @@ impl FetchTaskTarget for IpcSender { } else { let _ = self.send(FetchResponseMsg::ProcessResponseEOF(Ok(response .get_resource_timing() + .lock() + .unwrap() .clone()))); } } @@ -459,6 +461,7 @@ pub struct ResourceCorsData { #[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] pub struct ResourceFetchTiming { pub domain_lookup_start: u64, + pub timing_check_passed: bool, pub timing_type: ResourceTimingType, /// Number of redirects until final resource (currently limited to 20) pub redirect_count: u16, @@ -508,6 +511,7 @@ impl ResourceFetchTiming { pub fn new(timing_type: ResourceTimingType) -> ResourceFetchTiming { ResourceFetchTiming { timing_type: timing_type, + timing_check_passed: true, domain_lookup_start: 0, redirect_count: 0, request_start: 0, @@ -524,6 +528,13 @@ impl ResourceFetchTiming { // TODO currently this is being set with precise time ns when it should be time since // time origin (as described in Performance::now) pub fn set_attribute(&mut self, attribute: ResourceAttribute) { + let should_attribute_always_be_updated = match attribute { + ResourceAttribute::FetchStart | ResourceAttribute::ResponseEnd => true, + _ => false, + }; + if !self.timing_check_passed && !should_attribute_always_be_updated { + return; + } match attribute { ResourceAttribute::DomainLookupStart => self.domain_lookup_start = precise_time_ns(), ResourceAttribute::RedirectCount(count) => self.redirect_count = count, @@ -547,6 +558,17 @@ impl ResourceFetchTiming { ResourceAttribute::ResponseEnd => self.response_end = precise_time_ns(), } } + + pub fn mark_timing_check_failed(&mut self) { + self.timing_check_passed = false; + self.domain_lookup_start = 0; + self.redirect_count = 0; + self.request_start = 0; + self.response_start = 0; + self.redirect_start = 0; + self.connect_start = 0; + self.connect_end = 0; + } } /// Metadata about a loaded resource, such as is obtained from HTTP headers. From 7596c36959c512f09190d5a3d412b624dcd37b73 Mon Sep 17 00:00:00 2001 From: Javed Nissar Date: Tue, 17 Sep 2019 18:01:40 -0400 Subject: [PATCH 2/4] Move ResourceFetchTiming into Arc The purpose of this commit is to ensure that the Response object has access to Timing updates as previously the Response object simply stored a ResourceFetchTiming struct so updates on ResourceFetchTiming that were not explicitly done on the Response would not be passed down. The references to ServoArc are added because Response uses servo_arc::Arc rather than std::sync::Arc as is used elsewhere. So, we've switched those other places to servo_arc::Arc instead of switching Response to std::sync::Arc. --- components/net/fetch/methods.rs | 3 ++- components/net/resource_thread.rs | 3 ++- components/net/tests/fetch.rs | 3 ++- components/net/tests/main.rs | 3 ++- components/net_traits/response.rs | 13 ++++++++----- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs index eadc3ea0597..503e93d3687 100644 --- a/components/net/fetch/methods.rs +++ b/components/net/fetch/methods.rs @@ -23,6 +23,7 @@ use net_traits::request::{Origin, ResponseTainting, Window}; use net_traits::response::{Response, ResponseBody, ResponseType}; use net_traits::ResourceAttribute; use net_traits::{FetchTaskTarget, NetworkError, ReferrerPolicy, ResourceFetchTiming}; +use servo_arc::Arc as ServoArc; use servo_url::ServoUrl; use std::borrow::Cow; use std::fs::File; @@ -52,7 +53,7 @@ pub struct FetchContext { pub devtools_chan: Option>, pub filemanager: FileManager, pub cancellation_listener: Arc>, - pub timing: Arc>, + pub timing: ServoArc>, } pub struct CancellationListener { diff --git a/components/net/resource_thread.rs b/components/net/resource_thread.rs index 6b7ac04b891..33f878f1207 100644 --- a/components/net/resource_thread.rs +++ b/components/net/resource_thread.rs @@ -36,6 +36,7 @@ use profile_traits::mem::ProfilerChan as MemProfilerChan; use profile_traits::mem::{Report, ReportKind, ReportsChan}; use profile_traits::time::ProfilerChan; use serde::{Deserialize, Serialize}; +use servo_arc::Arc as ServoArc; use servo_url::ServoUrl; use std::borrow::{Cow, ToOwned}; use std::collections::HashMap; @@ -491,7 +492,7 @@ impl CoreResourceManager { devtools_chan: dc, filemanager: filemanager, cancellation_listener: Arc::new(Mutex::new(CancellationListener::new(cancel_chan))), - timing: Arc::new(Mutex::new(ResourceFetchTiming::new(request.timing_type()))), + timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new(request.timing_type()))), }; match res_init_ { diff --git a/components/net/tests/fetch.rs b/components/net/tests/fetch.rs index b05635ee3b9..328ca734576 100644 --- a/components/net/tests/fetch.rs +++ b/components/net/tests/fetch.rs @@ -36,6 +36,7 @@ use net_traits::{ FetchTaskTarget, IncludeSubdomains, NetworkError, ReferrerPolicy, ResourceFetchTiming, ResourceTimingType, }; +use servo_arc::Arc as ServoArc; use servo_url::{ImmutableOrigin, ServoUrl}; use std::fs::File; use std::io::Read; @@ -665,7 +666,7 @@ fn test_fetch_with_hsts() { devtools_chan: None, filemanager: FileManager::new(create_embedder_proxy()), cancellation_listener: Arc::new(Mutex::new(CancellationListener::new(None))), - timing: Arc::new(Mutex::new(ResourceFetchTiming::new( + timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new( ResourceTimingType::Navigation, ))), }; diff --git a/components/net/tests/main.rs b/components/net/tests/main.rs index 6a2c5ddb395..e68cc293fa6 100644 --- a/components/net/tests/main.rs +++ b/components/net/tests/main.rs @@ -38,6 +38,7 @@ use net_traits::request::Request; use net_traits::response::Response; use net_traits::{FetchTaskTarget, ResourceFetchTiming, ResourceTimingType}; use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; +use servo_arc::Arc as ServoArc; use servo_url::ServoUrl; use std::net::TcpListener as StdTcpListener; use std::path::PathBuf; @@ -95,7 +96,7 @@ fn new_fetch_context( devtools_chan: dc, filemanager: FileManager::new(sender), cancellation_listener: Arc::new(Mutex::new(CancellationListener::new(None))), - timing: Arc::new(Mutex::new(ResourceFetchTiming::new( + timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new( ResourceTimingType::Navigation, ))), } diff --git a/components/net_traits/response.rs b/components/net_traits/response.rs index f8959163834..4ee8b37eb56 100644 --- a/components/net_traits/response.rs +++ b/components/net_traits/response.rs @@ -114,7 +114,8 @@ pub struct Response { #[ignore_malloc_size_of = "AtomicBool heap size undefined"] pub aborted: Arc, /// track network metrics - pub resource_timing: ResourceFetchTiming, + #[ignore_malloc_size_of = "Mutex heap size undefined"] + pub resource_timing: Arc>, } impl Response { @@ -137,7 +138,7 @@ impl Response { internal_response: None, return_internal: true, aborted: Arc::new(AtomicBool::new(false)), - resource_timing: resource_timing, + resource_timing: Arc::new(Mutex::new(resource_timing)), } } @@ -171,7 +172,9 @@ impl Response { internal_response: None, return_internal: true, aborted: Arc::new(AtomicBool::new(false)), - resource_timing: ResourceFetchTiming::new(ResourceTimingType::Error), + resource_timing: Arc::new(Mutex::new(ResourceFetchTiming::new( + ResourceTimingType::Error, + ))), } } @@ -217,8 +220,8 @@ impl Response { } } - pub fn get_resource_timing(&self) -> &ResourceFetchTiming { - &self.resource_timing + pub fn get_resource_timing(&self) -> Arc> { + Arc::clone(&self.resource_timing) } /// Convert to a filtered response, of type `filter_type`. From f5c2e133595e677ee1789895921dc2052ac6830f Mon Sep 17 00:00:00 2001 From: Javed Nissar Date: Tue, 17 Sep 2019 18:02:35 -0400 Subject: [PATCH 3/4] Expose stub attributes on PerformanceResourceTiming The purpose of this commit is to expose stub attributes on PerformanceResourceTiming in order to enable tests to pass as well as set the type of performance timing entry to navigation when the initiator is navigation. The purpose of this is to ensure that document performance entries are correctly classified as navigation entries rather than resource entries. --- .../script/dom/performanceresourcetiming.rs | 46 +++++++++++++++++-- .../webidls/PerformanceResourceTiming.webidl | 10 ++-- 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/components/script/dom/performanceresourcetiming.rs b/components/script/dom/performanceresourcetiming.rs index 5d755240458..7f4785ea4e4 100644 --- a/components/script/dom/performanceresourcetiming.rs +++ b/components/script/dom/performanceresourcetiming.rs @@ -50,9 +50,9 @@ pub struct PerformanceResourceTiming { request_start: f64, response_start: f64, response_end: f64, - // transfer_size: f64, //size in octets - // encoded_body_size: f64, //size in octets - // decoded_body_size: f64, //size in octets + transfer_size: u64, //size in octets + encoded_body_size: u64, //size in octets + decoded_body_size: u64, //size in octets } // TODO(#21254): startTime @@ -71,10 +71,15 @@ impl PerformanceResourceTiming { next_hop: Option, fetch_start: f64, ) -> PerformanceResourceTiming { + let entry_type = if initiator_type == InitiatorType::Navigation { + DOMString::from("navigation") + } else { + DOMString::from("resource") + }; PerformanceResourceTiming { entry: PerformanceEntry::new_inherited( DOMString::from(url.into_string()), - DOMString::from("resource"), + entry_type, 0., 0., ), @@ -92,6 +97,9 @@ impl PerformanceResourceTiming { request_start: 0., response_start: 0., response_end: 0., + transfer_size: 0, + encoded_body_size: 0, + decoded_body_size: 0, } } @@ -117,13 +125,18 @@ impl PerformanceResourceTiming { redirect_end: resource_timing.redirect_end as f64, fetch_start: resource_timing.fetch_start as f64, domain_lookup_start: resource_timing.domain_lookup_start as f64, + //TODO (#21260) domain_lookup_end: 0., connect_start: resource_timing.connect_start as f64, connect_end: resource_timing.connect_end as f64, + // TODO (#21271) secure_connection_start: 0., request_start: resource_timing.request_start as f64, response_start: resource_timing.response_start as f64, response_end: resource_timing.response_end as f64, + transfer_size: 0, + encoded_body_size: 0, + decoded_body_size: 0, } } @@ -175,6 +188,31 @@ impl PerformanceResourceTimingMethods for PerformanceResourceTiming { Finite::wrap(self.domain_lookup_start) } + // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-domainlookupend + fn DomainLookupEnd(&self) -> DOMHighResTimeStamp { + Finite::wrap(self.domain_lookup_end) + } + + // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-secureconnectionstart + fn SecureConnectionStart(&self) -> DOMHighResTimeStamp { + Finite::wrap(self.secure_connection_start) + } + + // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-transfersize + fn TransferSize(&self) -> u64 { + self.transfer_size + } + + // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-encodedbodysize + fn EncodedBodySize(&self) -> u64 { + self.encoded_body_size + } + + // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-decodedbodysize + fn DecodedBodySize(&self) -> u64 { + self.decoded_body_size + } + // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-requeststart fn RequestStart(&self) -> DOMHighResTimeStamp { Finite::wrap(self.request_start) diff --git a/components/script/dom/webidls/PerformanceResourceTiming.webidl b/components/script/dom/webidls/PerformanceResourceTiming.webidl index e4f73197a8c..50a6dba1416 100644 --- a/components/script/dom/webidls/PerformanceResourceTiming.webidl +++ b/components/script/dom/webidls/PerformanceResourceTiming.webidl @@ -16,15 +16,15 @@ interface PerformanceResourceTiming : PerformanceEntry { readonly attribute DOMHighResTimeStamp redirectEnd; readonly attribute DOMHighResTimeStamp fetchStart; readonly attribute DOMHighResTimeStamp domainLookupStart; - // readonly attribute DOMHighResTimeStamp domainLookupEnd; + readonly attribute DOMHighResTimeStamp domainLookupEnd; readonly attribute DOMHighResTimeStamp connectStart; readonly attribute DOMHighResTimeStamp connectEnd; - // readonly attribute DOMHighResTimeStamp secureConnectionStart; + readonly attribute DOMHighResTimeStamp secureConnectionStart; readonly attribute DOMHighResTimeStamp requestStart; readonly attribute DOMHighResTimeStamp responseStart; readonly attribute DOMHighResTimeStamp responseEnd; - /// readonly attribute unsigned long long transferSize; - /// readonly attribute unsigned long long encodedBodySize; - /// readonly attribute unsigned long long decodedBodySize; + readonly attribute unsigned long long transferSize; + readonly attribute unsigned long long encodedBodySize; + readonly attribute unsigned long long decodedBodySize; [Default] object toJSON(); }; From 63adf66ea47719b8c0fa703ea119f90f80351b56 Mon Sep 17 00:00:00 2001 From: Javed Nissar Date: Tue, 17 Sep 2019 18:03:01 -0400 Subject: [PATCH 4/4] Fix test expectations --- .../idlharness.window.js.ini | 26 +++++------ .../nav2_test_document_open.html.ini | 5 --- .../nav2_test_frame_removed.html.ini | 5 --- ...nstance_accessible_from_the_start.html.ini | 2 +- .../nav2_test_navigate_iframe.html.ini | 4 +- ...av2_test_navigate_within_document.html.ini | 2 +- ..._test_navigation_type_backforward.html.ini | 3 +- ...rect_chain_xserver_partial_opt_in.html.ini | 4 -- .../nav2_test_redirect_xserver.html.ini | 5 --- .../unload-event-same-origin-check.html.ini | 18 ++++---- .../not-clonable.html.ini | 4 -- .../TAO-crossorigin-port.sub.html.ini | 4 -- ...ear_resource_timing_functionality.html.ini | 2 +- .../resource-timing/idlharness.any.js.ini | 44 +++++++++---------- .../resource_TAO_multi_wildcard.html.ini | 3 ++ .../resource-timing/resource_TAO_null.htm.ini | 4 -- .../resource_TAO_origin_uppercase.htm.ini | 4 -- .../resource_TAO_space.htm.ini | 4 -- .../resource-timing/resource_TAO_zero.htm.ini | 25 ----------- .../resource-timing/resource_cached.htm.ini | 2 +- .../resource_connection_reuse.html.ini | 4 +- .../resource_connection_reuse.https.html.ini | 2 +- ...ce_connection_reuse_mixed_content.html.ini | 2 +- ...tion_reuse_mixed_content_redirect.html.ini | 2 +- .../resource_dedicated_worker.html.ini | 3 ++ .../resource_reparenting.html.ini | 2 +- .../resource_reuse.sub.html.ini | 4 ++ .../resource_script_types.html.ini | 2 +- ...ffer_full_when_shrink_buffer_size.html.ini | 2 +- .../workers/worker-performance.worker.js.ini | 3 -- 30 files changed, 70 insertions(+), 126 deletions(-) delete mode 100644 tests/wpt/metadata/navigation-timing/nav2_test_document_open.html.ini delete mode 100644 tests/wpt/metadata/navigation-timing/nav2_test_frame_removed.html.ini delete mode 100644 tests/wpt/metadata/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html.ini delete mode 100644 tests/wpt/metadata/navigation-timing/nav2_test_redirect_xserver.html.ini delete mode 100644 tests/wpt/metadata/performance-timeline/not-clonable.html.ini delete mode 100644 tests/wpt/metadata/resource-timing/TAO-crossorigin-port.sub.html.ini create mode 100644 tests/wpt/metadata/resource-timing/resource_TAO_multi_wildcard.html.ini delete mode 100644 tests/wpt/metadata/resource-timing/resource_TAO_null.htm.ini delete mode 100644 tests/wpt/metadata/resource-timing/resource_TAO_origin_uppercase.htm.ini delete mode 100644 tests/wpt/metadata/resource-timing/resource_TAO_space.htm.ini delete mode 100644 tests/wpt/metadata/resource-timing/resource_TAO_zero.htm.ini create mode 100644 tests/wpt/metadata/resource-timing/resource_dedicated_worker.html.ini diff --git a/tests/wpt/metadata/navigation-timing/idlharness.window.js.ini b/tests/wpt/metadata/navigation-timing/idlharness.window.js.ini index 8dd01ef19fa..e171835d653 100644 --- a/tests/wpt/metadata/navigation-timing/idlharness.window.js.ini +++ b/tests/wpt/metadata/navigation-timing/idlharness.window.js.ini @@ -1,42 +1,42 @@ [idlharness.window.html] [PerformanceNavigationTiming must be primary interface of performance.getEntriesByType("navigation")[0\]] - expected: FAIL + expected: PASS [Stringification of performance.getEntriesByType("navigation")[0\]] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "unloadEventStart" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "unloadEventEnd" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "domInteractive" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "domContentLoadedEventStart" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "domContentLoadedEventEnd" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "domComplete" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "loadEventStart" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "loadEventEnd" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "type" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "redirectCount" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0\] must inherit property "toJSON()" with the proper type] - expected: FAIL + expected: PASS [PerformanceNavigationTiming interface: default toJSON operation on performance.getEntriesByType("navigation")[0\]] expected: FAIL diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_document_open.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_document_open.html.ini deleted file mode 100644 index 44c377db153..00000000000 --- a/tests/wpt/metadata/navigation-timing/nav2_test_document_open.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[nav2_test_document_open.html] - type: testharness - [Navigation Timing 2 WPT] - expected: FAIL - diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_frame_removed.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_frame_removed.html.ini deleted file mode 100644 index 6cd50b8489f..00000000000 --- a/tests/wpt/metadata/navigation-timing/nav2_test_frame_removed.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[nav2_test_frame_removed.html] - type: testharness - [Navigation Timing 2 WPT] - expected: FAIL - diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_instance_accessible_from_the_start.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_instance_accessible_from_the_start.html.ini index bf1c240224f..af77b5aac5f 100644 --- a/tests/wpt/metadata/navigation-timing/nav2_test_instance_accessible_from_the_start.html.ini +++ b/tests/wpt/metadata/navigation-timing/nav2_test_instance_accessible_from_the_start.html.ini @@ -1,5 +1,5 @@ [nav2_test_instance_accessible_from_the_start.html] type: testharness [PerformanceNavigationTiming instance exists with reasonable values.] - expected: FAIL + expected: PASS diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_navigate_iframe.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_navigate_iframe.html.ini index bea5ea3a2a0..0da5e2d6d92 100644 --- a/tests/wpt/metadata/navigation-timing/nav2_test_navigate_iframe.html.ini +++ b/tests/wpt/metadata/navigation-timing/nav2_test_navigate_iframe.html.ini @@ -1,8 +1,8 @@ [nav2_test_navigate_iframe.html] - expected: ERROR + expected: OK [PerformanceNavigationTiming.name updated in iframes] expected: FAIL [navigation.name updated when iframe URL changes] - expected: TIMEOUT + expected: PASS diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_navigate_within_document.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_navigate_within_document.html.ini index 7780f1c3ab9..29a624b5e3e 100644 --- a/tests/wpt/metadata/navigation-timing/nav2_test_navigate_within_document.html.ini +++ b/tests/wpt/metadata/navigation-timing/nav2_test_navigate_within_document.html.ini @@ -1,5 +1,5 @@ [nav2_test_navigate_within_document.html] type: testharness [Navigation Timing 2 WPT] - expected: FAIL + expected: PASS diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_navigation_type_backforward.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_navigation_type_backforward.html.ini index 99e1f259f4c..a6c96140577 100644 --- a/tests/wpt/metadata/navigation-timing/nav2_test_navigation_type_backforward.html.ini +++ b/tests/wpt/metadata/navigation-timing/nav2_test_navigation_type_backforward.html.ini @@ -1,5 +1,6 @@ [nav2_test_navigation_type_backforward.html] type: testharness + expected: TIMEOUT [Navigation Timing 2 WPT] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html.ini deleted file mode 100644 index fad1068318f..00000000000 --- a/tests/wpt/metadata/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[nav2_test_redirect_chain_xserver_partial_opt_in.html] - [Navigation Timing 2 WPT] - expected: FAIL - diff --git a/tests/wpt/metadata/navigation-timing/nav2_test_redirect_xserver.html.ini b/tests/wpt/metadata/navigation-timing/nav2_test_redirect_xserver.html.ini deleted file mode 100644 index 7bcd169ae34..00000000000 --- a/tests/wpt/metadata/navigation-timing/nav2_test_redirect_xserver.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[nav2_test_redirect_xserver.html] - type: testharness - [Navigation Timing 2 WPT] - expected: FAIL - diff --git a/tests/wpt/metadata/navigation-timing/unload-event-same-origin-check.html.ini b/tests/wpt/metadata/navigation-timing/unload-event-same-origin-check.html.ini index f000dd8926d..c7bde476bb6 100644 --- a/tests/wpt/metadata/navigation-timing/unload-event-same-origin-check.html.ini +++ b/tests/wpt/metadata/navigation-timing/unload-event-same-origin-check.html.ini @@ -1,37 +1,37 @@ [unload-event-same-origin-check.html] [Redirect chain with a partial TAO opt-in] - expected: FAIL + expected: PASS [No previous document with same origin redirect] expected: FAIL [cross-cross-same Redirect chain with no TAO opt-in] - expected: FAIL + expected: PASS [Same-cross-same redirect chain with no TAO opt-in] - expected: FAIL + expected: PASS [Same origin previous document with same origin redirect] expected: FAIL [Redirect chain with full TAO opt-in] - expected: FAIL + expected: PASS [Previous document same origin] expected: FAIL [No previous document] - expected: FAIL + expected: PASS [No previous document with cross origin redirect] - expected: FAIL + expected: PASS [Previous document cross origin] - expected: FAIL + expected: PASS [No previous document with cross origin redirect with TAO] - expected: FAIL + expected: PASS [No previous document with cross origin redirect with partial TAO] - expected: FAIL + expected: PASS diff --git a/tests/wpt/metadata/performance-timeline/not-clonable.html.ini b/tests/wpt/metadata/performance-timeline/not-clonable.html.ini deleted file mode 100644 index 36b6b7a914a..00000000000 --- a/tests/wpt/metadata/performance-timeline/not-clonable.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[not-clonable.html] - [Test that a postMessage of a performance entry fails] - expected: FAIL - diff --git a/tests/wpt/metadata/resource-timing/TAO-crossorigin-port.sub.html.ini b/tests/wpt/metadata/resource-timing/TAO-crossorigin-port.sub.html.ini deleted file mode 100644 index 8b3a23c8ea6..00000000000 --- a/tests/wpt/metadata/resource-timing/TAO-crossorigin-port.sub.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[TAO-crossorigin-port.sub.html] - [Makes sure that the iframe passed the test and had an entry which passed the timing allow check] - expected: FAIL - diff --git a/tests/wpt/metadata/resource-timing/clear_resource_timing_functionality.html.ini b/tests/wpt/metadata/resource-timing/clear_resource_timing_functionality.html.ini index 4580ffd476f..98dd32b3984 100644 --- a/tests/wpt/metadata/resource-timing/clear_resource_timing_functionality.html.ini +++ b/tests/wpt/metadata/resource-timing/clear_resource_timing_functionality.html.ini @@ -1,6 +1,6 @@ [clear_resource_timing_functionality.html] [4 resource timing entries should be stored in this page.] - expected: FAIL + expected: PASS [No resource timing entries should be stored after clearResourceTimings.] expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/idlharness.any.js.ini b/tests/wpt/metadata/resource-timing/idlharness.any.js.ini index 7b28dbebd4e..b0801eea469 100644 --- a/tests/wpt/metadata/resource-timing/idlharness.any.js.ini +++ b/tests/wpt/metadata/resource-timing/idlharness.any.js.ini @@ -1,45 +1,45 @@ [idlharness.any.html] [PerformanceResourceTiming interface: attribute transferSize] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "transferSize" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute decodedBodySize] - expected: FAIL + expected: PASS [Stringification of resource] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "decodedBodySize" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute encodedBodySize] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "encodedBodySize" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming must be primary interface of resource] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "workerStart" with the proper type] expected: FAIL [PerformanceResourceTiming interface: attribute secureConnectionStart] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "secureConnectionStart" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute workerStart] expected: FAIL [PerformanceResourceTiming interface: resource must inherit property "domainLookupEnd" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute domainLookupEnd] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: default toJSON operation on resource] expected: FAIL @@ -50,37 +50,37 @@ expected: FAIL [PerformanceResourceTiming interface: attribute transferSize] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "secureConnectionStart" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "transferSize" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute decodedBodySize] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "domainLookupEnd" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "decodedBodySize" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute encodedBodySize] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: resource must inherit property "encodedBodySize" with the proper type] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute secureConnectionStart] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: attribute workerStart] expected: FAIL [PerformanceResourceTiming interface: attribute domainLookupEnd] - expected: FAIL + expected: PASS [PerformanceResourceTiming interface: default toJSON operation on resource] expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/resource_TAO_multi_wildcard.html.ini b/tests/wpt/metadata/resource-timing/resource_TAO_multi_wildcard.html.ini new file mode 100644 index 00000000000..8c1b20cbd37 --- /dev/null +++ b/tests/wpt/metadata/resource-timing/resource_TAO_multi_wildcard.html.ini @@ -0,0 +1,3 @@ +[resource_TAO_multi_wildcard.html] + [redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should not be all returned as 0 when the HTTP response has multiple Timing-Allow-Origin header fields and the subsequent field value is separated by a comma, i.e. TAO algorithm passes] + expected: FAIL \ No newline at end of file diff --git a/tests/wpt/metadata/resource-timing/resource_TAO_null.htm.ini b/tests/wpt/metadata/resource-timing/resource_TAO_null.htm.ini deleted file mode 100644 index 2c100c3d26f..00000000000 --- a/tests/wpt/metadata/resource-timing/resource_TAO_null.htm.ini +++ /dev/null @@ -1,4 +0,0 @@ -[resource_TAO_null.htm] - [redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the value of Timing-Allow-Origin is null and TAO algorithm fails] - expected: FAIL - diff --git a/tests/wpt/metadata/resource-timing/resource_TAO_origin_uppercase.htm.ini b/tests/wpt/metadata/resource-timing/resource_TAO_origin_uppercase.htm.ini deleted file mode 100644 index 7c5b455b088..00000000000 --- a/tests/wpt/metadata/resource-timing/resource_TAO_origin_uppercase.htm.ini +++ /dev/null @@ -1,4 +0,0 @@ -[resource_TAO_origin_uppercase.htm] - [redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the value of Timing-Allow-Origin is NOT a case-sensitive match for the value of the origin of the current document and TAO algorithm passes] - expected: FAIL - diff --git a/tests/wpt/metadata/resource-timing/resource_TAO_space.htm.ini b/tests/wpt/metadata/resource-timing/resource_TAO_space.htm.ini deleted file mode 100644 index d18dd65b509..00000000000 --- a/tests/wpt/metadata/resource-timing/resource_TAO_space.htm.ini +++ /dev/null @@ -1,4 +0,0 @@ -[resource_TAO_space.htm] - [redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the Timing-Allow-Origin header value of the HTTP response is a space separated origin/wildcard list] - expected: FAIL - diff --git a/tests/wpt/metadata/resource-timing/resource_TAO_zero.htm.ini b/tests/wpt/metadata/resource-timing/resource_TAO_zero.htm.ini deleted file mode 100644 index aa36a14c6a6..00000000000 --- a/tests/wpt/metadata/resource-timing/resource_TAO_zero.htm.ini +++ /dev/null @@ -1,25 +0,0 @@ -[resource_TAO_zero.htm] - [secureConnectionStart should be 0 in cross-origin request.] - expected: FAIL - - [domainLookupEnd should be 0 in cross-origin request.] - expected: FAIL - - [connectEnd should be 0 in cross-origin request.] - expected: FAIL - - [connectStart should be 0 in cross-origin request.] - expected: FAIL - - [There should be one resource timing entry.] - expected: FAIL - - [requestStart should be 0 in cross-origin request.] - expected: FAIL - - [domainLookupStart should be 0 in cross-origin request.] - expected: FAIL - - [responseEnd should be greater than 0 in cross-origin request.] - expected: FAIL - diff --git a/tests/wpt/metadata/resource-timing/resource_cached.htm.ini b/tests/wpt/metadata/resource-timing/resource_cached.htm.ini index aff4156ee6b..e7e4ae84fc3 100644 --- a/tests/wpt/metadata/resource-timing/resource_cached.htm.ini +++ b/tests/wpt/metadata/resource-timing/resource_cached.htm.ini @@ -1,4 +1,4 @@ [resource_cached.htm] [There should be two entries] - expected: FAIL + expected: PASS diff --git a/tests/wpt/metadata/resource-timing/resource_connection_reuse.html.ini b/tests/wpt/metadata/resource-timing/resource_connection_reuse.html.ini index 575076c1db5..f33ae593a3a 100644 --- a/tests/wpt/metadata/resource-timing/resource_connection_reuse.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_connection_reuse.html.ini @@ -1,6 +1,6 @@ [resource_connection_reuse.html] [There should be 2 PerformanceEntries] - expected: FAIL + expected: PASS [domainLookupEnd and fetchStart should be the same] expected: FAIL @@ -12,7 +12,7 @@ expected: FAIL [secureConnectionStart should be zero] - expected: FAIL + expected: PASS [connectEnd and fetchStart should be the same] expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/resource_connection_reuse.https.html.ini b/tests/wpt/metadata/resource-timing/resource_connection_reuse.https.html.ini index 0c3861d5f41..d5eb4715ae5 100644 --- a/tests/wpt/metadata/resource-timing/resource_connection_reuse.https.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_connection_reuse.https.html.ini @@ -1,6 +1,6 @@ [resource_connection_reuse.https.html] [There should be 2 PerformanceEntries] - expected: FAIL + expected: PASS [secureConnectionStart and fetchStart should be the same] expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content.html.ini b/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content.html.ini index 27b591a81d4..2aaddcd2d2f 100644 --- a/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content.html.ini @@ -1,6 +1,6 @@ [resource_connection_reuse_mixed_content.html] [There should be 2 PerformanceEntries] - expected: FAIL + expected: PASS [secureConnectionStart and fetchStart should be the same] expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content_redirect.html.ini b/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content_redirect.html.ini index 27a131b19bd..24d04814113 100644 --- a/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content_redirect.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content_redirect.html.ini @@ -1,6 +1,6 @@ [resource_connection_reuse_mixed_content_redirect.html] [There should be 2 PerformanceEntries] - expected: FAIL + expected: PASS [secureConnectionStart and fetchStart should be the same] expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/resource_dedicated_worker.html.ini b/tests/wpt/metadata/resource-timing/resource_dedicated_worker.html.ini new file mode 100644 index 00000000000..7a8f5eb9beb --- /dev/null +++ b/tests/wpt/metadata/resource-timing/resource_dedicated_worker.html.ini @@ -0,0 +1,3 @@ +[resource_dedicated_worker.html] + [There should be six entries: 4 scripts, 1 stylesheet, and the worker itself] + expected: FAIL \ No newline at end of file diff --git a/tests/wpt/metadata/resource-timing/resource_reparenting.html.ini b/tests/wpt/metadata/resource-timing/resource_reparenting.html.ini index 809b8c67a90..f3cac559376 100644 --- a/tests/wpt/metadata/resource-timing/resource_reparenting.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_reparenting.html.ini @@ -6,5 +6,5 @@ expected: FAIL [Testing resource entries] - expected: FAIL + expected: PASS diff --git a/tests/wpt/metadata/resource-timing/resource_reuse.sub.html.ini b/tests/wpt/metadata/resource-timing/resource_reuse.sub.html.ini index c7b33c2cd68..26852cd0a19 100644 --- a/tests/wpt/metadata/resource-timing/resource_reuse.sub.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_reuse.sub.html.ini @@ -1,4 +1,5 @@ [resource_reuse.sub.html] + expected: ERROR [Testing resource entries] expected: FAIL @@ -11,3 +12,6 @@ [requestStart should be non-zero on the same-origin request] expected: FAIL + [There should be only one entry] + expected: FAIL + diff --git a/tests/wpt/metadata/resource-timing/resource_script_types.html.ini b/tests/wpt/metadata/resource-timing/resource_script_types.html.ini index d397efd42bb..5fa3890b9d4 100644 --- a/tests/wpt/metadata/resource-timing/resource_script_types.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_script_types.html.ini @@ -30,5 +30,5 @@ expected: FAIL [Testing resource entries] - expected: FAIL + expected: PASS diff --git a/tests/wpt/metadata/resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html.ini b/tests/wpt/metadata/resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html.ini index a1c46103452..70ff58eb856 100644 --- a/tests/wpt/metadata/resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html.ini +++ b/tests/wpt/metadata/resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html.ini @@ -3,5 +3,5 @@ expected: FAIL [There are 4 scripts, and setResourceTimingBufferSize does not reduce the size.] - expected: FAIL + expected: PASS diff --git a/tests/wpt/metadata/workers/worker-performance.worker.js.ini b/tests/wpt/metadata/workers/worker-performance.worker.js.ini index bbacc75018a..d68b3fc39c3 100644 --- a/tests/wpt/metadata/workers/worker-performance.worker.js.ini +++ b/tests/wpt/metadata/workers/worker-performance.worker.js.ini @@ -9,9 +9,6 @@ [Can use clearMarks and clearMeasures in workers] expected: FAIL - [Resource timing seems to work in workers] - expected: FAIL - [performance.clearResourceTimings in workers] expected: FAIL