Commit c87046dc authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@b039d570bdada7a6f4ebe35fdb54c4f49d593c09

Using wpt-import in Chromium 332de339.
With Chromium commits locally applied on WPT:
5579aad0 "SharedWorker: Name shared workers identically in credentials mode WPT"
63f8588a "[WPT/common/security-features] Add more docs of generator and its types"
acd8a467 "SharedWorker: Use CSP headers to outside settings"


Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
bjonesbe@adobe.com:
  external/wpt/css/css-shapes
tdresser@chromium.org:
  external/wpt/navigation-timing

NOAUTOREVERT=true
TBR=robertma

No-Export: true
Change-Id: Ib0e9e9482dc5f60bb26c2041b06495465a789259
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2051188Reviewed-by: default avatarWPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#740636}
parent 7cf52825
......@@ -56,7 +56,7 @@ test_valid_value("shape-outside", "circle(7% at 8% 9%) border-box");
// <shape-box> <basic-shape>
test_valid_value("shape-outside", "padding-box inset(10em)", "inset(10em) padding-box");
test_valid_value("shape-outside", "border-box circle(7% at 8% 9%)", "circle(7% at 8% 9%) border-box");
test_valid_value("shape-outside", "margin-box ellipse(at 1em 2em)", "ellipse(at 1em 2em) margin-box");
test_valid_value("shape-outside", "margin-box ellipse(at 1em 2em)", ["ellipse(at 1em 2em) margin-box", "ellipse(at 1em 2em)"]);
test_valid_value("shape-outside", "content-box polygon(1% 2%)", "polygon(1% 2%) content-box");
// <image>
......
This is a testharness.js-based test.
PASS polygon(nonzero, 1px 1px) content-box - inline
PASS polygon(nonzero, 1px 1px) padding-box - inline
PASS polygon(nonzero, 1px 1px) border-box - inline
FAIL polygon(nonzero, 1px 1px) margin-box - inline assert_equals: expected "polygon(1px 1px)" but got "polygon(1px 1px) margin-box"
PASS content-box polygon(nonzero, 1px 1px) - inline
PASS padding-box polygon(nonzero, 1px 1px) - inline
PASS border-box polygon(nonzero, 1px 1px) - inline
FAIL margin-box polygon(nonzero, 1px 1px) - inline assert_equals: expected "polygon(1px 1px)" but got "polygon(1px 1px) margin-box"
PASS polygon(nonzero, 1px 1px) content-box - computed
PASS polygon(nonzero, 1px 1px) padding-box - computed
PASS polygon(nonzero, 1px 1px) border-box - computed
FAIL polygon(nonzero, 1px 1px) margin-box - computed assert_equals: expected "polygon(1px 1px)" but got "polygon(1px 1px) margin-box"
PASS content-box polygon(nonzero, 1px 1px) - computed
PASS padding-box polygon(nonzero, 1px 1px) - computed
PASS border-box polygon(nonzero, 1px 1px) - computed
FAIL margin-box polygon(nonzero, 1px 1px) - computed assert_equals: expected "polygon(1px 1px)" but got "polygon(1px 1px) margin-box"
Harness: the test ran to completion.
......@@ -34,8 +34,8 @@
},
{
"actual": "polygon(nonzero, 1px 1px) margin-box",
"expected_inline": "polygon(1px 1px) margin-box",
"expected_computed": "polygon(1px 1px) margin-box"
"expected_inline": "polygon(1px 1px)",
"expected_computed": "polygon(1px 1px)"
},
{
"actual": " content-box polygon(nonzero, 1px 1px)",
......@@ -54,8 +54,8 @@
},
{
"actual": "margin-box polygon(nonzero, 1px 1px)",
"expected_inline": "polygon(1px 1px) margin-box",
"expected_computed": "polygon(1px 1px) margin-box"
"expected_inline": "polygon(1px 1px)",
"expected_computed": "polygon(1px 1px)"
}
];
generate_tests( ParsingUtils.testInlineStyle,
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>window.performance.navigation attributes</title>
<link rel="author" title="Mozilla" href="https://www.mozilla.org/" />
<link rel="help" href="https://www.w3.org/TR/navigation-timing-2/#processing-model"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/performance-timeline-utils.js"></script>
<script src="resources/webperftestharness.js"></script>
</head>
<body>
<h1>Description</h1>
<p>This test checks that the transferSize, encodedBodySize and decodedBodySize attributes have correct values when checked in the onload handler</p>
<div id="log"></div>
<script>
async_test(async function (t) {
document.addEventListener("DOMContentLoaded", t.step_func_done(() => {
let entry = window.performance.getEntriesByType("navigation")[0];
assert_greater_than(entry.transferSize, 1000, "descr");
assert_greater_than(entry.encodedBodySize, 1000, "descr");
assert_greater_than(entry.decodedBodySize, 1000, "descr");
}));
}, "Test that the attributes have a proper value during DOMContentLoaded");
async_test(async function (t) {
window.addEventListener("load", t.step_func_done(() => {
let entry = window.performance.getEntriesByType("navigation")[0];
assert_greater_than(entry.transferSize, 1000, "descr");
assert_greater_than(entry.encodedBodySize, 1000, "descr");
assert_greater_than(entry.decodedBodySize, 1000, "descr");
async_test(async function (t) {
setTimeout(t.step_func_done(() => {
let entry = window.performance.getEntriesByType("navigation")[0];
assert_greater_than(entry.transferSize, 1000, "descr");
assert_greater_than(entry.encodedBodySize, 1000, "descr");
assert_greater_than(entry.decodedBodySize, 1000, "descr");
}), 0);
}, "Test that the attributes have a proper value during a task after onload");
}));
}, "Test that the attributes have a proper value during onload");
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment