mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision e1edaa3dd1bea4415ee88e042affee32028d7f1d
This commit is contained in:
parent
0bd2661492
commit
0cb6acf9a2
4828 changed files with 87680 additions and 41620 deletions
|
@ -344,7 +344,7 @@ promise_test(() => {
|
|||
const plainSheet = new CSSStyleSheet();
|
||||
const redStyleSheetPromise = plainSheet.replace(redStyleTexts[0]);
|
||||
return redStyleSheetPromise.then(function(redStyleSheet) {
|
||||
assert_throws('NotAllowedError', () => { iframe.contentDocument.adoptedStyleSheets = [redStyleSheet]; });
|
||||
assert_throws_dom('NotAllowedError', () => { iframe.contentDocument.adoptedStyleSheets = [redStyleSheet]; });
|
||||
assert_equals(getComputedStyle(greenIframeSpan).color, "rgb(0, 0, 0)");
|
||||
assert_equals(getComputedStyle(redIframeSpan).color, "rgb(0, 0, 0)");
|
||||
assert_equals(getComputedStyle(blueIframeSpan).color, "rgb(0, 0, 0)");
|
||||
|
@ -396,7 +396,7 @@ promise_test(() => {
|
|||
const iframePlainSheet = new iframe.contentWindow.CSSStyleSheet();
|
||||
const iframeRedStyleSheetPromise = iframePlainSheet.replace(redStyleTexts[0]);
|
||||
return iframeRedStyleSheetPromise.then(function(iframeRedStyleSheet) {
|
||||
assert_throws('NotAllowedError', () => { document.adoptedStyleSheets = [iframeRedStyleSheet]; });
|
||||
assert_throws_dom('NotAllowedError', () => { document.adoptedStyleSheets = [iframeRedStyleSheet]; });
|
||||
assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
|
||||
assert_equals(getComputedStyle(redSpan).color, "rgb(0, 0, 0)");
|
||||
assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
|
||||
|
@ -433,7 +433,7 @@ const nonConstructedStyleSheet = nonConstructedStyle.sheet;
|
|||
|
||||
test(() => {
|
||||
assert_equals(getComputedStyle(divNonConstructed).color, "rgb(0, 0, 0)");
|
||||
assert_throws('NotAllowedError', () => { document.adoptedStyleSheets = [nonConstructedStyleSheet]; });
|
||||
assert_throws_dom('NotAllowedError', () => { document.adoptedStyleSheets = [nonConstructedStyleSheet]; });
|
||||
}, 'Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet is in the same document tree as the AdoptedStyleSheets');
|
||||
|
||||
test(() => {
|
||||
|
@ -444,7 +444,7 @@ test(() => {
|
|||
iframe.contentDocument.body.appendChild(iframeDiv);
|
||||
|
||||
assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
|
||||
assert_throws('NotAllowedError', () => { iframe.contentDocument.adoptedStyleSheets = [nonConstructedStyleSheet]; });
|
||||
assert_throws_dom('NotAllowedError', () => { iframe.contentDocument.adoptedStyleSheets = [nonConstructedStyleSheet]; });
|
||||
assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
|
||||
|
||||
iframeStyle = iframe.contentDocument.createElement("style");
|
||||
|
@ -456,7 +456,7 @@ test(() => {
|
|||
divNonConstructed.appendChild(nonConstructedSpan);
|
||||
|
||||
assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
|
||||
assert_throws('NotAllowedError', () => { document.adoptedStyleSheets = [iframeStyleSheet]; });
|
||||
assert_throws_dom('NotAllowedError', () => { document.adoptedStyleSheets = [iframeStyleSheet]; });
|
||||
assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
|
||||
}, 'Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet and the AdoptedStyleSheets are in different document trees');
|
||||
|
||||
|
@ -503,18 +503,18 @@ test(() => {
|
|||
const import_text = '@import url("support/constructable-import.css");';
|
||||
|
||||
test(() => {
|
||||
assert_throws("NotAllowedError", () => { (new CSSStyleSheet).replaceSync(import_text) });
|
||||
assert_throws_dom("NotAllowedError", () => { (new CSSStyleSheet).replaceSync(import_text) });
|
||||
}, 'CSSStyleSheet.replaceSync throws exception when there is import rule inside');
|
||||
|
||||
test(() => {
|
||||
assert_throws("NotAllowedError", () => { (new CSSStyleSheet).insertRule(import_text) });
|
||||
assert_throws_dom("NotAllowedError", () => { (new CSSStyleSheet).insertRule(import_text) });
|
||||
}, 'Inserting an @import rule through insertRule on a constructed stylesheet throws an exception');
|
||||
|
||||
async_test(t => {
|
||||
const importUrl = "support/constructable-import.css";
|
||||
const sheet = new CSSStyleSheet();
|
||||
|
||||
assert_throws("NotAllowedError", () => { sheet.replaceSync(`@import url("${importUrl}");`) });
|
||||
assert_throws_dom("NotAllowedError", () => { sheet.replaceSync(`@import url("${importUrl}");`) });
|
||||
|
||||
const timeAfterReplaceSync = performance.now();
|
||||
let link = document.createElement("link");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue