<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Resource Timing - ResourceTiming for revalidation requests</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/rt-utilities.sub.js"></script>
<script src="resources/rt-revalidate-utilities.sub.js"></script>
</head>
<body>
<h1>Resource Timing: ResourceTiming for revalidation requests</h1>
<div id="log"></div>
<script>
// Cross Origin (revalidation request) with Timing Allow.

let crossOriginURLWithTao = createRevalidationURL({tao: true, crossOrigin: true});

promise_test(function(t) {
    let promise = observeResources(1).then(([entry]) => {
        assertAlways(entry);
        assertAllowedTimingData(entry);
    });
    makeRequest(crossOriginURLWithTao);
    return promise;
}, "Cross Origin network load (with TimingAllow)");

promise_test(function(t) {
    let promise = observeResources(1).then(([entry]) => {
        assertAlways(entry);
        assertAllowedTimingData(entry);
    });
    makeRequest(crossOriginURLWithTao, true);
    return promise;
}, "Cross Origin revalidation load (with TimingAllow)");
</script>
</body>
</html>
