feat: 配置 WebView 数据目录,优化 WebView 性能;更新 homeUrl 方法以支持更好的 URL 生成逻辑
This commit is contained in:
@@ -11,16 +11,20 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('passes shell branding name and logo to the H5 URL', () {
|
||||
test('loads the configured H5 root URL with shell branding', () {
|
||||
const logo = 'data:image/png;base64,abc+/=';
|
||||
|
||||
final uri = Uri.parse(
|
||||
AppConfig.homeUrl(appName: 'Shell Test', appLogo: logo),
|
||||
);
|
||||
|
||||
expect(uri.scheme, 'https');
|
||||
expect(uri.host, 'h5-im.imharry.work');
|
||||
expect(uri.path, '/');
|
||||
expect(uri.queryParameters['flutter_shell'], '1');
|
||||
expect(uri.queryParameters['shell_app_name'], 'Shell Test');
|
||||
expect(uri.queryParameters.containsKey('shell_app_logo'), isFalse);
|
||||
expect(uri.queryParameters['shell_cache_bust'], isNotEmpty);
|
||||
expect(uri.toString(), isNot(contains('%25')));
|
||||
expect(Uri.splitQueryString(uri.fragment)['shell_app_logo'], logo);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user