mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 20:44:48 -04:00
Signed-off-by: 江海<jianghai14@huawei.com>
This commit is contained in:
@@ -246,6 +246,16 @@ export function mockUpdate() {
|
||||
UpgradeStatus,
|
||||
EventClassify,
|
||||
EventId,
|
||||
UpgradeInfo,
|
||||
BusinessType,
|
||||
DownloadOptions,
|
||||
ResumeDownloadOptions,
|
||||
PauseDownloadOptions,
|
||||
UpgradeOptions,
|
||||
ClearOptions,
|
||||
EventClassifyInfo,
|
||||
UpgradeFile,
|
||||
UpgradeTaskCallback,
|
||||
getOnlineUpdater: function (...args) {
|
||||
console.warn("update.getOnlineUpdater interface mocked in the Previewer. How this interface works on the" +
|
||||
" Previewer may be different from that on a real device.")
|
||||
@@ -271,7 +281,6 @@ const BusinessVendor = {
|
||||
|
||||
const BusinessSubType = {
|
||||
FIRMWARE: 1,
|
||||
PARAM: 2,
|
||||
}
|
||||
|
||||
const ComponentType = {
|
||||
@@ -413,3 +422,48 @@ const EventInfo = {
|
||||
eventId: EventId.EVENT_TASK_RECEIVE,
|
||||
taskBody: TaskBody,
|
||||
}
|
||||
|
||||
const UpgradeInfo = {
|
||||
upgradeApp: "com.ohos.ota.updateclient",
|
||||
businessType: BusinessType
|
||||
}
|
||||
|
||||
const BusinessType = {
|
||||
vendor: BusinessVendor,
|
||||
subType: BusinessSubType
|
||||
}
|
||||
|
||||
const DownloadOptions = {
|
||||
allowNetwork: NetType,
|
||||
order: Order
|
||||
}
|
||||
|
||||
const ResumeDownloadOptions = {
|
||||
allowNetwork: NetType
|
||||
}
|
||||
|
||||
const PauseDownloadOptions = {
|
||||
isAllowAutoResume: boolean
|
||||
}
|
||||
|
||||
const UpgradeOptions = {
|
||||
order: Order
|
||||
}
|
||||
|
||||
const ClearOptions = {
|
||||
status: UpgradeStatus
|
||||
}
|
||||
|
||||
const EventClassifyInfo = {
|
||||
eventClassify: EventClassify,
|
||||
extraInfo: string
|
||||
}
|
||||
|
||||
const UpgradeFile = {
|
||||
fileType: ComponentType,
|
||||
filePath: string
|
||||
}
|
||||
|
||||
const UpgradeTaskCallback = {
|
||||
UpgradeTaskCallback: (eventInfo) => {}
|
||||
}
|
||||
Reference in New Issue
Block a user