/** Test for Bug 861217 **/
async function runTest() {
// This test needs to be run on environments where the zoom level == 1, but
// there are a couple of cases it's not run on such kind of environments.
// 1) run this test solely like mach mochitest dom/tests/mochitest/general/test_bug861217.html .
// In this case the zoom level is smaller than 1 since there's no meta viewport.
// 2) run test test along with other tests in the same directory.
// In this case this test runs inside an iframe in the mochitest harness'
// top level document which doesn't have any meta viewport either.
// To avoid these situations we forcibly set the zoom level 1 here.
const resolution = await SpecialPowers.spawn(window.top, [], () => {
return SpecialPowers.getDOMWindowUtils(content.window).getResolution();
});
is(bcr1.width, 50, "Width of bounding client rect of #tableCell1");
is(tableCell1.scrollWidth, 100, "scrollWidth of #tableCell1");
is(bcr1.height, 100, "Height of bounding client rect of #tableCell1");
is(tableCell1.scrollHeight, 100, "scrollHeight of #tableCell1");
is(bcr2.width, 50, "Width of bounding client rect of #tableCell2");
is(tableCell2.scrollWidth, 107, "scrollWidth of #tableCell2");
is(bcr2.height, 105, "Height of bounding client rect of #tableCell2");
is(tableCell2.scrollHeight, 105, "scrollHeight of #tableCell2");
is(bcr3.width, 50, "Width of bounding client rect of #tableCell3");
is(tableCell3.scrollWidth, 108, "scrollWidth of #tableCell3");
is(bcr3.height, 110, "Height of bounding client rect of #tableCell3");
is(tableCell3.scrollHeight, 110, "scrollHeight of #tableCell3");
is(bcr4.width, 50, "Width of bounding client rect of #tableCell4");
is(tableCell4.scrollWidth, 104, "scrollWidth of #tableCell4");
is(bcr4.height, 100, "Height of bounding client rect of #tableCell4");
is(tableCell4.scrollHeight, 100, "scrollHeight of #tableCell4");
is(bcr5.width, 50, "Width of bounding client rect of #tableCell5");
is(tableCell5.scrollWidth, 109, "scrollWidth of #tableCell5");
is(bcr5.height, 100, "Height of bounding client rect of #tableCell5");
is(tableCell5.scrollHeight, 100, "scrollHeight of #tableCell5");
is(bcr6.width, 50, "Width of bounding client rect of #tableCell6");
is(tableCell6.scrollWidth, 100, "scrollWidth of #tableCell6");
is(bcr6.height, 100, "Height of bounding client rect of #tableCell6");
is(tableCell6.scrollHeight, 100, "scrollHeight of #tableCell6");
is(bcr7.width, 50, "Width of bounding client rect of #tableCell7");
is(tableCell7.scrollWidth, 115, "scrollWidth of #tableCell7");
is(bcr7.height, 100, "Height of bounding client rect of #tableCell7");
is(tableCell7.scrollHeight, 100, "scrollHeight of #tableCell7");
is(bcr8.width, 50, "Width of bounding client rect of #tableCell8");
is(tableCell8.scrollWidth, 122, "scrollWidth of #tableCell8");
is(bcr8.height, 129, "Height of bounding client rect of #tableCell8");
is(tableCell8.scrollHeight, 129, "scrollHeight of #tableCell8");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.