Auto merge of #23873 - RestitutorOrbis:jn-add-tao, r=jdm

Add PerformanceResourceTiming:TimingAllowCheck

Added timing allow check to http_loader.rs in `fn http_network_fetch`.

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21270

### Things to Do
- [x] Map header values from Timing-Allow-Origin to URL types using [Url::Parse](https://docs.rs/url/2.0.0/url/)
- [x] Check equality of those header URL origin with the origin in question
- [x] Just use url instead of `res.origin`
- [x] Change `.set_attribute(ResourceAttribute::RedirectStart(0))` to `.set_attribute(ResourceAttribute::RedirectStart(RedirectStartValue::Zero))`
- [x] Change `.set_attribute(ResourceAttribute::RedirectEnd(0))` to `.set_attribute(ResourceAttribute::RedirectEnd(RedirectEndValue::Zero))`
- [x] Figure out how to set DomainLookupStart, RequestStart, and ResponseStart without directly passing value as part of enum
- [x] Figure out how to handle lack of DomainLookupEnd (#21260) and SecureConnectionStart (#21268)
- [x] add a flag to ResourceFetchTiming that indicates if the timing check passed, and only update timing attributes if that flag is false
- [x] add function to mark timing test as failed and set all attributes to 0
- [x] resolve compile error regarding move of header_strings variable
- [x] resolve URL parse errors that appear during test execution
- [x] ~~Fix /resource-timing/crossorigin-sandwich-no-TAO.sub.html~~ (Refer to resource_TAO_cross_origin_redirect_chain.html)
- [x] ~~Fix /resource-timing/crossorigin-sandwich-TAO.sub.html~~ (Refer to resource_TAO_cross_origin_redirect_chain.html)
- [x] ~~Fix /resource-timing/resource-reload-TAO.sub.html~~ (Get TIMEOUT, fails on Firefox too?)
- [x] ~~Fix /resource-timing/resource_TAO_cross_origin_redirect_chain.html~~ (Problem seems to lie in loading the iFrame, when the request is made, the URL attached to the PerformanceResourceTiming interface is the initial URL set on the iFrame instead of the URL that is ultimately loaded)
- [x] ~~Fix resource-timing/resource_TAO_multi_wildcard.html~~ (Doesn't work because IMG element doesn't generate HTTP request with Origin field)
- [x] Fix /resource-timing/resource_TAO_match_origin.htm
- [x] Fix /resource-timing/resource_TAO_match_wildcard.htm
- [x] Fix /resource-timing/resource_TAO_multi.htm
- [x] Fix /resource-timing/resource_TAO_wildcard.htm
- [x] Fix /resource-timing/resource_TAO_zero.htm
- [x] Fix /resource-timing/resource_TAO_null.htm
- [x] Fix /resource-timing/resource_TAO_origin.htm (tests for responseStart and domainLookupEnd fail because #21260 and #21271 haven't been resolved)
- [x] Fix /resource-timing/resource_TAO_space.htm
- [x] Fix /resource-timing/resource_TAO_origin_uppercase.htm
- [x] ~~Fix /resource-timing/resource_timing_TAO_cross_origin_redirect.html~~ (Refer to resource_TAO_cross_origin_redirect_chain.html)
- [x] ~~Fix /resource-timing/TAO-case-insensitive-null-opaque-origin.sub.html~~ (TIMEOUT, doesn't seem to parse iFrame SRC correctly? There doesn't seem to be any sign that it makes a request to TAOResponse.py)
- [x] Fix /resource-timing/TAO-crossorigin-port.sub.html
- [x] ~~Fix /resource-timing/TAO-null-opaque-origin.sub.html~~ (Refer to /resource-timing/TAO-crossorigin-port.sub.html)
- [x] /navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html
- [x] /navigation-timing/nav2_test_document_open.html
- [x] /navigation-timing/nav2_test_frame_removed.html
- [x] /performance-timeline/not-clonable.html
- [x] /navigation-timing/nav2_test_redirect_xserver.html
- [x] /resource-timing/resource_connection_reuse.https.html
- [x] /resource-timing/resource_reparenting.html
- [x] /resource-timing/resource_connection_reuse.html
- [x] /resource-timing/resource_script_types.html
- [x] /resource-timing/idlharness.any.html
- [x] /resource-timing/clear_resource_timing_functionality.html
- [x] /resource-timing/idlharness.any.worker.html
- [x] /resource-timing/resource_cached.htm
- [x] /resource-timing/resource_connection_reuse_mixed_content_redirect.html
- [x] /resource-timing/resource_connection_reuse_mixed_content.html
- [x] /resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html
- [x] /navigation-timing/idlharness.window.html
- [x] /navigation-timing/nav2_test_navigate_iframe.html
- [x] /navigation-timing/nav2_test_navigate_within_document.html
- [x] /resource-timing/resource_reuse.sub.html
- [x] /navigation-timing/nav2_test_instance_accessible_from_the_start.html
- [x] /resource-timing/resource_dedicated_worker.html
- [x] /navigation-timing/unload-event-same-origin-check.html
- [x] /navigation-timing/nav2_test_navigation_type_backforward.html

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23873)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-09-24 19:11:28 -04:00 committed by GitHub
commit e6b271d329
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 183 additions and 147 deletions

View file

@ -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<Sender<DevtoolsControlMsg>>,
pub filemanager: FileManager,
pub cancellation_listener: Arc<Mutex<CancellationListener>>,
pub timing: Arc<Mutex<ResourceFetchTiming>>,
pub timing: ServoArc<Mutex<ResourceFetchTiming>>,
}
pub struct CancellationListener {

View file

@ -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<Response> = 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(),

View file

@ -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_ {

View file

@ -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,
))),
};

