mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-19 14:33:33 -04:00
@@ -0,0 +1,19 @@
|
||||
import { paramMock } from "../utils"
|
||||
|
||||
export function mockConvertXml() {
|
||||
const result = {
|
||||
ConvertXML: function(...args) {
|
||||
console.warn("convertXml.ConvertXML interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return ConvertXMLMock;
|
||||
}
|
||||
}
|
||||
const ConvertXMLMock = {
|
||||
convert: function(...args) {
|
||||
console.warn("ConvertXML.convert interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return paramMock.paramObjectMock;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -37,6 +37,7 @@ import { mockBundle } from './bundle'
|
||||
import { mockInnerBundle } from './innerBundleManager'
|
||||
import { mockUri } from './uri'
|
||||
import { mockXml } from './xml'
|
||||
import { mockConvertXml } from './convertxml'
|
||||
import { mockStatfs } from './statfs'
|
||||
import { mockSettings } from './settings'
|
||||
import { mockAbilityAccessCtrl } from './abilityAccessCtrl'
|
||||
@@ -122,6 +123,8 @@ export function mockRequireNapiFun() {
|
||||
return mockUri();
|
||||
case "xml":
|
||||
return mockXml();
|
||||
case "convertxml":
|
||||
return mockConvertXml();
|
||||
case "statfs":
|
||||
return mockStatfs();
|
||||
case "settings":
|
||||
|
||||
@@ -11,11 +11,6 @@ export function mockXml() {
|
||||
console.warn("xml.XmlPullParser interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return XmlPullParserMock;
|
||||
},
|
||||
ConvertXML: function(...args) {
|
||||
console.warn("xml.ConvertXML interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return ConvertXMLMock;
|
||||
}
|
||||
}
|
||||
const XmlSerializerMock = {
|
||||
@@ -58,20 +53,13 @@ export function mockXml() {
|
||||
setDocType: function(...args) {
|
||||
console.warn("XmlSerializer.setDocType interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
},
|
||||
}
|
||||
}
|
||||
const XmlPullParserMock = {
|
||||
parse: function(...args) {
|
||||
console.warn("XmlPullParser.parse interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
},
|
||||
}
|
||||
const ConvertXMLMock = {
|
||||
convert: function(...args) {
|
||||
console.warn("ConvertXML.convert interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return paramMock.paramObjectMock;
|
||||
},
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user