зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1709922 [wpt PR 28874] - Split the trickle.py test into a separate file, a=testonly
Automatic update from web-platform-tests Split the trickle.py test into a separate file The trickle.py test is slow - it trickles bytes out at 50ms per byte. This can cause timeout issues, especially on WPT.fyi. This is a speculative change to reduce/eliminate those failures. Change-Id: Idc4d71ccc7ff19962a922bc4440c1d71b08b28a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2876872 Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/master@{#880055} -- wpt-commits: 95c7d6ce299cf7d7047757f1aee5fef335f128e0 wpt-pr: 28874
This commit is contained in:
Родитель
317a483562
Коммит
1393c9566d
|
@ -0,0 +1,26 @@
|
|||
function runAllTests() {
|
||||
let divs = document.getElementsByTagName("div");
|
||||
for (let i = 0; i < divs.length; ++i) {
|
||||
let div = divs[i];
|
||||
let expectation = div.className;
|
||||
let iframes = div.getElementsByTagName("iframe");
|
||||
for (let j = 0; j < iframes.length; ++j) {
|
||||
let iframe = iframes[j];
|
||||
let src = iframe.src;
|
||||
let doc = iframe.contentWindow.document;
|
||||
test(function() {
|
||||
assert_equals(doc.characterSet, expectation, 'Check');
|
||||
if (expectation == "windows-1251" || expectation == "windows-1252" && !(src.endsWith("/XML.htm") || src.endsWith("/XML-trail.htm"))) {
|
||||
let fc = doc.firstChild;
|
||||
assert_equals(fc.nodeType, Node.COMMENT_NODE, 'Should have comment node');
|
||||
assert_true(fc.nodeValue.startsWith("?xml"), 'Should start with ?xml');
|
||||
} else if (expectation == "UTF-16BE" || expectation == "UTF-16LE") {
|
||||
let fc = doc.firstChild;
|
||||
assert_equals(fc.nodeType, Node.COMMENT_NODE, 'Should have comment node');
|
||||
assert_true(fc.nodeValue.startsWith("?x"), 'Should start with ?x');
|
||||
}
|
||||
}, "Check encoding " + expectation + ", " + src.substring(src.lastIndexOf("/") + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,33 +3,13 @@
|
|||
<title>Bogo-XML declaration</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=support/test_support.js></script>
|
||||
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
window.onload = function() {
|
||||
let divs = document.getElementsByTagName("div");
|
||||
for (let i = 0; i < divs.length; ++i) {
|
||||
let div = divs[i];
|
||||
let expectation = div.className;
|
||||
let iframes = div.getElementsByTagName("iframe");
|
||||
for (let j = 0; j < iframes.length; ++j) {
|
||||
let iframe = iframes[j];
|
||||
let src = iframe.src;
|
||||
let doc = iframe.contentWindow.document;
|
||||
test(function() {
|
||||
assert_equals(doc.characterSet, expectation, 'Check');
|
||||
if (expectation == "windows-1251" || expectation == "windows-1252" && !(src.endsWith("/XML.htm") || src.endsWith("/XML-trail.htm"))) {
|
||||
let fc = doc.firstChild;
|
||||
assert_equals(fc.nodeType, Node.COMMENT_NODE, 'Should have comment node');
|
||||
assert_true(fc.nodeValue.startsWith("?xml"), 'Should start with ?xml');
|
||||
} else if (expectation == "UTF-16BE" || expectation == "UTF-16LE") {
|
||||
let fc = doc.firstChild;
|
||||
assert_equals(fc.nodeType, Node.COMMENT_NODE, 'Should have comment node');
|
||||
assert_true(fc.nodeValue.startsWith("?x"), 'Should start with ?x');
|
||||
}
|
||||
}, "Check encoding " + expectation + ", " + src.substring(src.lastIndexOf("/") + 1));
|
||||
}
|
||||
}
|
||||
done();
|
||||
runAllTests();
|
||||
done();
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -75,6 +55,5 @@ window.onload = function() {
|
|||
<iframe src="support/VERSION-trail.htm"></iframe>
|
||||
<iframe src="support/WINDOWS-trail.htm"></iframe>
|
||||
<iframe src="support/zero-around-equals-trail.htm"></iframe>
|
||||
<iframe src="support/trickle.py"></iframe>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -3,33 +3,13 @@
|
|||
<title>Bogo-XML declaration</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=support/test_support.js></script>
|
||||
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
window.onload = function() {
|
||||
let divs = document.getElementsByTagName("div");
|
||||
for (let i = 0; i < divs.length; ++i) {
|
||||
let div = divs[i];
|
||||
let expectation = div.className;
|
||||
let iframes = div.getElementsByTagName("iframe");
|
||||
for (let j = 0; j < iframes.length; ++j) {
|
||||
let iframe = iframes[j];
|
||||
let src = iframe.src;
|
||||
let doc = iframe.contentWindow.document;
|
||||
test(function() {
|
||||
assert_equals(doc.characterSet, expectation, 'Check');
|
||||
if (expectation == "windows-1251" || expectation == "windows-1252" && !(src.endsWith("/XML.htm") || src.endsWith("/XML-trail.htm"))) {
|
||||
let fc = doc.firstChild;
|
||||
assert_equals(fc.nodeType, Node.COMMENT_NODE, 'Should have comment node');
|
||||
assert_true(fc.nodeValue.startsWith("?xml"), 'Should start with ?xml');
|
||||
} else if (expectation == "UTF-16BE" || expectation == "UTF-16LE") {
|
||||
let fc = doc.firstChild;
|
||||
assert_equals(fc.nodeType, Node.COMMENT_NODE, 'Should have comment node');
|
||||
assert_true(fc.nodeValue.startsWith("?x"), 'Should start with ?x');
|
||||
}
|
||||
}, "Check encoding " + expectation + ", " + src.substring(src.lastIndexOf("/") + 1));
|
||||
}
|
||||
}
|
||||
done();
|
||||
runAllTests();
|
||||
done();
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<meta charset="windows-1252">
|
||||
<title>Bogo-XML declaration</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=support/test_support.js></script>
|
||||
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
window.onload = function() {
|
||||
runAllTests();
|
||||
done();
|
||||
};
|
||||
</script>
|
||||
|
||||
<section style="display: none;">
|
||||
<div class="windows-1251">
|
||||
<iframe src="support/trickle.py"></iframe>
|
||||
</div>
|
||||
</section>
|
Загрузка…
Ссылка в новой задаче