Revision e8c4654cef692388e68e8ded7a9316d6bd613570 authored by Darren Shen on 06 April 2018, 07:51:02 UTC, committed by Chromium WPT Sync on 06 April 2018, 07:51:02 UTC
We cannot support background-repeat and background-position yet because
they are both implemented as shorthands in Blink, but are not shorthands
in the spec.

We'd need to refactor the existing code to allow shorthands to reify
as proper Typed OM objects. There are also some tricky bits to support
styleMap.set with shorthands given a proper Typed OM object.

Bug: 820299
Change-Id: I064ce37a48bee3d73965b66b323e20abf5a9099f
Reviewed-on: https://chromium-review.googlesource.com/994593
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548705}
1 parent d6a82fd
Raw File
resource_TAO_origin.htm
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO tests</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});

// Explicitly test the namespace before we start testing.
test_namespace('getEntriesByType');

let iframe;
function setup_iframe() {
    iframe = document.getElementById('frameContext');
    iframe.addEventListener('load', onload_test, false);
}
function onload_test() {
    if (window.performance.getEntriesByType === undefined) {
      done();
      return;
    }
    const context = new PerformanceContext(iframe.contentWindow.performance);
    const entries = context.getEntriesByType('resource');

    test_equals(entries.length, 1, 'The iframe should have one resource timing entry.');
    const entry = entries[0];
    test_equals(entry.redirectStart, 0, 'redirectStart should be 0 in cross-origin request since no redirect.');
    test_equals(entry.redirectEnd, 0, 'redirectEnd should be 0 in cross-origin request since no redirect.');
    test_greater_than(entry.domainLookupStart, 0, 'domainLookupStart should not be 0 in timing-allow cross-origin request.');
    test_greater_than(entry.domainLookupEnd, 0, 'domainLookupEnd should not be 0 in timing-allow cross-origin request.');
    test_greater_than(entry.connectStart, 0, 'connectStart should not be 0 in timing-allow cross-origin request.');
    test_greater_than(entry.connectEnd, 0, 'connectEnd should not be 0 in timing-allow cross-origin request.');
    test_greater_than(entry.requestStart, 0, 'requestStart should not be 0 in timing-allow cross-origin request.');
    test_greater_than(entry.responseStart, 0, 'responseStart should not be 0 in timing-allow cross-origin request.');
    test_equals(entry.secureConnectionStart, 0, 'secureConnectionStart should be 0 in cross-origin request since no ssl!');
    test_greater_than(entry.fetchStart, 0, 'fetchStart should not be 0 in timing-allow cross-origin request.');
    test_greater_than(entry.responseEnd, 0, 'responseEnd should not be 0 in timing-allow cross-origin request.');
    done();
}
window.setup_iframe = setup_iframe;
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will pass when the value of Timing-Allow-Origin is a case-sensitive match for the value of the origin of the current document.</p>
<div id="log"></div>
<iframe id="frameContext" src="resources/iframe_TAO_origin.html"></iframe>
</body>
</html>
back to top