未验证 提交 517bb9b1 编写于 作者: O openharmony_ci 提交者: Gitee

!7533 【OpenHarmony 4.0.3.2】【master】【web】删除已迁移的api9接口

Merge pull request !7533 from 王旭鹏/master
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"test-timeout": "600000", "test-timeout": "600000",
"bundle-name": "com.open.harmony.aceEtsAttrLack", "bundle-name": "com.open.harmony.aceEtsAttrLack",
"package-name": "com.open.harmony.aceEtsAttrLack", "package-name": "com.open.harmony.aceEtsAttrLack",
"shell-timeout": "600000" "shell-timeout": "600000",
"testcase-timeout":"10000"
}, },
"kits": [ "kits": [
{ {
...@@ -16,4 +17,4 @@ ...@@ -16,4 +17,4 @@
"cleanup-apps": true "cleanup-apps": true
} }
] ]
} }
\ No newline at end of file
...@@ -79,8 +79,6 @@ struct WebEditText { ...@@ -79,8 +79,6 @@ struct WebEditText {
}) })
.onHttpErrorReceive((event) => { .onHttpErrorReceive((event) => {
console.log('setResponseHeader:' + event.response.setResponseHeader([])); console.log('setResponseHeader:' + event.response.setResponseHeader([]));
console.log('web getExtra:' + this.controller.getHitTestValue().getExtra());
console.log('web getType:' + this.controller.getHitTestValue().getType());
let result = event.request.getRequestHeader(); let result = event.request.getRequestHeader();
console.log('The request header result size is ' + result.length); console.log('The request header result size is ' + result.length);
for (let i of result) { for (let i of result) {
......
...@@ -84,6 +84,7 @@ export default function alertDialogCenterStartJsunit() { ...@@ -84,6 +84,7 @@ export default function alertDialogCenterStartJsunit() {
try { try {
let measureOptions = {textContent : "alertDialog-CenterStart"}; let measureOptions = {textContent : "alertDialog-CenterStart"};
let width = measure.measureText(measureOptions); let width = measure.measureText(measureOptions);
console.info("++++++++++++++++++++++" + width.toString());
expect(width > 0).assertFalse(); expect(width > 0).assertFalse();
done(); done();
} catch (err) { } catch (err) {
......
...@@ -127,10 +127,12 @@ struct Index { ...@@ -127,10 +127,12 @@ struct Index {
break; break;
} }
case "emitLoadUrl":{ case "emitLoadUrl":{
this.controller.loadUrl({url:"https://gitee.com/"}) this.controller.loadUrl({url:"resource://rawfile/index.html"})
setTimeout(()=>{ setTimeout(()=>{
let webTitle=this.controller.getTitle() this.controller.runJavaScript({script:"gettitle()",callback:(res)=>{
Utils.emitEvent(webTitle,110) console.info("gettitle1==>"+res)
Utils.emitEvent(res,110)
}})
},3000) },3000)
break; break;
} }
...@@ -165,25 +167,6 @@ struct Index { ...@@ -165,25 +167,6 @@ struct Index {
Utils.emitEvent("webId",120) Utils.emitEvent("webId",120)
break; break;
} }
case "emitGetTitle":{
this.controller.loadUrl({url:"resource://rawfile/index.html"});
setTimeout(()=>{
let webTitle=this.controller.getTitle()
Utils.emitEvent(webTitle,122)
},3000)
break;
}
case "emitGetPageHeight":{
this.controller.loadUrl({url:"resource://rawfile/index.html"});
let webPageHeight=this.controller.getPageHeight()+""
setTimeout(()=>{
this.controller.runJavaScript({script:"getPageHeight()",callback:(res)=>{
console.info("getPageHeight==>"+res)
Utils.emitEventTwo(res,webPageHeight,124)
}})
},3000)
break;
}
case "emitGetRequestFocus":{ case "emitGetRequestFocus":{
this.controller.loadUrl({url:"resource://rawfile/second.html"}); this.controller.loadUrl({url:"resource://rawfile/second.html"});
await Utils.sleep(2000) await Utils.sleep(2000)
...@@ -207,25 +190,18 @@ struct Index { ...@@ -207,25 +190,18 @@ struct Index {
} }
case "emitBackward":{ case "emitBackward":{
this.controller.backward() this.controller.backward()
this.controller.loadUrl({url:"resource://rawfile/index.html"});
setTimeout(()=>{ setTimeout(()=>{
let webTitle=this.controller.getTitle() this.controller.runJavaScript({script:"gettitle()",callback:(res)=>{
Utils.emitEvent(webTitle,134) Utils.emitEvent(res,134)
}})
},3000) },3000)
break; break;
} }
case "emitForward":{ case "emitForward":{
this.controller.forward() this.controller.forward()
setTimeout(()=>{ setTimeout(()=>{
let webTitle=this.controller.getTitle() Utils.emitEvent(this.newUrl,136)
Utils.emitEvent(webTitle,136)
},3000)
break;
}
case "emitBackOrForward":{
this.controller.backOrForward(-1)
setTimeout(()=>{
let webTitle=this.controller.getTitle()
Utils.emitEvent(webTitle,138)
},3000) },3000)
break; break;
} }
...@@ -363,10 +339,11 @@ struct Index { ...@@ -363,10 +339,11 @@ struct Index {
case "emitCacheModeDefault":{ case "emitCacheModeDefault":{
this.cacheMode=CacheMode.Default this.cacheMode=CacheMode.Default
await Utils.sleep(2000) await Utils.sleep(2000)
this.controller.loadUrl({url:"https://www.openharmony.cn/mainPlay"}) this.controller.loadUrl({url:"resource://rawfile/index.html"})
setTimeout(()=>{ setTimeout(()=>{
let webTitle=this.controller.getTitle() this.controller.runJavaScript({script:"gettitle()",callback:(res)=>{
Utils.emitEvent(webTitle,184) Utils.emitEvent(res,184)
}})
},3000) },3000)
break; break;
} }
...@@ -389,8 +366,9 @@ struct Index { ...@@ -389,8 +366,9 @@ struct Index {
this.controller.loadUrl({url:"resource://rawfile/index.html"}); this.controller.loadUrl({url:"resource://rawfile/index.html"});
this.controller.runJavaScript({script:"openRawFile()"}) this.controller.runJavaScript({script:"openRawFile()"})
setTimeout(()=>{ setTimeout(()=>{
let webTitle=this.controller.getTitle() this.controller.runJavaScript({script:"gettitle()",callback:(res)=>{
Utils.emitEvent(webTitle,190) Utils.emitEvent(res,190)
}})
},3000) },3000)
break; break;
} }
...@@ -452,62 +430,20 @@ struct Index { ...@@ -452,62 +430,20 @@ struct Index {
this.controller.loadUrl({url:"https://consumer.huawei.com/content/dam/huawei-cbg-site/cn/mkt/mobileservices/2022/download/PC107f1b3947c942ffaa14334a879065d8.2107261020.exe"}) this.controller.loadUrl({url:"https://consumer.huawei.com/content/dam/huawei-cbg-site/cn/mkt/mobileservices/2022/download/PC107f1b3947c942ffaa14334a879065d8.2107261020.exe"})
break; break;
} }
case "emitSetCookie":{
this.controller.getCookieManager().setCookie('http://www.baidu.com','e=f')
setTimeout(()=>{
let setCookieCalled = this.controller.getCookieManager().getCookie('http://www.baidu.com')
Utils.emitEvent(setCookieCalled,76)
},3000)
break;
}
case "emitGetCookie":{
this.controller.getCookieManager().setCookie('https://www.bilibili.com/','e=f')
setTimeout(()=>{
let getCookieCalled = this.controller.getCookieManager().getCookie('https://www.bilibili.com/')
Utils.emitEvent(getCookieCalled,69)
},3000)
break;
}
case "emitZoom":{ case "emitZoom":{
this.controller.loadUrl({url:"resource://rawfile/index.html"}); this.controller.loadUrl({url:"resource://rawfile/index.html"});
setTimeout(()=>{ this.controller.zoom(2)
this.controller.zoom(2) setTimeout(()=>{
setTimeout(() => { this.controller.runJavaScript({script:"getPageHeight()",callback:(res)=>{
if(this.controller.getPageHeight() > 1400){ console.info("getPageHeight++++++"+res)
var zoomCalled = true if(Number(res) > 1400){
} var zoomCalled = true
Utils.emitEvent(zoomCalled,77) }
},3000) Utils.emitEvent(zoomCalled,77)
}})
},5000) },5000)
break; break;
} }
case "emitZoomOut":{
setTimeout(()=>{
var zoomOutCalled = true
Utils.emitEvent(zoomOutCalled,78)
},3000)
break;
}
case "emitZoomIn":{
setTimeout(()=>{
var zoomInCalled = false
Utils.emitEvent(zoomInCalled,79)
},3000)
break;
}
case "emitDeleteEntireCookie":{
this.controller.getCookieManager().deleteEntireCookie()
setTimeout(()=>{
let deleteEntireCookieCalled = this.controller.getCookieManager().getCookie('http://www.baidu.com')
Utils.emitEvent(deleteEntireCookieCalled,80)
},3000)
break;
}
case "emitSaveCookieSync":{
let saveCookieSyncCalled = this.controller.getCookieManager().saveCookieSync()
Utils.emitEvent(saveCookieSyncCalled,81)
break;
}
case "emitClearHistory":{ case "emitClearHistory":{
this.controller.loadUrl({url:"http://www.baidu.com/"}) this.controller.loadUrl({url:"http://www.baidu.com/"})
setTimeout(()=>{ setTimeout(()=>{
...@@ -532,14 +468,17 @@ struct Index { ...@@ -532,14 +468,17 @@ struct Index {
break; break;
} }
case "emitOnInactive":{ case "emitOnInactive":{
this.controller.loadUrl({url:"resource://rawfile/index.html"});
this.controller.onInactive() this.controller.onInactive()
this.controller.zoomOut()
setTimeout(()=>{ setTimeout(()=>{
var onInactiveCalled = false var onInactiveCalled = false
if(this.controller.getPageHeight() < 2600){ this.controller.runJavaScript({script:"gettitle()",callback:(res)=>{
console.info("gettitle++++++"+res)
if(res == "\"index\""){
onInactiveCalled = true onInactiveCalled = true
} }
Utils.emitEvent(onInactiveCalled,84) Utils.emitEvent(onInactiveCalled,84)
}})
},3000) },3000)
break; break;
} }
...@@ -584,14 +523,6 @@ struct Index { ...@@ -584,14 +523,6 @@ struct Index {
},3000) },3000)
break; break;
} }
case "emitGetCookieManager":{
this.controller.getCookieManager().setCookie("https://weibo.com","a=b")
setTimeout(()=>{
let getCookieManagerCalled = this.controller.getCookieManager().getCookie('https://weibo.com')
Utils.emitEvent(getCookieManagerCalled,89)
},3000)
break;
}
case "emitWebVisibility":{ case "emitWebVisibility":{
this.webVisibility = Visibility.Hidden; this.webVisibility = Visibility.Hidden;
setTimeout(()=>{ setTimeout(()=>{
......
...@@ -70,4 +70,4 @@ struct Second { ...@@ -70,4 +70,4 @@ struct Second {
.overviewModeAccess(this.overviewModeAccess) .overviewModeAccess(this.overviewModeAccess)
} }
} }
} }
\ No newline at end of file
文件模式从 100755 更改为 100644
...@@ -166,4 +166,4 @@ export default class Utils { ...@@ -166,4 +166,4 @@ export default class Utils {
console.info(`[${testCaseName}] err:`+JSON.stringify(err)); console.info(`[${testCaseName}] err:`+JSON.stringify(err));
} }
} }
} }
\ No newline at end of file
...@@ -101,7 +101,7 @@ export default function webJsunit() { ...@@ -101,7 +101,7 @@ export default function webJsunit() {
*/ */
it('loadUrl',0,async function(done){ it('loadUrl',0,async function(done){
emitKey="emitRunJavaScript"; emitKey="emitRunJavaScript";
Utils.registerContainEvent("loadUrl","代码托管和研发协作平台",110,done); Utils.registerContainEvent("loadUrl","index",110,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -148,28 +148,8 @@ export default function webJsunit() { ...@@ -148,28 +148,8 @@ export default function webJsunit() {
*tc.desic Gets the id for the current Web *tc.desic Gets the id for the current Web
*/ */
it('getWebId',0,async function(done){ it('getWebId',0,async function(done){
emitKey="emitGetTitle";
Utils.registerEvent("getWebId","webId",120,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_012
*tc.name getTitle
*tc.desic Gets the title of current Web page
*/
it('getTitle',0,async function(done){
emitKey="emitGetPageHeight";
Utils.registerEvent("getTitle","index",122,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_013
*tc.name getPageHeight
*tc.desic Gets the content height of current Web page
*/
it('getPageHeight',0,async function(done){
emitKey="emitGetRequestFocus"; emitKey="emitGetRequestFocus";
Utils.registerEventTwo("getPageHeight",124,done); Utils.registerEvent("getWebId","webId",120,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -219,7 +199,7 @@ export default function webJsunit() { ...@@ -219,7 +199,7 @@ export default function webJsunit() {
*/ */
it('backward',0,async function(done){ it('backward',0,async function(done){
emitKey="emitForward"; emitKey="emitForward";
Utils.registerEvent("backward","index",134,done); Utils.registerEvent("backward","\"index\"",134,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -228,18 +208,8 @@ export default function webJsunit() { ...@@ -228,18 +208,8 @@ export default function webJsunit() {
*tc.desic Goes forward in the history of the web page *tc.desic Goes forward in the history of the web page
*/ */
it('forward',0,async function(done){ it('forward',0,async function(done){
emitKey="emitBackOrForward";
Utils.registerEvent("forward","second",136,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_020
*tc.name backOrForward
*tc.desic Goes forward or back backOrForward in the history of the web page
*/
it('backOrForward',0,async function(done){
emitKey="emitGeolocationAccessFalse"; emitKey="emitGeolocationAccessFalse";
Utils.registerEvent("backOrForward","index",138,done); Utils.registerEvent("forward","resource://rawfile/index.html",136,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -379,7 +349,7 @@ export default function webJsunit() { ...@@ -379,7 +349,7 @@ export default function webJsunit() {
*/ */
it('cacheModeDefault',0,async function(done){ it('cacheModeDefault',0,async function(done){
emitKey="emitMixedModeNone"; emitKey="emitMixedModeNone";
Utils.registerContainEvent("cacheModeDefault","OpenHarmony",184,done); Utils.registerContainEvent("cacheModeDefault","index",184,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -498,28 +468,8 @@ export default function webJsunit() { ...@@ -498,28 +468,8 @@ export default function webJsunit() {
*tc.desic Triggered when starting to download *tc.desic Triggered when starting to download
*/ */
it('onDownloadStart',0,async function(done){ it('onDownloadStart',0,async function(done){
emitKey="emitSetCookie";
Utils.registerEvent("onDownloadStart","https://consumer.huawei.com/content/dam/huawei-cbg-site/cn/mkt/mobileservices/2022/download/PC107f1b3947c942ffaa14334a879065d8.2107261020.exe",68,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_047
*tc.name setCookie
*tc.desic Sets the cookie
*/
it('setCookie',0,async function(done){
emitKey="emitGetCookie";
Utils.registerEvent("setCookie","e=f",76,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_048
*tc.name getCookie
*tc.desic Gets all cookies for the given URL
*/
it('getCookie',0,async function(done){
emitKey="emitZoom"; emitKey="emitZoom";
Utils.registerEvent("getCookie","e=f",69,done); Utils.registerEvent("onDownloadStart","https://consumer.huawei.com/content/dam/huawei-cbg-site/cn/mkt/mobileservices/2022/download/PC107f1b3947c942ffaa14334a879065d8.2107261020.exe",68,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -528,48 +478,8 @@ export default function webJsunit() { ...@@ -528,48 +478,8 @@ export default function webJsunit() {
*tc.desic Let the Web zoom by *tc.desic Let the Web zoom by
*/ */
it('zoom',0,async function(done){ it('zoom',0,async function(done){
emitKey="emitZoomOut";
Utils.registerEvent("zoom",true,77,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_050
*tc.name zoomOut
*tc.desic Let the Web zoom out
*/
it('zoomOut',0,async function(done){
emitKey="emitZoomIn";
Utils.registerEvent("zoomOut",true,78,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_051
*tc.name zoomIn
*tc.desic Let the Web zoom in
*/
it('zoomIn',0,async function(done){
emitKey="emitDeleteEntireCookie";
Utils.registerEvent("zoomIn",false,79,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_052
*tc.name deleteEntireCookie
*tc.desic Delete all cookies
*/
it('deleteEntireCookie',0,async function(done){
emitKey="emitSaveCookieSync";
Utils.registerEvent("deleteEntireCookie","",80,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_053
*tc.name saveCookieSync
*tc.desic Saves the cookies
*/
it('saveCookieSync',0,async function(done){
emitKey="emitClearHistory"; emitKey="emitClearHistory";
Utils.registerEvent("saveCookieSync",true,81,done); Utils.registerEvent("zoom",true,77,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -638,21 +548,10 @@ export default function webJsunit() { ...@@ -638,21 +548,10 @@ export default function webJsunit() {
*tc.desic Sets whether the Web allows JavaScript scripts to execute *tc.desic Sets whether the Web allows JavaScript scripts to execute
*/ */
it('javaScriptAccess',0,async function(done){ it('javaScriptAccess',0,async function(done){
emitKey="emitGetCookieManager";
Utils.registerEvent("javaScriptAccess",true,88,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_061
*tc.name getCookieManager
*tc.desic Gets network cookie manager
*/
it('getCookieManager',0,async function(done){
emitKey="emitWebVisibility"; emitKey="emitWebVisibility";
Utils.registerEvent("getCookieManager","a=b",89,done); Utils.registerEvent("javaScriptAccess",true,88,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
*tc.number SUB_ACE_BASIC_ETS_API_062 *tc.number SUB_ACE_BASIC_ETS_API_062
*tc.name webVisibility *tc.name webVisibility
......
...@@ -85,4 +85,4 @@ export default function webTwoJsunit() { ...@@ -85,4 +85,4 @@ export default function webTwoJsunit() {
sendEventByKey('webcomponenttwo',10,''); sendEventByKey('webcomponenttwo',10,'');
}) })
}) })
} }
\ No newline at end of file
...@@ -46,4 +46,4 @@ ...@@ -46,4 +46,4 @@
} }
] ]
} }
} }
\ No newline at end of file
...@@ -66,5 +66,8 @@ ...@@ -66,5 +66,8 @@
function openRawFile(){ function openRawFile(){
document.getElementById("fileAccess").click() document.getElementById("fileAccess").click()
} }
function gettitle(){
return document.title
}
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -9,4 +9,9 @@ ...@@ -9,4 +9,9 @@
<body> <body>
<div style="height: 1300px;background-color: #999999;">second pages</div> <div style="height: 1300px;background-color: #999999;">second pages</div>
</body> </body>
<script>
function gettitle(){
return document.title
}
</script>
</html> </html>
\ No newline at end of file
...@@ -25,7 +25,7 @@ let loadedUrl; ...@@ -25,7 +25,7 @@ let loadedUrl;
struct Index { struct Index {
controller:WebController = new WebController() controller:WebController = new WebController()
responseweb: WebResourceResponse = new WebResourceResponse() responseweb: WebResourceResponse = new WebResourceResponse()
@State str:string="emitStoreWebArchive" @State str:string="emitAllowGeolocation"
@State text:string="" @State text:string=""
@State textRatio:number=100 @State textRatio:number=100
@State zoomAccessValue:boolean=true @State zoomAccessValue:boolean=true
...@@ -74,16 +74,7 @@ struct Index { ...@@ -74,16 +74,7 @@ struct Index {
Row(){ Row(){
Button("web click").key('webcomponent').onClick(async ()=>{ Button("web click").key('webcomponent').onClick(async ()=>{
console.info("key==>"+this.str) console.info("key==>"+this.str)
switch(this.str){ switch(this.str){
case "emitStoreWebArchive":{
let webAsyncController = new web_webview.WebAsyncController(this.controller)
webAsyncController.storeWebArchive("/data/storage/el2/base/",true,(filename) => {
if(filename != null) {
Utils.emitEvent(filename,400)
}
})
break;
}
case "emitAllowGeolocation":{ case "emitAllowGeolocation":{
try { try {
web_webview.GeolocationPermissions.allowGeolocation("resource://rawfile/"); web_webview.GeolocationPermissions.allowGeolocation("resource://rawfile/");
...@@ -150,15 +141,6 @@ struct Index { ...@@ -150,15 +141,6 @@ struct Index {
},3000) },3000)
break; break;
} }
case "emitExistCookie":{
this.controller.getCookieManager().deleteEntireCookie();
setTimeout(()=>{
var result = web_webview.WebCookieManager.existCookie();
console.log(result.toString());
Utils.emitEvent(result,414)
},3000)
break ;
}
case "emitOnConsole":{ case "emitOnConsole":{
this.controller.runJavaScript({script:"consoleTest()"}) this.controller.runJavaScript({script:"consoleTest()"})
break; break;
...@@ -167,28 +149,32 @@ struct Index { ...@@ -167,28 +149,32 @@ struct Index {
this.controller.loadUrl({url:"resource://rawfile/index.html"}) this.controller.loadUrl({url:"resource://rawfile/index.html"})
setTimeout(()=>{ setTimeout(()=>{
this.controller.loadData({ this.controller.loadData({
data: "<html><title>index</title></html>", data: "<html><head><title>index</title></head><body bgcolor=\"white\">Source:<pre>source</pre</body><script>function gettitle(){return document.title}</script></html>",
mimeType: "text/html", mimeType: "text/html",
encoding: "UTF-8" encoding: "UTF-8"
}) })
},3000) },3000)
setTimeout(()=>{ setTimeout(()=>{
this.text = this.controller.getTitle(); this.controller.runJavaScript({script:"gettitle()",callback:(res)=>{
Utils.emitEvent(this.text,424) Utils.emitEvent(res,424)
}})
},4000) },4000)
break ; break ;
} }
case "emitZoomAccess":{ case "emitZoomAccess":{
this.zoomAccessValue = false this.zoomAccessValue = false
this.controller.refresh() this.controller.refresh()
var origin = this.controller.getPageHeight() setTimeout(()=>{
var zoomInCalled = false this.controller.runJavaScript({script:"getPageHeight()",callback:(res1)=>{
setTimeout(()=>{ var zoomInCalled = false
if (this.controller.getPageHeight() > origin) { this.controller.runJavaScript({script:"getPageHeight()",callback:(res)=>{
console.info("getPageHeight==>"+res)
if (Number(res) > Number(res1)) {
zoomInCalled = true zoomInCalled = true
} }
console.log("final" + this.controller.getPageHeight()) Utils.emitEvent(zoomInCalled,428);
Utils.emitEvent(zoomInCalled,428); }})
}})
},3000); },3000);
break ; break ;
} }
......
...@@ -144,4 +144,4 @@ export default class Utils { ...@@ -144,4 +144,4 @@ export default class Utils {
console.info("emit emitKey err: " + JSON.stringify(err)); console.info("emit emitKey err: " + JSON.stringify(err));
} }
} }
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
import { describe, beforeEach, afterEach, it, expect } from "@ohos/hypium"; import { describe, beforeEach, afterEach, it, expect } from "@ohos/hypium";
import events_emitter from '@ohos.events.emitter'; import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets'; import Utils from './Utils.ets';
let emitKey = "emitUserAgent"; let emitKey = "emitAllowGeolocation";
export default function webJsunit() { export default function webJsunit() {
describe('ActsAceWebDevTest', function () { describe('ActsAceWebDevTest', function () {
beforeEach(async function (done) { beforeEach(async function (done) {
...@@ -44,16 +44,6 @@ export default function webJsunit() { ...@@ -44,16 +44,6 @@ export default function webJsunit() {
await Utils.sleep(2000); await Utils.sleep(2000);
done(); done();
}) })
/*
*tc.number SUB_ACE_BASIC_ETS_API_066
*tc.name storeWebArchive
*tc.desic Save current page
*/
it('storeWebArchive',0,async function(done){
emitKey="emitAllowGeolocation";
Utils.registerContainEvent("storeWebArchive","/data/storage/el2/base/",400,done);
sendEventByKey('webcomponent',10,'');
})
/* /*
*tc.number SUB_ACE_BASIC_ETS_API_067 *tc.number SUB_ACE_BASIC_ETS_API_067
*tc.name allowGeolocation *tc.name allowGeolocation
...@@ -110,18 +100,8 @@ export default function webJsunit() { ...@@ -110,18 +100,8 @@ export default function webJsunit() {
*tc.desic return whether the third party cookie is allowed *tc.desic return whether the third party cookie is allowed
*/ */
it('isThirdPartyCookieAllowed',0,async function(done){ it('isThirdPartyCookieAllowed',0,async function(done){
emitKey="emitExistCookie";
Utils.registerEvent("isThirdPartyCookieAllowed",false,412,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_073
*tc.name existCookie
*tc.desic return whether there exits cookie
*/
it('existCookie',0,async function(done){
emitKey="emitOnConsole"; emitKey="emitOnConsole";
Utils.registerEvent("existCookie",false,414,done); Utils.registerEvent("isThirdPartyCookieAllowed",false,412,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -195,4 +175,4 @@ export default function webJsunit() { ...@@ -195,4 +175,4 @@ export default function webJsunit() {
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
}) })
} }
\ No newline at end of file
...@@ -46,4 +46,4 @@ ...@@ -46,4 +46,4 @@
} }
] ]
} }
} }
\ No newline at end of file
...@@ -66,5 +66,8 @@ ...@@ -66,5 +66,8 @@
function openRawFile(){ function openRawFile(){
document.getElementById("fileAccess").click() document.getElementById("fileAccess").click()
} }
function gettitle(){
return document.title
}
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -9,4 +9,9 @@ ...@@ -9,4 +9,9 @@
<body> <body>
<div style="height: 1300px;background-color: #999999;">second pages</div> <div style="height: 1300px;background-color: #999999;">second pages</div>
</body> </body>
<script>
function gettitle(){
return document.title
}
</script>
</html> </html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册