Skip to content

Commit

Permalink
Revert "Add TimedHTMLParserBudget to fieldtrial_testing_config.json"
Browse files Browse the repository at this point in the history
This reverts commit 8538a928dc7750dfa8a3fe1661e518f86882995b.

Reason for revert:

Significant number of web test and wpt test failures on the Linux debug bot starting with:
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests%20(dbg)(1)/105948/overview
(which also had significant problems due to another change that has already been reverted)
and on the linux MSAN bot starting with:
https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Linux%20MSAN/15453

Original change's description:
> Add TimedHTMLParserBudget to fieldtrial_testing_config.json
>
> This exposed cases where some web_tests were implicitly depending on
> the parser yielding at specific times. The fixes here should make
> these tests less brittle in general.
>
> These issues can be reproduced with the current token based parser
> logic by inserting a bunch of <span>s at certain places in the HTML
> to force the parser to yield. The list of fixes:
> - createImageBitmap-sizeOverflow.html: this test was just broken in
>   general. It was not waiting for the assert_throws_dom code to run.
>   The test is now fixed by switching to a promise_test.
> - resource-selection-invoke-*: These tests were depending on not
>   yielding between scripts. The check they had in the separate
>   script was not very important and was brittle, and in the sync version
>   was already failing (see FAIL in expectations file).
> - track-selection-metadata.html: this test was depending on the parser
>   not yielding after executing the script. This was fixed by moving
>   the script outside the <video> element.
> - execution-timing/080.html: depended on the parser not yielding
>   between scripts.
> - about-blank-replacement-blank-nested-frame.html: depended on parser
>   not yielding between scripts.
> - fast/frames/*: exposed an existing bug where frame borders would not
>   be drawn if the parser yields at certain times. Filed this at
>   crbug.com/1338331. I fixed this by using CSS borders for the frames
>   instead of frameborder.
>
> Bug: 1314493
> Change-Id: I8ad7708659bc9690be2641a22bf4d5f24165dc8c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3716825
> Reviewed-by: Mason Freed <[email protected]>
> Commit-Queue: Clark DuVall <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1017439}

Bug: 1314493
Change-Id: I33559fc381f943a12cfca56fd50ea378303c10c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3721408
Bot-Commit: Rubber Stamper <[email protected]>
Commit-Queue: David Baron <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1017627}
  • Loading branch information
dbaron authored and chromium-wpt-export-bot committed Jun 24, 2022
1 parent 20cb864 commit 7de183d
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,56 @@
<script>
promise_test(function() {
var imgData = new ImageData(20, 20);
return createImageBitmap(imgData, 4294967400, 10, 10, 10);
return new Promise(function(resolve, reject) {
createImageBitmap(imgData, 4294967400, 10, 10, 10).then(resolve, reject);
});
}, "createImageBitmap does not crash or reject the promise when passing very large sx");

promise_test(function() {
var imgData = new ImageData(20, 20);
return createImageBitmap(imgData, 10, 4294967400, 10, 10);
return new Promise(function(resolve, reject) {
createImageBitmap(imgData, 10, 4294967400, 10, 10).then(resolve, reject);
});
}, "createImageBitmap does not crash or reject the promise when passing very large sy");

promise_test(function() {
var imgData = new ImageData(20, 20);
return createImageBitmap(imgData, 10, 10, 4294967400, 10);
return new Promise(function(resolve, reject) {
createImageBitmap(imgData, 10, 10, 4294967400, 10).then(resolve, reject);
});
}, "createImageBitmap does not crash or reject the promise when passing very large sw");

promise_test(function() {
var imgData = new ImageData(20, 20);
return createImageBitmap(imgData, 10, 10, 10, 4294967400);
return new Promise(function(resolve, reject) {
createImageBitmap(imgData, 10, 10, 10, 4294967400).then(resolve, reject);
});
}, "createImageBitmap does not crash or reject the promise when passing very large sh");

promise_test(function() {
var imgData = new ImageData(20, 20);
return createImageBitmap(imgData, 4294967400, 4294967400, 4294967400, 4294967400);
return new Promise(function(resolve, reject) {
createImageBitmap(imgData, 4294967400, 4294967400, 4294967400, 4294967400).then(resolve, reject);
});
}, "createImageBitmap does not crash or reject the promise when passing very large sx, sy, sw and sh");

promise_test(function(t) {
async_test(function(t) {
var imgData = new ImageData(20, 20);
var imageBitmapOptions = {imageOrientation:'none', premultiplyAlpha:'default',
colorSpaceConversion:'none', resizeHeight:2122252543, resizeQuality:'high'};
return createImageBitmap(imgData, 0, 0, 4294967295, 64)
.then(imageBitmap => promise_rejects_dom(t, "InvalidStateError",
createImageBitmap(imageBitmap, imageBitmapOptions)));
createImageBitmap(imgData, 0, 0, 4294967295, 64).then(function(imageBitmap){
assert_throws_dom("InvalidStateError", function() {createImageBitmap(imageBitmap, imageBitmapOptions);});});
t.done();
}, "createImageBitmap throws an InvalidStateError error with big imageBitmap scaled up in big height");

promise_test(function(t) {
async_test(function(t) {
var imgData = new ImageData(20, 20);
var imageBitmapOptions = {imageOrientation:'none', premultiplyAlpha:'default',
colorSpaceConversion:'none', resizeWidth:2122252543, resizeQuality:'high'};
return createImageBitmap(imgData, 0, 0, 4294967295, 64)
.then(imageBitmap => promise_rejects_dom(t, "InvalidStateError",
createImageBitmap(imageBitmap, imageBitmapOptions)));
createImageBitmap(imgData, 0, 0, 4294967295, 64).then(function(imageBitmap){
assert_throws_dom("InvalidStateError", function() {createImageBitmap(imageBitmap, imageBitmapOptions);});});
t.done();
}, "createImageBitmap throws an InvalidStateError error with big imageBitmap scaled up in big width");
</script>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState after click()');
v.removeAttribute('src');
});
</script>
<script>
t.step(function() {
// now the sync section of resource selection should have run and should
// have found no src="" or <source> thus networkState being set to NETWORK_EMPTY.
// if the sync section was run when onclick returned, then networkState
// would be either NETWORK_LOADING or NETWORK_NO_SOURCE.
assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after src removed');
assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState in separate script');
t.done();
});
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<div id=log></div>
<script>
var v;
test(function() {
var t = async_test(function(t) {
v = document.createElement('video');
document.body.appendChild(v);
assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after appending v to document');
v.parentNode.removeChild(v); // search for "When a media element is removed from a Document,"
assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after removing v');
});
</script>
<script>
t.step(function() {
assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState in separate script');
t.done();
});
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@
<track kind="metadata" src="resources/class.vtt" default id="t2hidden">
<track kind="metadata" src="resources/metadata-area.vtt" id="t3">
<track kind="metadata" src="resources/webvtt-file.vtt" default id="t4hidden">
</video>
<script>
async_test(function() {
var video = document.querySelector('video');
video.onloadstart = this.step_func_done(function() {
assert_equals(video.textTracks.length, 4);
for (var track of video.textTracks) {
assert_equals(track.kind, 'metadata');
<script>
async_test(function() {
var video = document.querySelector('video');
video.onloadstart = this.step_func_done(function() {
assert_equals(video.textTracks.length, 4);
for (var track of video.textTracks) {
assert_equals(track.kind, 'metadata');

var trackElement = document.getElementById(track.id);
if (track.id.indexOf('hidden') != -1) {
assert_true(trackElement.default);
assert_equals(track.mode, 'hidden');
} else {
assert_false(trackElement.default);
assert_equals(track.mode, 'disabled');
var trackElement = document.getElementById(track.id);
if (track.id.indexOf('hidden') != -1) {
assert_true(trackElement.default);
assert_equals(track.mode, 'hidden');
} else {
assert_false(trackElement.default);
assert_equals(track.mode, 'disabled');
}
}
}
});
});

video.src = getVideoURI("/media/test");
});
</script>
video.src = getVideoURI("/media/test");
});
</script>
</video>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html><head>
<title>scheduler: IFRAMEs added with DOM (appendChild), javascript: URL</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="testlib/testlib.js"></script>
</head>
<body>

<div id="log">FAILED (This TC requires JavaScript enabled)</div>
<div></div>
<script>log('inline script #1');
var iframe=document.createElement('iframe');
iframe.src='javascript:parent.log(\'JS URL\');\'<html><script>parent.log(\\\'frame script\\\')<\/script></html>\'';
document.getElementsByTagName('div')[1].appendChild(iframe);
log('end script #1');
</script>

<script type="text/javascript">
log( 'inline script #2' );
var t = async_test()

function test() {
assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2', 'JS URL', 'frame script']);
t.done();
}
onload = t.step_func(function(){setTimeout(t.step_func(test), 400);})
</script>

</body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
function nestedLoaded() {
parent.postMessage({ type: 'NESTED_LOADED' }, '*');
}

</script>
<iframe id="nested" onload="nestedLoaded()"></iframe>
<script>
// Helper routine to make it slightly easier for our parent to find
// the nested frame.
function nested() {
Expand All @@ -16,6 +18,5 @@
// test the case where the initial about:blank document is not
// directly accessed before load.
</script>
<iframe id="nested" onload="nestedLoaded()"></iframe>
</body>
</html>

0 comments on commit 7de183d

Please sign in to comment.