1 Commits
Author SHA1 Message Date
sneak f8f20155ab fix: the Chrome layout tests and popup comments use the popup's real 396x600 size (closes #556)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
POPUP_VIEWPORT in tests/e2e/run.js said 360x600, while body in
src/popup/styles/main.css is 396px wide and the background opens an
approval window at 396x600. It is now 396x600, defined once near the top
of the file, and the hostile token symbol's frame takes its size from it.

assertAddressesFit() now sets the page it measures to that size first.
Every page it measured, the popup's own screens and the two approval
prompts, was 1280x720, where a page never scrolls sideways, so its
sideways-scroll check could not fail. README's list of what the Chrome
suite leaves out says what sizing the page does not cover.

Comments in src/popup/index.html and tests/dustThreshold.test.js that
said 360x600 now say 396x600.

Model: opus-5-5
2026-10-20 11:02:07 +00:00
2 changed files with 5 additions and 13 deletions
+3 -4
View File
@@ -502,10 +502,9 @@ papered over:
opens while libsodium is still loading, is not driven.
- Approval windows open at 1280x720 whatever size the extension asks for. The
site-connection prompt and the transaction approval are checked for sideways
scrolling at 396x600 by sizing the page itself for that measurement only, and
the rest of each test runs at 1280x720. That leaves out the window's frame and
the page widening its window, so whether an approval screen fits its window is
checked in the Firefox suite only.
scrolling at 396x600 by sizing the page itself, which leaves out the window's
frame and the page widening its window, so whether an approval screen fits its
window is checked in the Firefox suite only.
Any test that drives a failure path on purpose declares the `console.error` it
is about to provoke, via `errors.expect()`. That is not a mute: the declaration
+2 -9
View File
@@ -5035,17 +5035,10 @@ function addressRowReport(page) {
// Measured at the popup's 396x600 (POPUP_VIEWPORT). Every page in this
// context, approval windows included, is otherwise 1280x720 whatever size
// the extension asks for, and a page that wide never scrolls sideways. The
// page is then put back to the size it had, so the size a later step runs at
// does not depend on whether this one ran.
// page keeps the new size afterwards.
async function assertAddressesFit(page, where) {
const sizeBefore = page.viewportSize();
await page.setViewportSize(POPUP_VIEWPORT);
let report;
try {
report = await addressRowReport(page);
} finally {
await page.setViewportSize(sizeBefore);
}
const report = await addressRowReport(page);
assert(
report.rows.length > 0,
where + ": no address rows were rendered, so nothing was measured",