feat: color a site from its address, and offer a failed web page to the system browser

This commit is contained in:
randogoth 2026-10-11 22:32:44 +03:00
parent 56db479df0
commit 9d9f09ebc7
24 changed files with 597 additions and 25 deletions

View file

@ -77,6 +77,17 @@ void main() {
expect(await db.allPins(), {'capsule.example:1965': presented});
});
test('a failed load keeps the address the reader followed', () async {
final controller = browser(FakeFetch(const {}));
// Neither the address nor its wap. subdomain answers; the wap. guess
// is not left standing in for what the reader followed.
await controller.open('https://capsule.example/post');
expect(controller.error.value, isA<LoadFailed>());
expect(controller.currentAddress, 'https://capsule.example/post');
});
test('a certificate request is answered by binding an identity', () async {
final controller = browser(FakeFetch(
{'gemini://capsule.example': '# Hello\n\nText.'},