fix: automate graduate timetable read and refine blue glass Dock
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user