зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1441390 [wpt PR 9518] - Add test for wrappable content that has flex:none, a=testonly
Automatic update from web-platform-testsAdd test for wrappable content that has flex:none (#9518) Add test for wrappable content that has flex:none See https://bugzilla.mozilla.org/show_bug.cgi?id=1374540; per spec, the flex:none content should be allowed its full content width. This currently works in Chrome, Edge, Safari, and Opera. wpt-commits: a02389e2cc84576b8aa35bff9658f6db39003ed8 wpt-pr: 9518 wpt-commits: a02389e2cc84576b8aa35bff9658f6db39003ed8 wpt-pr: 9518
This commit is contained in:
Родитель
9ec9d5b402
Коммит
6104e826e0
|
@ -110727,6 +110727,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-flexbox/flexbox_flex-none-wrappable-content.html": [
|
||||
[
|
||||
"/css/css-flexbox/flexbox_flex-none-wrappable-content.html",
|
||||
[
|
||||
[
|
||||
"/css/css-flexbox/flexbox_flex-none-wrappable-content-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-flexbox/flexbox_flex-none.html": [
|
||||
[
|
||||
"/css/css-flexbox/flexbox_flex-none.html",
|
||||
|
@ -236584,6 +236596,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-flexbox/flexbox_flex-none-wrappable-content-ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-flexbox/flexbox_flex-unitless-basis-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -485283,6 +485300,14 @@
|
|||
"9e6b4d11350f15489db6a454f94d9a1118849f99",
|
||||
"support"
|
||||
],
|
||||
"css/css-flexbox/flexbox_flex-none-wrappable-content-ref.html": [
|
||||
"2b25e256bb4caad2a246bdfb10d04bf37cbb313c",
|
||||
"support"
|
||||
],
|
||||
"css/css-flexbox/flexbox_flex-none-wrappable-content.html": [
|
||||
"9311950e6319a66bcf5202e1bedbef723e63f17a",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-flexbox/flexbox_flex-none.html": [
|
||||
"97e73494da7313ed921bb6321f40974cbd310450",
|
||||
"reftest"
|
||||
|
@ -559736,7 +559761,7 @@
|
|||
"support"
|
||||
],
|
||||
"html/semantics/forms/textfieldselection/defaultSelection.html": [
|
||||
"c9568da864127d49974b970809312c953fb347b1",
|
||||
"f49a2316f73094a7a0b27d810453f40ef029636b",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/textfieldselection/original-id.json": [
|
||||
|
@ -565168,7 +565193,7 @@
|
|||
"support"
|
||||
],
|
||||
"innerText/getter.html": [
|
||||
"644b5b18359d26db9cd4d037b075ca016e2337b5",
|
||||
"28fc321d84fac1173da328bdfb65b052000fcb4d",
|
||||
"testharness"
|
||||
],
|
||||
"innerText/multiple-text-nodes.window.js": [
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for specifying flex:none on wrappable content should give content its full width</title>
|
||||
|
||||
<style>
|
||||
span {
|
||||
font-family: Ahem;
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div><span>XXX XXX XXX</span></div>
|
||||
|
||||
<div style="margin-top: 1em;">You should see three green rectangles above, all on the same line.</div>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Specifying flex:none on wrappable content should give content its full width</title>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-common">
|
||||
<meta name="assert" content="When content has flex:none, it should be given its full width">
|
||||
<link rel="match" href="flexbox_flex-none-wrappable-content-ref.html">
|
||||
|
||||
<style>
|
||||
span {
|
||||
font-family: Ahem;
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="display: flex; width: 5px;">
|
||||
<div style="flex: none;">
|
||||
<span>XXX XXX XXX</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 1em;">You should see three green rectangles above, all on the same line.</div>
|
|
@ -3,33 +3,26 @@
|
|||
<title></title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<textarea>g</textarea>
|
||||
<input type="text" value="foo">
|
||||
</input>
|
||||
<textarea>foo</textarea>
|
||||
<input type="text" value="foo"></input>
|
||||
<script>
|
||||
test(function() {
|
||||
let textarea = document.querySelector('textarea');
|
||||
assert_equals(textarea.selectionStart, 0);
|
||||
assert_equals(textarea.selectionEnd, 0);
|
||||
}, "Default selectionStart and selectionEnd for textarea");
|
||||
|
||||
test(function() {
|
||||
let textarea = document.querySelector('input');
|
||||
assert_equals(textarea.selectionStart, 0);
|
||||
assert_equals(textarea.selectionEnd, 0);
|
||||
}, "Default selectionStart and selectionEnd for input");
|
||||
for (let el of [document.querySelector("textarea"), document.querySelector("input")]) {
|
||||
test(function() {
|
||||
assert_equals(el.selectionStart, 0);
|
||||
assert_equals(el.selectionEnd, 0);
|
||||
}, `Default selectionStart and selectionEnd for ${el}`);
|
||||
|
||||
test(function() {
|
||||
let textarea = document.querySelector('textarea');
|
||||
textarea.value="g";
|
||||
assert_equals(textarea.selectionStart, 0);
|
||||
assert_equals(textarea.selectionEnd, 0);
|
||||
}, "selectionStart and selectionEnd do not change when same value set again");
|
||||
test(function() {
|
||||
el.value="foo";
|
||||
assert_equals(el.selectionStart, 0);
|
||||
assert_equals(el.selectionEnd, 0);
|
||||
}, `selectionStart and selectionEnd do not change when same value set again for ${el}`);
|
||||
|
||||
test(function() {
|
||||
let textarea = document.querySelector('textarea');
|
||||
textarea.value="G";
|
||||
assert_equals(textarea.selectionStart, 1);
|
||||
assert_equals(textarea.selectionEnd, 1);
|
||||
}, "selectionStart and selectionEnd change when value changed to upper case");
|
||||
test(function() {
|
||||
el.value="Foo";
|
||||
assert_equals(el.selectionStart, 3);
|
||||
assert_equals(el.selectionEnd, 3);
|
||||
}, `selectionStart and selectionEnd change when value changed to upper case for ${el}`);
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
<div id="container"></div>
|
||||
<svg id="svgContainer"></svg>
|
||||
<script>
|
||||
let container = document.querySelector('#container');
|
||||
let svgContainer = document.querySelector('#svgContainer');
|
||||
function testText(html, expectedPlain, msg) {
|
||||
textTextInContainer(container, html, expectedPlain, msg);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче