Create config_dir if none exist for caching (#35761)

* Create config_dir if none exist for caching

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* remove specialized behaviour for ohos; copy prefs.json if necessary

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* downgrade the log to trace verbosity

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* update wpt-test

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye 2025-03-19 02:36:33 +08:00 committed by GitHub
parent 9f93ccd942
commit 86957be5f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 40 additions and 7 deletions

View file

@ -17,6 +17,7 @@ interface InitOpts {
deviceType: string,
osFullName: string,
resourceDir: string,
cacheDir: string,
displayDensity: number,
commandlineArgs: string,
}
@ -109,13 +110,16 @@ struct Index {
.onLoad((xComponentContext) => {
this.xComponentContext = xComponentContext as ServoXComponentInterface;
let resource_dir: string = this.context.resourceDir;
console.debug("Resources are located at %{public}s", resource_dir);
let cache_dir: string = this.context.cacheDir;
console.debug("resourceDir: ", resource_dir);
console.debug("cacheDir: ", cache_dir);
let init_options: InitOpts = {
url: this.urlToLoad,
deviceType: get_device_type(),
osFullName: deviceInfo.osFullName,
displayDensity: get_density(),
resourceDir: resource_dir,
cacheDir: cache_dir,
commandlineArgs: this.CommandlineArgs
}
this.xComponentContext.initServo(init_options)