From b30a39e89dff39d5d5e47f7ed3eabbf3e0471ecd Mon Sep 17 00:00:00 2001 From: Morgan Rae Reschenberg Date: Tue, 30 Aug 2022 23:12:19 +0000 Subject: [PATCH] Bug 1786086: [Part 1] Add test to verify changing border style changes layout status r=Jamie Depends on D154011 Differential Revision: https://phabricator.services.mozilla.com/D155131 --- .../browser/e10s/browser_caching_table.js | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/accessible/tests/browser/e10s/browser_caching_table.js b/accessible/tests/browser/e10s/browser_caching_table.js index 58cf045e6fb9..10696002ec51 100644 --- a/accessible/tests/browser/e10s/browser_caching_table.js +++ b/accessible/tests/browser/e10s/browser_caching_table.js @@ -208,11 +208,9 @@ addAccessibleTask(
ab
`, async function(browser, docAcc) { - const layout = findAccessibleChildByID(docAcc, "layout", [ - nsIAccessibleTable, - ]); + const layout = findAccessibleChildByID(docAcc, "layout"); testAttrs(layout, { "layout-guess": "true" }, true); - const data = findAccessibleChildByID(docAcc, "data", [nsIAccessibleTable]); + const data = findAccessibleChildByID(docAcc, "data"); testAbsentAttrs(data, { "layout-guess": "true" }); const mutate = findAccessibleChildByID(docAcc, "mutate"); testAttrs(mutate, { "layout-guess": "true" }, true); @@ -232,9 +230,36 @@ addAccessibleTask( }, { chrome: true, - topLevel: isCacheEnabled, - iframe: isCacheEnabled, - remoteIframe: isCacheEnabled, + topLevel: true, + iframe: true, + remoteIframe: true, + } +); + +/** + * Test table layout guess with border styling changes. + */ +addAccessibleTask( + ` + +
ab
cd
cd
+ `, + async function(browser, docAcc) { + const layout = findAccessibleChildByID(docAcc, "layout"); + testAttrs(layout, { "layout-guess": "true" }, true); + info("changing border style on table cell"); + let styleChanged = waitForEvent(EVENT_TABLE_STYLING_CHANGED, layout); + await invokeContentTask(browser, [], () => { + content.document.getElementById("cell").style.border = "1px solid black"; + }); + await styleChanged; + testAbsentAttrs(layout, { "layout-guess": "true" }); + }, + { + chrome: true, + topLevel: true, + iframe: true, + remoteIframe: true, } );