fix: automate graduate timetable read and refine blue glass Dock

This commit is contained in:
Codex
2026-10-13 17:50:04 +08:00
parent 8f20a341c4
commit 476ef097ee
23 changed files with 1072 additions and 176 deletions
@@ -2,6 +2,31 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:hepan_everyday/features/school/school_navigation_policy.dart';
void main() {
test(
'official HTTP graduate child frames can load for same-origin DOM reading',
() {
expect(
SchoolNavigationPolicy.canNavigate(
Uri.parse('http://yjsjy.uestc.edu.cn/pyxx/pygl/xskbcx/index/1'),
isMainFrame: false,
),
isTrue,
);
for (final value in [
'http://evil.test/pyxx/pygl/xskbcx/index/1',
'http://yjsjy.uestc.edu.cn:81/pyxx/pygl/xskbcx/index/1',
'http://user@yjsjy.uestc.edu.cn/pyxx/pygl/xskbcx/index/1',
]) {
expect(
SchoolNavigationPolicy.canNavigate(
Uri.parse(value),
isMainFrame: false,
),
isFalse,
);
}
},
);
test('secure captcha frames are allowed without authorizing credential injection', () {
final captcha = Uri.parse('https://captcha.example.test/challenge');
expect(