rastrillo / fiesta Public

Read the landing page after the no-script submit only once the new document has loaded

On a loaded fleet host TestTheLandingReadsWithNoScript failed twice
running (4c8fdef, de4107e) with "Inspected target navigated or closed
(-32000)". After it clicks the Settings form's submit, which with
scripts off is a navigation to the same page with a query and
#sample, it polled chromedp.Location every 50 ms until the URL moved.
A poll sent while Chromium was swapping the old document for the new
one is answered with that error, and the slower the renderer, the
wider that window.

Reproduced by throttling the page's CPU 30 times
(Emulation.setCPUThrottlingRate) in a scratch copy: the old drive
failed 18 of 20 runs, every one at that poll with that error.

The drive now asks the page nothing until the navigation is over: a
listener set up before the click waits for the main frame's
Page.frameNavigated and then the new document's Page.loadEventFired,
and only then reads the location. No retries and no polling. Under
the same 30x throttle it passed 50 of 50; under ordinary load (eight
gallery browser slices alongside, load average up to 23 on 16 cores)
it passed 50 of 50, as the old drive also did there. The whole
internal/www browser package passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 79e722b69925467871996a92dc2dee95dcc09d76 parent de4107e
1 file changed, +40 −11
  • internal/www/landing_browser_test.go +40 −11

CI passed — run details

CI log
=== gofmt ===
=== no-rastrillo ===
go test -run '^(TestFiestaNeverImportsRastrillo|TestThePublicPackagesLinkNoBrowser)$' -count=1 .
ok  	amadan.net/rastrillo/fiesta	0.208s
=== size ===
go test ./internal/build -run '^TestTheOneLinkIsUnder25KiBGzipped$' -count=1 -v
=== RUN   TestTheOneLinkIsUnder25KiBGzipped
    build_test.go:138: fiesta-plain.css: 152856 bytes, 22303 bytes gzipped (21.8 KiB of the 25.0 KiB limit)
    build_test.go:138: fiesta-signal.css: 152951 bytes, 22414 bytes gzipped (21.9 KiB of the 25.0 KiB limit)
    build_test.go:138: fiesta.css: 155770 bytes, 23018 bytes gzipped (22.5 KiB of the 25.0 KiB limit)