View file

@ -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,
))),
}

View file

@ -232,6 +232,8 @@ impl FetchTaskTarget for IpcSender<FetchResponseMsg> {
} 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.

View file

@ -114,7 +114,8 @@ pub struct Response {
#[ignore_malloc_size_of = "AtomicBool heap size undefined"]
pub aborted: Arc<AtomicBool>,
/// track network metrics
pub resource_timing: ResourceFetchTiming,
#[ignore_malloc_size_of = "Mutex heap size undefined"]
pub resource_timing: Arc<Mutex<ResourceFetchTiming>>,
}
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<Mutex<ResourceFetchTiming>> {
Arc::clone(&self.resource_timing)
}
/// Convert to a filtered response, of type `filter_type`.

View file

@ -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<DOMString>,
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)

View file

@ -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();
};

View file

@ -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

View file

@ -1,5 +0,0 @@
[nav2_test_document_open.html]
type: testharness
[Navigation Timing 2 WPT]
expected: FAIL

View file

@ -1,5 +0,0 @@
[nav2_test_frame_removed.html]
type: testharness
[Navigation Timing 2 WPT]
expected: FAIL

View file

@ -1,5 +1,5 @@
[nav2_test_instance_accessible_from_the_start.html]
type: testharness
[PerformanceNavigationTiming instance exists with reasonable values.]
expected: FAIL
expected: PASS

View file

@ -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

View file

@ -1,5 +1,5 @@
[nav2_test_navigate_within_document.html]
type: testharness
[Navigation Timing 2 WPT]
expected: FAIL
expected: PASS

View file

@ -1,5 +1,6 @@
[nav2_test_navigation_type_backforward.html]
type: testharness
expected: TIMEOUT
[Navigation Timing 2 WPT]
expected: FAIL
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[nav2_test_redirect_chain_xserver_partial_opt_in.html]
[Navigation Timing 2 WPT]
expected: FAIL

View file

@ -1,5 +0,0 @@
[nav2_test_redirect_xserver.html]
type: testharness
[Navigation Timing 2 WPT]
expected: FAIL

View file

@ -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

View file

@ -1,4 +0,0 @@
[not-clonable.html]
[Test that a postMessage of a performance entry fails]
expected: FAIL

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,4 @@
[resource_cached.htm]
[There should be two entries]
expected: FAIL
expected: PASS

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,3 @@
[resource_dedicated_worker.html]
[There should be six entries: 4 scripts, 1 stylesheet, and the worker itself]
expected: FAIL

View file

@ -6,5 +6,5 @@
expected: FAIL
[Testing resource entries]
expected: FAIL
expected: PASS

View file

@ -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

View file

@ -30,5 +30,5 @@
expected: FAIL
[Testing resource entries]
expected: FAIL
expected: PASS

View file

@ -3,5 +3,5 @@
expected: FAIL
[There are 4 scripts, and setResourceTimingBufferSize does not reduce the size.]
expected: FAIL
expected: PASS

View file

@ -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