bookmark feature rewrite

This commit is contained in:
Fabian Freund
2026-07-30 07:20:23 +02:00
parent 3a942a57a6
commit 33dfcf890c
46 changed files with 8107 additions and 4716 deletions
@@ -86,7 +86,9 @@ void main() {
test('is producible even for an ambiguous resolution', () {
// neverOpen never launches, so it does not need a bound package.
final rule = neverOpenRuleFor(_target(isAmbiguous: true, packageName: null));
final rule = neverOpenRuleFor(
_target(isAmbiguous: true, packageName: null),
);
expect(rule.decision, AppLinkRuleDecision.neverOpen);
expect(rule.isValid, isTrue);
});
@@ -80,15 +80,15 @@ void main() {
},
});
expect(parsed.length, 2);
expect(parsed['host:youtube.com']!.decision, AppLinkRuleDecision.alwaysOpen);
expect(
parsed['host:youtube.com']!.decision,
AppLinkRuleDecision.alwaysOpen,
);
});
test('drops entries whose map key disagrees with the rule scope', () {
final parsed = parseAppLinkRules({
'host:wrong.com': {
'decision': 'neverOpen',
'scope': 'host:right.com',
},
'host:wrong.com': {'decision': 'neverOpen', 'scope': 'host:right.com'},
});
expect(parsed, isEmpty);
});
@@ -23,11 +23,8 @@ import 'package:weblibre/features/app_links/domain/services/effective_routing.da
import 'package:weblibre/features/geckoview/features/tabs/data/models/site_assignment.dart';
import 'package:weblibre/features/proxy/data/proxy_connection.dart';
SiteAssignment _assignment(String site, {String? contextId}) => SiteAssignment(
id: site,
contextualIdentity: contextId,
assignedSite: site,
);
SiteAssignment _assignment(String site, {String? contextId}) =>
SiteAssignment(id: site, contextualIdentity: contextId, assignedSite: site);
void main() {
group('resolveContainerAssignment', () {