--- PASS: TestTheOneLinkIsUnder25KiBGzipped (0.02s)
PASS
ok  	amadan.net/rastrillo/fiesta/internal/build	0.024s
=== history ===
history: 16 commits; release tags: v1.0.0
=== suite ===
--- shard 0 of 48 ---
==> shard 0 of 48: make root
go build ./...
go vet ./...
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh root 'internal/gallery@3 cmd/fiesta@2 internal/www@2'
ok  	amadan.net/rastrillo/fiesta	5.967s
ok  	amadan.net/rastrillo/fiesta/check	9.050s
ok  	amadan.net/rastrillo/fiesta/example	0.128s
?   	amadan.net/rastrillo/fiesta/hack/seed/english	[no test files]
ok  	amadan.net/rastrillo/fiesta/internal/axe	0.076s
ok  	amadan.net/rastrillo/fiesta/internal/build	1.025s
ok  	amadan.net/rastrillo/fiesta/internal/codeview	0.010s
?   	amadan.net/rastrillo/fiesta/internal/harness	[no test files]
ok  	amadan.net/rastrillo/fiesta/internal/markup	0.010s
ok  	amadan.net/rastrillo/fiesta/internal/nodetest	0.287s
ok  	amadan.net/rastrillo/fiesta/internal/site	2.203s
ok  	amadan.net/rastrillo/fiesta/internal/tokens	0.003s
suite: root took 11s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m8.460000s 0m1.610000s
--- shard 1 of 48 ---
==> shard 1 of 48: make test.internal.gallery~1of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~1of3'
gotest: slice 1 of 3 of ./internal/gallery/ runs 35 of 105 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	60.305s
suite: test.internal.gallery~1of3 took 62s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m46.090000s 0m1.110000s
--- shard 2 of 48 ---
==> shard 2 of 48: make test.internal.gallery~2of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~2of3'
gotest: slice 2 of 3 of ./internal/gallery/ runs 35 of 105 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	56.522s
suite: test.internal.gallery~2of3 took 58s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m43.840000s 0m1.080000s
--- shard 3 of 48 ---
==> shard 3 of 48: make test.internal.gallery~3of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~3of3'
gotest: slice 3 of 3 of ./internal/gallery/ runs 35 of 105 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	53.481s
suite: test.internal.gallery~3of3 took 55s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m41.510000s 0m1.120000s
--- shard 4 of 48 ---
==> shard 4 of 48: make test.cmd.fiesta~1of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'cmd.fiesta~1of2'
gotest: slice 1 of 2 of ./cmd/fiesta/ runs 7 of 12 test tests
ok  	amadan.net/rastrillo/fiesta/cmd/fiesta	41.893s
suite: test.cmd.fiesta~1of2 took 43s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m30.710000s 0m1.940000s
--- shard 5 of 48 ---
==> shard 5 of 48: make test.cmd.fiesta~2of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'cmd.fiesta~2of2'
gotest: slice 2 of 2 of ./cmd/fiesta/ runs 5 of 12 test tests
ok  	amadan.net/rastrillo/fiesta/cmd/fiesta	46.483s
suite: test.cmd.fiesta~2of2 took 48s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m33.250000s 0m2.150000s
--- shard 6 of 48 ---
==> shard 6 of 48: make test.internal.www~1of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.www~1of2'
gotest: slice 1 of 2 of ./internal/www/ runs 11 of 25 test tests
ok  	amadan.net/rastrillo/fiesta/internal/www	56.802s
suite: test.internal.www~1of2 took 60s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m44.220000s 0m1.430000s
--- shard 7 of 48 ---
==> shard 7 of 48: make test.internal.www~2of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.www~2of2'
gotest: slice 2 of 2 of ./internal/www/ runs 14 of 25 test tests
ok  	amadan.net/rastrillo/fiesta/internal/www	54.374s
suite: test.internal.www~2of2 took 58s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m42.240000s 0m1.420000s
--- shard 8 of 48 ---
==> shard 8 of 48: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.8.2 -tags browser ./...
suite: staticcheck took 7s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m0.930000s 0m0.280000s
--- shard 9 of 48 ---
==> shard 9 of 48: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 2 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
suite: govulncheck took 7s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m2.890000s 0m0.450000s
--- shard 10 of 48 ---
==> shard 10 of 48: make gitleaks
go run github.com/zricethezav/gitleaks/v8@v8.30.1 git --no-banner --redact --log-opts='--full-history --diff-filter=tuxdb HEAD' .
2:04AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
2:04AM INF 16 commits scanned.
2:04AM INF scanned ~8193429 bytes (8.19 MB) in 2.23s
2:04AM INF no leaks found
suite: gitleaks took 7s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m6.930000s 0m0.250000s
--- shard 11 of 48 ---
==> shard 11 of 48: make browser.internal.harness
./hack/gotest.sh browser 'internal.harness'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: ./internal/harness/ runs its 10 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/harness	5.710s
suite: browser.internal.harness took 9s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m1.570000s 0m1.140000s
--- shard 12 of 48 ---
==> shard 12 of 48: make browser.check~1of13
./hack/gotest.sh browser 'check~1of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 1 of 13 of ./check/ runs 16 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	86.391s
suite: browser.check~1of13 took 94s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m40.160000s 0m13.410000s
--- shard 13 of 48 ---
==> shard 13 of 48: make browser.check~2of13
./hack/gotest.sh browser 'check~2of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 2 of 13 of ./check/ runs 16 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	84.894s
suite: browser.check~2of13 took 93s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m40.290000s 0m11.080000s
--- shard 14 of 48 ---
==> shard 14 of 48: make browser.check~3of13
./hack/gotest.sh browser 'check~3of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 3 of 13 of ./check/ runs 15 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	84.280s
suite: browser.check~3of13 took 92s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m33.860000s 0m11.920000s
--- shard 15 of 48 ---
==> shard 15 of 48: make browser.check~4of13
./hack/gotest.sh browser 'check~4of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 4 of 13 of ./check/ runs 15 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	85.183s
suite: browser.check~4of13 took 93s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m46.200000s 0m15.740000s
--- shard 16 of 48 ---
==> shard 16 of 48: make browser.check~5of13
./hack/gotest.sh browser 'check~5of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 5 of 13 of ./check/ runs 17 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	74.649s
suite: browser.check~5of13 took 83s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m28.750000s 0m11.660000s
--- shard 17 of 48 ---
==> shard 17 of 48: make browser.check~6of13
./hack/gotest.sh browser 'check~6of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 6 of 13 of ./check/ runs 17 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	76.456s
suite: browser.check~6of13 took 84s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m36.750000s 0m14.770000s
--- shard 18 of 48 ---
==> shard 18 of 48: make browser.check~7of13
./hack/gotest.sh browser 'check~7of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 7 of 13 of ./check/ runs 17 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	82.095s
suite: browser.check~7of13 took 90s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m36.630000s 0m13.350000s
--- shard 19 of 48 ---
==> shard 19 of 48: make browser.check~8of13
./hack/gotest.sh browser 'check~8of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 8 of 13 of ./check/ runs 16 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	83.329s
suite: browser.check~8of13 took 91s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m33.970000s 0m13.020000s
--- shard 20 of 48 ---
==> shard 20 of 48: make browser.check~9of13
./hack/gotest.sh browser 'check~9of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 9 of 13 of ./check/ runs 16 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	73.269s
suite: browser.check~9of13 took 81s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m22.220000s 0m8.910000s
--- shard 21 of 48 ---
==> shard 21 of 48: make browser.check~10of13
./hack/gotest.sh browser 'check~10of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 10 of 13 of ./check/ runs 16 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	81.794s
suite: browser.check~10of13 took 90s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m30.860000s 0m11.160000s
--- shard 22 of 48 ---
==> shard 22 of 48: make browser.check~11of13
./hack/gotest.sh browser 'check~11of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 11 of 13 of ./check/ runs 16 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	78.112s
suite: browser.check~11of13 took 86s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m34.030000s 0m13.280000s
--- shard 23 of 48 ---
==> shard 23 of 48: make browser.check~12of13
./hack/gotest.sh browser 'check~12of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 12 of 13 of ./check/ runs 17 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	79.401s
suite: browser.check~12of13 took 87s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m34.970000s 0m13.410000s
--- shard 24 of 48 ---
==> shard 24 of 48: make browser.check~13of13
./hack/gotest.sh browser 'check~13of13'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 13 of 13 of ./check/ runs 17 of 211 browser tests
ok  	amadan.net/rastrillo/fiesta/check	73.561s
suite: browser.check~13of13 took 82s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m29.380000s 0m9.830000s
--- shard 25 of 48 ---
==> shard 25 of 48: make browser.internal.gallery~1of18
./hack/gotest.sh browser 'internal.gallery~1of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 1 of 18 of ./internal/gallery/ runs 6 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	33.494s
suite: browser.internal.gallery~1of18 took 42s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m10.620000s 0m2.720000s
--- shard 26 of 48 ---
==> shard 26 of 48: make browser.internal.gallery~2of18
./hack/gotest.sh browser 'internal.gallery~2of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 2 of 18 of ./internal/gallery/ runs 6 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	49.367s
suite: browser.internal.gallery~2of18 took 57s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m11.280000s 0m3.450000s
--- shard 27 of 48 ---
==> shard 27 of 48: make browser.internal.gallery~3of18
./hack/gotest.sh browser 'internal.gallery~3of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 3 of 18 of ./internal/gallery/ runs 6 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	58.279s
suite: browser.internal.gallery~3of18 took 66s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m12.190000s 0m3.860000s
--- shard 28 of 48 ---
==> shard 28 of 48: make browser.internal.gallery~4of18
./hack/gotest.sh browser 'internal.gallery~4of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 4 of 18 of ./internal/gallery/ runs 6 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	58.011s
suite: browser.internal.gallery~4of18 took 66s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m14.380000s 0m5.110000s
--- shard 29 of 48 ---
==> shard 29 of 48: make browser.internal.gallery~5of18
./hack/gotest.sh browser 'internal.gallery~5of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 5 of 18 of ./internal/gallery/ runs 6 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	58.960s
suite: browser.internal.gallery~5of18 took 67s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m12.590000s 0m4.170000s
--- shard 30 of 48 ---
==> shard 30 of 48: make browser.internal.gallery~6of18
./hack/gotest.sh browser 'internal.gallery~6of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 6 of 18 of ./internal/gallery/ runs 6 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	53.467s
suite: browser.internal.gallery~6of18 took 62s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m11.260000s 0m3.490000s
--- shard 31 of 48 ---
==> shard 31 of 48: make browser.internal.gallery~7of18
./hack/gotest.sh browser 'internal.gallery~7of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 7 of 18 of ./internal/gallery/ runs 5 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	54.430s
suite: browser.internal.gallery~7of18 took 63s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m9.670000s 0m2.470000s
--- shard 32 of 48 ---
==> shard 32 of 48: make browser.internal.gallery~8of18
./hack/gotest.sh browser 'internal.gallery~8of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 8 of 18 of ./internal/gallery/ runs 5 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	56.920s
suite: browser.internal.gallery~8of18 took 65s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.840000s 0m4.760000s
--- shard 33 of 48 ---
==> shard 33 of 48: make browser.internal.gallery~9of18
./hack/gotest.sh browser 'internal.gallery~9of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 9 of 18 of ./internal/gallery/ runs 5 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	63.260s
suite: browser.internal.gallery~9of18 took 71s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m17.840000s 0m6.600000s
--- shard 34 of 48 ---
==> shard 34 of 48: make browser.internal.gallery~10of18
./hack/gotest.sh browser 'internal.gallery~10of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 10 of 18 of ./internal/gallery/ runs 2 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	60.262s
suite: browser.internal.gallery~10of18 took 68s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m9.840000s 0m2.470000s
--- shard 35 of 48 ---
==> shard 35 of 48: make browser.internal.gallery~11of18
./hack/gotest.sh browser 'internal.gallery~11of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 11 of 18 of ./internal/gallery/ runs 2 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	59.300s
suite: browser.internal.gallery~11of18 took 67s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m9.820000s 0m2.440000s
--- shard 36 of 48 ---
==> shard 36 of 48: make browser.internal.gallery~12of18
./hack/gotest.sh browser 'internal.gallery~12of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 12 of 18 of ./internal/gallery/ runs 2 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	61.434s
suite: browser.internal.gallery~12of18 took 70s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m14.330000s 0m4.480000s
--- shard 37 of 48 ---
==> shard 37 of 48: make browser.internal.gallery~13of18
./hack/gotest.sh browser 'internal.gallery~13of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 13 of 18 of ./internal/gallery/ runs 3 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	65.088s
suite: browser.internal.gallery~13of18 took 73s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.200000s 0m4.910000s
--- shard 38 of 48 ---
==> shard 38 of 48: make browser.internal.gallery~14of18
./hack/gotest.sh browser 'internal.gallery~14of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 14 of 18 of ./internal/gallery/ runs 4 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	66.270s
suite: browser.internal.gallery~14of18 took 74s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m14.840000s 0m4.900000s
--- shard 39 of 48 ---
==> shard 39 of 48: make browser.internal.gallery~15of18
./hack/gotest.sh browser 'internal.gallery~15of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 15 of 18 of ./internal/gallery/ runs 4 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	64.844s
suite: browser.internal.gallery~15of18 took 73s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.180000s 0m5.160000s
--- shard 40 of 48 ---
==> shard 40 of 48: make browser.internal.gallery~16of18
./hack/gotest.sh browser 'internal.gallery~16of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 16 of 18 of ./internal/gallery/ runs 5 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	60.835s
suite: browser.internal.gallery~16of18 took 69s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m11.870000s 0m3.770000s
--- shard 41 of 48 ---
==> shard 41 of 48: make browser.internal.gallery~17of18
./hack/gotest.sh browser 'internal.gallery~17of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 17 of 18 of ./internal/gallery/ runs 5 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	64.551s
suite: browser.internal.gallery~17of18 took 73s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.410000s 0m5.440000s
--- shard 42 of 48 ---
==> shard 42 of 48: make browser.internal.gallery~18of18
./hack/gotest.sh browser 'internal.gallery~18of18'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 18 of 18 of ./internal/gallery/ runs 5 of 83 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	64.819s
suite: browser.internal.gallery~18of18 took 73s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m14.720000s 0m5.000000s
--- shard 43 of 48 ---
==> shard 43 of 48: make browser.internal.gallery.history
./hack/gotest.sh browser 'internal.gallery.history'
gotest: on ip-172-31-27-121, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: ./internal/gallery/history/ runs its 3 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery/history	30.847s
suite: browser.internal.gallery.history took 38s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m20.020000s 0m1.900000s
--- shard 44 of 48 ---
==> shard 44 of 48: make browser.internal.www~1of4
./hack/gotest.sh browser 'internal.www~1of4'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 1 of 4 of ./internal/www/ runs 4 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	67.437s
suite: browser.internal.www~1of4 took 75s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m29.940000s 0m2.000000s
--- shard 45 of 48 ---
==> shard 45 of 48: make browser.internal.www~2of4
./hack/gotest.sh browser 'internal.www~2of4'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 2 of 4 of ./internal/www/ runs 6 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	64.410s
suite: browser.internal.www~2of4 took 72s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m43.870000s 0m2.690000s
--- shard 46 of 48 ---
==> shard 46 of 48: make browser.internal.www~3of4
./hack/gotest.sh browser 'internal.www~3of4'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 3 of 4 of ./internal/www/ runs 6 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	79.508s
suite: browser.internal.www~3of4 took 87s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m50.390000s 0m2.880000s
--- shard 47 of 48 ---
==> shard 47 of 48: make browser.internal.www~4of4
./hack/gotest.sh browser 'internal.www~4of4'
gotest: on ip-172-31-27-121, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 4 of 4 of ./internal/www/ runs 6 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	74.726s
suite: browser.internal.www~4of4 took 83s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m44.570000s 0m2.880000s
diff --git a/internal/www/landing_browser_test.go b/internal/www/landing_browser_test.go
index 23cd65c..a99b43d 100644
--- a/internal/www/landing_browser_test.go
+++ b/internal/www/landing_browser_test.go
@@ -433,19 +433,20 @@ func TestTheLandingReadsWithNoScript(t *testing.T) {
}
}
h.Seen(true)
+ // The submit is a navigation to a new document. Nothing may ask the
+ // page anything until that document has loaded: a question sent
+ // while the old one is being replaced is answered "Inspected target
+ // navigated or closed", which is how this drive failed on a loaded
+ // runner when it polled the location instead.
+ loaded := navigationLoaded(ctx)
mustRun(t, ctx, chromedp.Click(`#pane-settings button[type="submit"]`, chromedp.ByQuery))
- // The submit is a navigation: wait for the URL to move before
- // reading it, since the old document answers until it does.
- var loc string
- deadline := time.Now().Add(10 * time.Second)
- for {
- mustRun(t, ctx, chromedp.Location(&loc))
- if loc != rig.Origin+"/" || !time.Now().Before(deadline) {
- break
- }
- time.Sleep(50 * time.Millisecond)
+ select {
+ case <-loaded:
+ case <-time.After(30 * time.Second):
+ t.Fatal("submitting Settings with scripts off loaded no new document within 30s")
}
- mustRun(t, ctx, soon("#reasons"))
+ var loc string
+ mustRun(t, ctx, chromedp.Location(&loc), soon("#reasons"))
if !strings.HasPrefix(loc, rig.Origin+"/?") || !strings.HasSuffix(loc, "#sample") {
t.Errorf("after submitting Settings with scripts off the page is at %s; want the same page with a query, at #sample", loc)
}
@@ -457,6 +458,34 @@ func TestTheLandingReadsWithNoScript(t *testing.T) {
rig.Screen("#reasons", "the page after the submit")
}
+// navigationLoaded is closed once the main frame has navigated to a new
+// document and that document's load event has fired, in that order:
+// a load event of the document being left does not count. Call it
+// before the action that navigates, so neither event can be missed.
+func navigationLoaded(ctx context.Context) <-chan struct{} {
+ done := make(chan struct{})
+ lctx, cancel := context.WithCancel(ctx)
+ // The listener runs on chromedp's one event goroutine, so these
+ // need no lock; fired keeps a late event after cancel from closing
+ // done twice.
+ navigated, fired := false, false
+ chromedp.ListenTarget(lctx, func(ev any) {
+ switch e := ev.(type) {
+ case *cdppage.EventFrameNavigated:
+ if e.Frame.ParentID == "" {
+ navigated = true
+ }
+ case *cdppage.EventLoadEventFired:
+ if navigated && !fired {
+ fired = true
+ cancel()
+ close(done)
+ }
+ }
+ })
+ return done
+}
+
// firstFrameJS queues a reading from the head, before any stylesheet
// or script of the page's own: the first animation frame's theme
// variables, stylesheets, scheme and root attribute, which is what the