Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ff19efa9
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ff19efa9
编写于
8月 30, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 30, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9913 优化用例,新增非法入参和销毁窗口之后再调用接口用例
Merge pull request !9913 from 姚翠/master
上级
18a4feb1
e92e27af
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
2095 addition
and
561 deletion
+2095
-561
graphic/windowStage/entry/src/main/ets/test/List.test.ets
graphic/windowStage/entry/src/main/ets/test/List.test.ets
+2
-0
graphic/windowStage/entry/src/main/ets/test/parameterVerificationIsOptional.test.ets
...rc/main/ets/test/parameterVerificationIsOptional.test.ets
+46
-16
graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets
...ndowStage/entry/src/main/ets/test/windowCallback.test.ets
+4
-200
graphic/windowStage/entry/src/main/ets/test/windowPromise.test.ets
...indowStage/entry/src/main/ets/test/windowPromise.test.ets
+21
-220
graphic/windowStage/entry/src/main/ets/test/windowRefactorInterface.test.ets
.../entry/src/main/ets/test/windowRefactorInterface.test.ets
+0
-125
graphic/windowStage/entry/src/main/ets/test/windowRichScene.test.ets
...dowStage/entry/src/main/ets/test/windowRichScene.test.ets
+2022
-0
未找到文件。
graphic/windowStage/entry/src/main/ets/test/List.test.ets
浏览文件 @
ff19efa9
...
@@ -17,6 +17,7 @@ import windowCallbackTest from './windowCallback.test'
...
@@ -17,6 +17,7 @@ import windowCallbackTest from './windowCallback.test'
import windowRefactorInterfaceTest from './windowRefactorInterface.test'
import windowRefactorInterfaceTest from './windowRefactorInterface.test'
import displayAndWindowRefactorInterfaceTest from './displayAndWindowRefactorInterface.test'
import displayAndWindowRefactorInterfaceTest from './displayAndWindowRefactorInterface.test'
import parameterVerificationIsOptional from './parameterVerificationIsOptional.test'
import parameterVerificationIsOptional from './parameterVerificationIsOptional.test'
import windowRichScene from './windowRichScene.test'
export default function testsuite() {
export default function testsuite() {
windowCallbackTest(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
windowCallbackTest(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
...
@@ -24,4 +25,5 @@ export default function testsuite() {
...
@@ -24,4 +25,5 @@ export default function testsuite() {
windowRefactorInterfaceTest(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
windowRefactorInterfaceTest(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
displayAndWindowRefactorInterfaceTest(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
displayAndWindowRefactorInterfaceTest(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
parameterVerificationIsOptional(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
parameterVerificationIsOptional(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
windowRichScene(globalThis.abilityContext,globalThis.windowStage,globalThis.abilityStorage)
}
}
\ No newline at end of file
graphic/windowStage/entry/src/main/ets/test/parameterVerificationIsOptional.test.ets
浏览文件 @
ff19efa9
...
@@ -117,6 +117,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -117,6 +117,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'window_off_windowSizeChange_Test_001'
;
let
caseName
=
'window_off_windowSizeChange_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
baseWndType
=
1
;
let
baseWndType
=
1
;
...
@@ -132,10 +133,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -132,10 +133,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
expect
(
!!
tempWnd
)
.
assertTrue
();
expect
(
!!
tempWnd
)
.
assertTrue
();
tempWnd
.
on
(
'windowSizeChange'
,
()
=>
{
tempWnd
.
on
(
'windowSizeChange'
,
()
=>
{
console
.
info
(
msgStr
+
"first listener trigger"
);
console
.
info
(
msgStr
+
"first listener trigger"
);
num
++
firstListenFlag
=
true
firstListenFlag
=
true
});
});
tempWnd
.
on
(
'windowSizeChange'
,
(
data
)
=>
{
tempWnd
.
on
(
'windowSizeChange'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
"second listener trigger"
);
console
.
info
(
msgStr
+
"second listener trigger"
);
num
++
secondListenFlag
=
true
secondListenFlag
=
true
});
});
await
tempWnd
.
show
()
.
catch
((
err
)
=>
{
await
tempWnd
.
show
()
.
catch
((
err
)
=>
{
...
@@ -161,8 +164,9 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -161,8 +164,9 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
await
tempWnd
.
destroyWindow
();
await
tempWnd
.
destroyWindow
();
done
();
done
();
})
})
console
.
error
(
msgStr
+
'num : '
+
num
);
await
sleep
(
500
);
await
sleep
(
500
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
await
tempWnd
.
destroyWindow
();
await
tempWnd
.
destroyWindow
();
done
();
done
();
}
}
...
@@ -245,6 +249,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -245,6 +249,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'window_off_avoidAreaChange_Test_001'
;
let
caseName
=
'window_off_avoidAreaChange_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
tempWnd
=
null
let
tempWnd
=
null
...
@@ -257,15 +262,20 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -257,15 +262,20 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
});
});
tempWnd
.
on
(
'avoidAreaChange'
,
()
=>
{
tempWnd
.
on
(
'avoidAreaChange'
,
()
=>
{
console
.
info
(
msgStr
+
"first listener trigger"
);
console
.
info
(
msgStr
+
"first listener trigger"
);
num
++
firstListenFlag
=
true
firstListenFlag
=
true
});
});
tempWnd
.
on
(
'avoidAreaChange'
,
(
data
)
=>
{
tempWnd
.
on
(
'avoidAreaChange'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
'second listener trigger'
);
console
.
info
(
msgStr
+
'second listener trigger'
);
num
++
secondListenFlag
=
true
secondListenFlag
=
true
});
});
await
tempWnd
.
setFullScreen
(
true
)
.
catch
((
err
)
=>
{
await
tempWnd
.
setFullScreen
(
true
)
.
catch
((
err
)
=>
{
unexpectedError
(
err
,
caseName
,
'tempWnd.setFullScreen(true)'
,
done
);
unexpectedError
(
err
,
caseName
,
'tempWnd.setFullScreen(true)'
,
done
);
});
});
await
tempWnd
.
setSystemBarEnable
([
'status'
])
.
catch
((
err
)
=>
{
unexpectedError
(
err
,
caseName
,
'tempWnd.setSystemBarEnable([status])'
,
done
);
});
await
sleep
(
1000
);
await
sleep
(
1000
);
tempWnd
.
off
(
'avoidAreaChange'
);
tempWnd
.
off
(
'avoidAreaChange'
);
firstListenFlag
=
false
firstListenFlag
=
false
...
@@ -277,7 +287,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -277,7 +287,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
await
tempWnd
.
setSystemBarEnable
([
'status'
,
'navigation'
])
.
catch
((
err
)
=>
{
await
tempWnd
.
setSystemBarEnable
([
'status'
,
'navigation'
])
.
catch
((
err
)
=>
{
unexpectedError
(
err
,
caseName
,
'tempWnd.setSystemBarEnable([status])'
,
done
);
unexpectedError
(
err
,
caseName
,
'tempWnd.setSystemBarEnable([status])'
,
done
);
});
});
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
done
();
done
();
}
}
})
})
...
@@ -346,6 +356,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -346,6 +356,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'window_off_screenshot_Test_001'
;
let
caseName
=
'window_off_screenshot_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
windowId
=
'window_off_screenshot_Test_001'
;
let
windowId
=
'window_off_screenshot_Test_001'
;
...
@@ -368,10 +379,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -368,10 +379,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
});
});
tempWnd
.
on
(
'screenshot'
,
(
data
)
=>
{
tempWnd
.
on
(
'screenshot'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
"first listener trigger"
);
console
.
info
(
msgStr
+
"first listener trigger"
);
num
++
firstListenFlag
=
true
firstListenFlag
=
true
});
});
tempWnd
.
on
(
'screenshot'
,
(
data
)
=>
{
tempWnd
.
on
(
'screenshot'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
"second listener trigger"
);
console
.
info
(
msgStr
+
"second listener trigger"
);
num
++
secondListenFlag
=
true
secondListenFlag
=
true
});
});
// 截屏代码
// 截屏代码
...
@@ -397,7 +410,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -397,7 +410,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
done
();
done
();
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
await
tempWnd
.
destroyWindow
();
await
tempWnd
.
destroyWindow
();
done
();
done
();
}
else
{
}
else
{
...
@@ -490,6 +503,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -490,6 +503,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'window_off_dialogTargetTouch_Test_001'
;
let
caseName
=
'window_off_dialogTargetTouch_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
windowId
=
'window_off_dialogTargetTouch_Test_001'
;
let
windowId
=
'window_off_dialogTargetTouch_Test_001'
;
...
@@ -512,10 +526,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -512,10 +526,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
});
});
tempWnd
.
on
(
'dialogTargetTouch'
,
(
data
)
=>
{
tempWnd
.
on
(
'dialogTargetTouch'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
"first listener trigger"
);
console
.
info
(
msgStr
+
"first listener trigger"
);
num
++
firstListenFlag
=
true
firstListenFlag
=
true
});
});
tempWnd
.
on
(
'dialogTargetTouch'
,
(
data
)
=>
{
tempWnd
.
on
(
'dialogTargetTouch'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
"second listener trigger"
);
console
.
info
(
msgStr
+
"second listener trigger"
);
num
++
secondListenFlag
=
true
secondListenFlag
=
true
});
});
// 点击模态窗口
// 点击模态窗口
...
@@ -536,7 +552,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -536,7 +552,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
done
();
done
();
})
})
await
sleep
(
1000
);
await
sleep
(
1000
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
await
tempWnd
.
destroyWindow
();
await
tempWnd
.
destroyWindow
();
done
();
done
();
}
}
...
@@ -618,6 +634,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -618,6 +634,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'window_off_keyboardHeightChange_Test_001'
;
let
caseName
=
'window_off_keyboardHeightChange_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
windowId
=
'window_off_keyboardHeightChange_Test_001'
;
let
windowId
=
'window_off_keyboardHeightChange_Test_001'
;
...
@@ -643,10 +660,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -643,10 +660,12 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
});
});
tempWnd
.
on
(
'keyboardHeightChange'
,
(
data
)
=>
{
tempWnd
.
on
(
'keyboardHeightChange'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
"first listener trigger"
);
console
.
info
(
msgStr
+
"first listener trigger"
);
num
++
firstListenFlag
=
true
firstListenFlag
=
true
});
});
tempWnd
.
on
(
'keyboardHeightChange'
,
(
data
)
=>
{
tempWnd
.
on
(
'keyboardHeightChange'
,
(
data
)
=>
{
console
.
info
(
msgStr
+
"second listener trigger"
);
console
.
info
(
msgStr
+
"second listener trigger"
);
num
++
secondListenFlag
=
true
secondListenFlag
=
true
});
});
await
inputClick
(
'pageTwoinput'
,
msgStr
)
.
catch
(
async
err
=>
{
await
inputClick
(
'pageTwoinput'
,
msgStr
)
.
catch
(
async
err
=>
{
...
@@ -666,7 +685,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -666,7 +685,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
done
();
done
();
})
})
await
sleep
(
2000
);
await
sleep
(
2000
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
await
tempWnd
.
destroyWindow
();
await
tempWnd
.
destroyWindow
();
done
();
done
();
}
}
...
@@ -754,16 +773,18 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -754,16 +773,18 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'windowStage_off_windowStageEvent_Test_001'
;
let
caseName
=
'windowStage_off_windowStageEvent_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
function
firstCall
()
{
function
firstCall
()
{
console
.
log
(
msgStr
+
"first listener trigger"
)
console
.
log
(
msgStr
+
"first listener trigger"
)
num
++
firstListenFlag
=
true
firstListenFlag
=
true
}
}
function
secondCall
()
{
function
secondCall
()
{
console
.
log
(
msgStr
+
"second listener trigger"
)
console
.
log
(
msgStr
+
"second listener trigger"
)
num
++
secondListenFlag
=
true
secondListenFlag
=
true
}
}
...
@@ -783,7 +804,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -783,7 +804,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
unexpectedError
(
err
,
caseName
,
'tempWnd.show'
,
done
);
unexpectedError
(
err
,
caseName
,
'tempWnd.show'
,
done
);
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
done
();
done
();
}
}
})
})
...
@@ -828,7 +849,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -828,7 +849,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
windowStage
.
off
(
"windowStageEvent"
);
windowStage
.
off
(
"windowStageEvent"
);
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
done
();
done
();
}
else
{
}
else
{
expect
(
TRUE_FLAG
)
.
assertFail
();
expect
(
TRUE_FLAG
)
.
assertFail
();
done
();
done
();
}
}
...
@@ -843,6 +864,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -843,6 +864,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'display_off_add_Test_001'
;
let
caseName
=
'display_off_add_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
screenClass
=
null
;
let
screenClass
=
null
;
...
@@ -850,11 +872,13 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -850,11 +872,13 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
function
firstCall
()
{
function
firstCall
()
{
console
.
log
(
msgStr
+
"first listener trigger"
)
console
.
log
(
msgStr
+
"first listener trigger"
)
num
++
firstListenFlag
=
true
firstListenFlag
=
true
}
}
function
secondCall
()
{
function
secondCall
()
{
console
.
log
(
msgStr
+
"second listener trigger"
)
console
.
log
(
msgStr
+
"second listener trigger"
)
num
++
secondListenFlag
=
true
secondListenFlag
=
true
}
}
...
@@ -900,7 +924,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -900,7 +924,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
unexpectedError
(
err
,
caseName
,
'screen.makeExpand'
,
done
);
unexpectedError
(
err
,
caseName
,
'screen.makeExpand'
,
done
);
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
await
screen
.
destroyVirtualScreen
(
screenClass_two
.
id
)
await
screen
.
destroyVirtualScreen
(
screenClass_two
.
id
)
done
();
done
();
}
}
...
@@ -975,7 +999,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -975,7 +999,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
display
.
off
(
"add"
)
display
.
off
(
"add"
)
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
done
();
done
();
}
else
{
}
else
{
expect
(
TRUE_FLAG
)
.
assertFail
();
expect
(
TRUE_FLAG
)
.
assertFail
();
done
();
done
();
}
}
...
@@ -989,6 +1013,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -989,6 +1013,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'display_off_remove_Test_001'
;
let
caseName
=
'display_off_remove_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
screenClass
=
null
;
let
screenClass
=
null
;
...
@@ -996,11 +1021,13 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -996,11 +1021,13 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
function
firstCall
()
{
function
firstCall
()
{
console
.
log
(
msgStr
+
"first listener trigger"
)
console
.
log
(
msgStr
+
"first listener trigger"
)
num
++
firstListenFlag
=
true
firstListenFlag
=
true
}
}
function
secondCall
()
{
function
secondCall
()
{
console
.
log
(
msgStr
+
"second listener trigger"
)
console
.
log
(
msgStr
+
"second listener trigger"
)
num
++
secondListenFlag
=
true
secondListenFlag
=
true
}
}
...
@@ -1047,7 +1074,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -1047,7 +1074,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
});
});
await
screen
.
destroyVirtualScreen
(
screenClass_two
.
id
)
await
screen
.
destroyVirtualScreen
(
screenClass_two
.
id
)
await
sleep
(
1000
);
await
sleep
(
1000
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
done
();
done
();
}
}
})
})
...
@@ -1121,7 +1148,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -1121,7 +1148,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
display
.
off
(
'remove'
)
display
.
off
(
'remove'
)
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
done
();
done
();
}
else
{
}
else
{
expect
(
TRUE_FLAG
)
.
assertFail
();
expect
(
TRUE_FLAG
)
.
assertFail
();
done
();
done
();
}
}
...
@@ -1135,17 +1162,20 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -1135,17 +1162,20 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
let
caseName
=
'display_off_change_Test_001'
;
let
caseName
=
'display_off_change_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
num
=
0
let
firstListenFlag
=
false
let
firstListenFlag
=
false
let
secondListenFlag
=
false
let
secondListenFlag
=
false
let
screenClass
=
null
;
let
screenClass
=
null
;
function
firstCall
()
{
function
firstCall
()
{
console
.
log
(
msgStr
+
"first listener trigger"
)
console
.
log
(
msgStr
+
"first listener trigger"
)
num
++
firstListenFlag
=
true
firstListenFlag
=
true
}
}
function
secondCall
()
{
function
secondCall
()
{
console
.
log
(
msgStr
+
"second listener trigger"
)
console
.
log
(
msgStr
+
"second listener trigger"
)
num
++
secondListenFlag
=
true
secondListenFlag
=
true
}
}
...
@@ -1179,7 +1209,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -1179,7 +1209,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
unexpectedError
(
err
,
caseName
,
'screenClass.setOrientation'
,
done
);
unexpectedError
(
err
,
caseName
,
'screenClass.setOrientation'
,
done
);
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
if
(
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
if
(
num
>=
2
&&
firstListenFlag
===
false
&&
secondListenFlag
===
false
)
{
await
screen
.
destroyVirtualScreen
(
screenClass
.
id
)
await
screen
.
destroyVirtualScreen
(
screenClass
.
id
)
done
();
done
();
}
}
...
@@ -1241,7 +1271,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -1241,7 +1271,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
display
.
off
(
'change'
)
display
.
off
(
'change'
)
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
if
(
!
firstListenFlag
&&
secondListenFlag
)
{
done
();
done
();
}
else
{
}
else
{
expect
(
TRUE_FLAG
)
.
assertFail
();
expect
(
TRUE_FLAG
)
.
assertFail
();
done
();
done
();
}
}
...
@@ -1254,7 +1284,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -1254,7 +1284,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
it
(
'getUIContext_Test_001'
,
0
,
async
function
(
done
)
{
it
(
'getUIContext_Test_001'
,
0
,
async
function
(
done
)
{
let
caseName
=
'getUIContext_Test_001'
;
let
caseName
=
'getUIContext_Test_001'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
uiContext
=
null
;
let
uiContext
=
null
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
let
mainWindow
=
null
let
mainWindow
=
null
mainWindow
=
await
windowStage
.
getMainWindow
()
.
catch
((
err
)
=>
{
mainWindow
=
await
windowStage
.
getMainWindow
()
.
catch
((
err
)
=>
{
...
@@ -1264,7 +1294,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
...
@@ -1264,7 +1294,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
// 获取UIContext实例。
// 获取UIContext实例。
uiContext
=
mainWindow
.
getUIContext
();
uiContext
=
mainWindow
.
getUIContext
();
expect
(
!!
uiContext
)
.
assertTrue
();
expect
(
!!
uiContext
)
.
assertTrue
();
console
.
log
(
msgStr
+
'after uiContext: '
+
JSON
.
stringify
(
uiContext
));
console
.
log
(
msgStr
+
'after uiContext: '
+
JSON
.
stringify
(
uiContext
));
done
();
done
();
})
})
...
...
graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets
浏览文件 @
ff19efa9
...
@@ -131,28 +131,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -131,28 +131,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
it
(
'setSystemBarEnableTest6'
,
0
,
async
function
(
done
)
{
it
(
'setSystemBarEnableTest6'
,
0
,
async
function
(
done
)
{
let
caseName
=
'setSystemBarEnableTest6'
;
let
caseName
=
'setSystemBarEnableTest6'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
[
flagStatus
,
flagNav
]
=
[
false
,
false
];
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
listenerData
.
on
=
true
;
listenerData
.
typeStr
=
'systemBarTintChange'
;
ohosWindow
.
on
(
'systemBarTintChange'
,
systembartintstate
=>
{
console
.
log
(
msgStr
+
'ohosWindow.on systembartintstate.regionTint : '
+
JSON
.
stringify
(
systembartintstate
.
regionTint
));
console
.
log
(
msgStr
+
'ohosWindow.on flagNav : '
+
JSON
.
stringify
(
flagNav
));
console
.
log
(
msgStr
+
'ohosWindow.on flagStatus : '
+
JSON
.
stringify
(
flagStatus
));
console
.
log
(
msgStr
+
'ohosWindow.on flagStatus && flagNav : '
+
(
flagStatus
&&
flagNav
));
if
(
flagStatus
||
flagNav
)
{
try
{
expect
(
!!
systembartintstate
)
.
assertTrue
();
expect
(
!!
systembartintstate
.
regionTint
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on ${JSON.stringify(error)}`
)
}
console
.
log
(
msgStr
+
'flagStatus || flagNav'
+
msgStr
+
'ohosWindow.on systemBarTintChange regionTint:'
+
JSON
.
stringify
(
systembartintstate
.
regionTint
));
ohosWindow
.
off
(
'systemBarTintChange'
)
done
();
}
})
function
getMainWindow
()
{
function
getMainWindow
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
...
@@ -191,7 +170,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -191,7 +170,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
reject
(
null
)
reject
(
null
)
}
else
{
}
else
{
console
.
log
(
msgStr
+
'mainWnd.setFullScreen success'
);
console
.
log
(
msgStr
+
'mainWnd.setFullScreen success'
);
flagNav
=
true
;
resolve
(
true
)
resolve
(
true
)
}
}
})
})
...
@@ -207,7 +185,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -207,7 +185,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
reject
(
null
)
reject
(
null
)
}
else
{
}
else
{
console
.
log
(
msgStr
+
'mainWnd.setSystemBarEnable success'
);
console
.
log
(
msgStr
+
'mainWnd.setSystemBarEnable success'
);
flagStatus
=
true
;
resolve
(
true
)
resolve
(
true
)
}
}
})
})
...
@@ -257,6 +234,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -257,6 +234,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
done
();
done
();
});
});
console
.
log
(
msgStr
+
'finished!!'
);
console
.
log
(
msgStr
+
'finished!!'
);
done
();
});
});
/**
/**
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_007
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_007
...
@@ -266,24 +244,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -266,24 +244,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
it
(
'setSystemBarEnableTest7'
,
0
,
async
function
(
done
)
{
it
(
'setSystemBarEnableTest7'
,
0
,
async
function
(
done
)
{
let
caseName
=
'setSystemBarEnableTest7'
;
let
caseName
=
'setSystemBarEnableTest7'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
[
flagStatus
,
flagNav
]
=
[
false
,
false
];
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
ohosWindow
.
on
(
'systemBarTintChange'
,
systembartintstate
=>
{
console
.
log
(
msgStr
+
'ohosWindow.on systembartintstate :'
+
JSON
.
stringify
(
systembartintstate
));
console
.
log
(
msgStr
+
'ohosWindow.on systembartintstate.regionTint : '
+
JSON
.
stringify
(
systembartintstate
.
regionTint
));
if
(
flagStatus
||
flagNav
)
{
console
.
log
(
msgStr
+
'ohosWindow.on flagStatus || flagNav:'
);
try
{
expect
(
!!
systembartintstate
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch err: ${JSON.stringify(error)}`
)
}
ohosWindow
.
off
(
'systemBarTintChange'
)
done
();
}
})
function
getMainWindow
()
{
function
getMainWindow
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
...
@@ -333,7 +294,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -333,7 +294,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
if
(
err
&&
err
.
code
)
{
if
(
err
&&
err
.
code
)
{
reject
(
null
)
reject
(
null
)
}
else
{
}
else
{
flagStatus
=
true
;
resolve
(
true
)
resolve
(
true
)
}
}
})
})
...
@@ -347,7 +307,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -347,7 +307,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
if
(
err
&&
err
.
code
)
{
if
(
err
&&
err
.
code
)
{
reject
(
null
)
reject
(
null
)
}
else
{
}
else
{
flagNav
=
true
;
resolve
(
true
)
resolve
(
true
)
}
}
})
})
...
@@ -381,6 +340,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -381,6 +340,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
expect
()
.
assertFail
();
expect
()
.
assertFail
();
done
();
done
();
});
});
done
();
});
});
/**
/**
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_008
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_008
...
@@ -390,30 +350,8 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -390,30 +350,8 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
it
(
'setSystemBarEnableTest8'
,
0
,
async
function
(
done
)
{
it
(
'setSystemBarEnableTest8'
,
0
,
async
function
(
done
)
{
let
caseName
=
'setSystemBarEnableTest8'
;
let
caseName
=
'setSystemBarEnableTest8'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
[
flagStatus
,
flagNav
]
=
[
false
,
false
];
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
ohosWindow
.
on
(
'systemBarTintChange'
,
systembartintstate
=>
{
if
(
flagStatus
&&
flagNav
)
{
console
.
log
(
msgStr
+
'ohosWindow.on systembartintstate.regionTint : '
+
JSON
.
stringify
(
systembartintstate
.
regionTint
));
let
enable
=
systembartintstate
.
regionTint
[
0
]
.
isEnable
let
numType
=
systembartintstate
.
regionTint
[
0
]
.
type
console
.
log
(
msgStr
+
'ohosWindow.on isEnable : '
+
JSON
.
stringify
(
enable
));
console
.
log
(
msgStr
+
'ohosWindow.on numType : '
+
JSON
.
stringify
(
numType
));
try
{
expect
(
numType
===
ohosWindow
.
WindowType
.
TYPE_STATUS_BAR
||
numType
===
ohosWindow
.
WindowType
.
TYPE_NAVIGATION_BAR
&&
enable
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch err: ${JSON.stringify(error)}`
)
}
ohosWindow
.
off
(
'systemBarTintChange'
)
done
();
}
else
{
console
.
log
(
msgStr
+
'flagStatus :'
+
flagStatus
+
' ,regionTint:'
+
JSON
.
stringify
(
systembartintstate
.
regionTint
));
console
.
log
(
msgStr
+
'flagNav :'
+
flagNav
+
' ,regionTint:'
+
JSON
.
stringify
(
systembartintstate
.
regionTint
));
}
})
function
getMainWindow
()
{
function
getMainWindow
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
...
@@ -460,8 +398,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -460,8 +398,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
if
(
err
&&
err
.
code
)
{
if
(
err
&&
err
.
code
)
{
reject
(
null
)
reject
(
null
)
}
else
{
}
else
{
flagStatus
=
true
;
flagNav
=
true
;
resolve
(
true
)
resolve
(
true
)
console
.
log
(
msgStr
+
'mainWnd.setSystemBarEnable [status, navigation] data=='
+
JSON
.
stringify
(
data
));
console
.
log
(
msgStr
+
'mainWnd.setSystemBarEnable [status, navigation] data=='
+
JSON
.
stringify
(
data
));
}
}
...
@@ -492,6 +428,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -492,6 +428,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
expect
()
.
assertFail
();
expect
()
.
assertFail
();
done
();
done
();
});
});
done
();
});
});
/**
/**
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_009
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_009
...
@@ -501,22 +438,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -501,22 +438,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
it
(
'setSystemBarEnableTest9'
,
0
,
async
function
(
done
)
{
it
(
'setSystemBarEnableTest9'
,
0
,
async
function
(
done
)
{
let
caseName
=
'setSystemBarEnableTest9'
;
let
caseName
=
'setSystemBarEnableTest9'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
[
flagStatus
,
flagNav
]
=
[
false
,
false
];
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
ohosWindow
.
on
(
'systemBarTintChange'
,
(
systembartintstate
)
=>
{
console
.
log
(
msgStr
+
'ohosWindow.on systemBarTintChange :'
+
JSON
.
stringify
(
systembartintstate
));
console
.
log
(
msgStr
+
'ohosWindow.on systemBarTintChange systembartintstate.regionTint : '
+
JSON
.
stringify
(
systembartintstate
.
regionTint
));
if
(
flagStatus
||
flagNav
)
{
try
{
expect
(
!!
systembartintstate
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch err: ${JSON.stringify(error)}`
)
}
ohosWindow
.
off
(
'systemBarTintChange'
)
done
();
}
})
function
getMainWindow
()
{
function
getMainWindow
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
windowStage
.
getMainWindow
((
err
,
data
)
=>
{
...
@@ -576,8 +498,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -576,8 +498,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
if
(
err
&&
err
.
code
)
{
if
(
err
&&
err
.
code
)
{
reject
(
null
)
reject
(
null
)
}
else
{
}
else
{
flagStatus
=
true
;
flagNav
=
true
;
resolve
(
true
)
resolve
(
true
)
}
}
})
})
...
@@ -612,6 +532,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -612,6 +532,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
expect
()
.
assertFail
();
expect
()
.
assertFail
();
done
();
done
();
});
});
done
();
});
});
/**
/**
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_010
* @tc.number SUB_WINDOW_SETSYSTEMBARENABLE_JSAPI_010
...
@@ -786,88 +707,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -786,88 +707,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
let
endNum
=
0
;
let
endNum
=
0
;
let
listenerFlag
=
false
;
let
listenerFlag
=
false
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
listenerData
.
on
=
true
;
listenerData
.
typeStr
=
'systemBarTintChange'
;
ohosWindow
.
on
(
'systemBarTintChange'
,
(
systemBarData
)
=>
{
console
.
log
(
msgStr
+
'tempWnd.on systemBarTintChange, systemBatData : '
+
JSON
.
stringify
(
systemBarData
));
if
(
listenerFlag
)
{
try
{
expect
(
!!
systemBarData
)
.
assertTrue
();
expect
(
!!
systemBarData
.
regionTint
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
let
arrLength
=
systemBarData
.
regionTint
.
length
;
for
(
let
i
=
0
;
i
<
arrLength
;
i
++
)
{
console
.
log
(
msgStr
+
'for arrLenght compareCount: '
+
compareCount
+
' ,i:'
+
i
+
' ,arrLength:'
+
arrLength
);
let
tempData
=
systemBarData
.
regionTint
[
i
];
if
(
tempData
.
type
===
ohosWindow
.
WindowType
.
TYPE_STATUS_BAR
)
{
console
.
log
(
msgStr
+
'systemBarTintChange compare start! arrLength= '
+
arrLength
);
compareCount
++
;
let
backgroundIndex
=
cloneColorArr
.
SBC
.
indexOf
(
tempData
.
backgroundColor
);
let
contentColorIndex
=
cloneColorArr
.
SCC
.
indexOf
(
tempData
.
contentColor
);
if
(
backgroundIndex
>=
0
)
{
cloneColorArr
.
SBC
.
splice
(
backgroundIndex
,
1
);
}
else
{
console
.
log
(
msgStr
+
'SBC tempData.backgroundColor:'
+
JSON
.
stringify
(
tempData
.
backgroundColor
));
}
if
(
contentColorIndex
>=
0
)
{
cloneColorArr
.
SCC
.
splice
(
contentColorIndex
,
1
);
}
else
{
console
.
log
(
msgStr
+
'SCC tempData.contentColor:'
+
JSON
.
stringify
(
tempData
.
contentColor
));
}
let
ca
=
cloneColorArr
;
let
flag
=
ca
.
NCC
.
length
||
ca
.
NBC
.
length
||
ca
.
SBC
.
length
||
ca
.
SCC
.
length
if
(
compareCount
===
18
&&
!
flag
)
{
console
.
log
(
msgStr
+
'if compareCount: '
+
compareCount
+
' ,true flag:'
+
flag
);
try
{
expect
(
true
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
}
else
{
console
.
log
(
msgStr
+
'compareCount: '
+
compareCount
+
' ,flag:'
+
flag
);
}
console
.
log
(
msgStr
+
'compareCount: '
+
compareCount
+
' ,length: '
+
JSON
.
stringify
(
cloneColorArr
.
SCC
.
length
)
+
' ,cloneColorArr.SBC:'
+
JSON
.
stringify
(
cloneColorArr
.
SBC
));
console
.
log
(
msgStr
+
'compareCount: '
+
compareCount
+
' ,length: '
+
JSON
.
stringify
(
cloneColorArr
.
SCC
.
length
)
+
' ,cloneColorArr.SCC'
+
JSON
.
stringify
(
cloneColorArr
.
SCC
));
done
();
}
else
if
(
tempData
.
type
===
ohosWindow
.
WindowType
.
TYPE_NAVIGATION_BAR
)
{
console
.
log
(
msgStr
+
'systemBarTintChange compare start!'
);
compareCount
++
;
let
backgroundIndex
=
cloneColorArr
.
NBC
.
indexOf
(
tempData
.
backgroundColor
);
let
contentColorIndex
=
cloneColorArr
.
NCC
.
indexOf
(
tempData
.
contentColor
);
if
(
backgroundIndex
>=
0
)
{
cloneColorArr
.
NBC
.
splice
(
backgroundIndex
,
1
);
}
else
{
console
.
log
(
msgStr
+
'NBC tempData.backgroundColor:'
+
JSON
.
stringify
(
tempData
.
backgroundColor
));
}
if
(
contentColorIndex
>=
0
)
{
cloneColorArr
.
NCC
.
splice
(
contentColorIndex
,
1
);
}
else
{
console
.
log
(
msgStr
+
'NCC tempData.contentColor:'
+
JSON
.
stringify
(
tempData
.
contentColor
));
}
let
ca
=
cloneColorArr
;
let
flag
=
ca
.
NCC
.
length
||
ca
.
NBC
.
length
||
ca
.
SBC
.
length
||
ca
.
SCC
.
length
if
(
compareCount
===
18
&&
!
flag
)
{
console
.
log
(
msgStr
+
'else compareCount: '
+
compareCount
+
' ,true flag:'
+
flag
);
try
{
expect
(
true
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
}
else
{
console
.
log
(
msgStr
+
'compareCount: '
+
compareCount
+
' ,flag:'
+
flag
);
}
console
.
log
(
msgStr
+
'compareCount: '
+
endNum
+
' ,compareCount: '
+
compareCount
+
' ,length: '
+
JSON
.
stringify
(
cloneColorArr
.
NBC
.
length
)
+
' ,cloneColorArr.SBC:'
+
JSON
.
stringify
(
cloneColorArr
.
NBC
));
console
.
log
(
msgStr
+
'compareCount: '
+
endNum
+
' ,compareCount: '
+
compareCount
+
' ,length: '
+
JSON
.
stringify
(
cloneColorArr
.
NCC
.
length
)
+
' ,cloneColorArr.SCC'
+
JSON
.
stringify
(
cloneColorArr
.
NCC
));
endNum
=
compareCount
done
();
}
}
}
console
.
log
(
msgStr
+
'tempWnd.on systemBarTintChange finished'
);
})
let
tempWnd
;
let
tempWnd
;
tempWnd
=
await
windowStage
.
getMainWindow
()
.
catch
((
err
)
=>
{
tempWnd
=
await
windowStage
.
getMainWindow
()
.
catch
((
err
)
=>
{
console
.
error
(
msgStr
+
'Failed to obtain the main window. Cause: '
+
JSON
.
stringify
(
err
));
console
.
error
(
msgStr
+
'Failed to obtain the main window. Cause: '
+
JSON
.
stringify
(
err
));
...
@@ -891,7 +730,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -891,7 +730,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
done
();
done
();
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
listenerFlag
=
true
let
loopCount
=
commonNUMBERColorArr
.
length
let
loopCount
=
commonNUMBERColorArr
.
length
for
(
let
i
=
0
;
i
<
loopCount
;
i
++
)
{
for
(
let
i
=
0
;
i
<
loopCount
;
i
++
)
{
console
.
log
(
msgStr
+
'tempWnd.setSystemBarEnable i:'
+
i
);
console
.
log
(
msgStr
+
'tempWnd.setSystemBarEnable i:'
+
i
);
...
@@ -906,7 +744,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -906,7 +744,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
};
};
tempWnd
.
setSystemBarProperties
(
systemBarProperties
,
(
err
,
data
)
=>
{
tempWnd
.
setSystemBarProperties
(
systemBarProperties
,
(
err
,
data
)
=>
{
console
.
log
(
msgStr
+
'tempWnd.setSystemBarProperties err'
+
JSON
.
stringify
(
err
));
console
.
log
(
msgStr
+
'tempWnd.setSystemBarProperties err'
+
JSON
.
stringify
(
err
));
console
.
log
(
msgStr
+
'tempWnd.setSystemBarProperties data'
+
JSON
.
stringify
(
data
));
if
(
err
&&
err
.
code
)
{
if
(
err
&&
err
.
code
)
{
try
{
try
{
expect
(
TRUE_FLAG
)
.
assertFail
();
expect
(
TRUE_FLAG
)
.
assertFail
();
...
@@ -933,38 +770,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -933,38 +770,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
cloneColorArr
=
JSON
.
parse
(
JSON
.
stringify
(
commonKEYColorArr
));
let
cloneColorArr
=
JSON
.
parse
(
JSON
.
stringify
(
commonKEYColorArr
));
let
compareCount
=
0
;
let
compareCount
=
0
;
let
listenerFlag
=
false
;
console
.
log
(
msgStr
+
'begin'
);
console
.
log
(
msgStr
+
'begin'
);
listenerData
.
on
=
true
;
listenerData
.
typeStr
=
'systemBarTintChange'
;
ohosWindow
.
on
(
'systemBarTintChange'
,
(
systemBarData
)
=>
{
console
.
log
(
msgStr
+
'tempWnd.on systemBarTintChange, systemBatData : '
+
JSON
.
stringify
(
systemBarData
));
if
(
listenerFlag
)
{
try
{
expect
(
!!
systemBarData
)
.
assertTrue
();
expect
(
!!
systemBarData
.
regionTint
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
let
arrLength
=
systemBarData
.
regionTint
.
length
;
for
(
let
i
=
0
;
i
<
arrLength
;
i
++
)
{
let
tempData
=
systemBarData
.
regionTint
[
i
];
if
(
tempData
.
type
===
ohosWindow
.
WindowType
.
TYPE_STATUS_BAR
||
tempData
.
type
===
ohosWindow
.
WindowType
.
TYPE_NAVIGATION_BAR
)
{
console
.
log
(
msgStr
+
'systemBarTintChange compare start!'
);
compareCount
++
;
let
backgroundIndex
=
cloneColorArr
.
indexOf
(
tempData
.
backgroundColor
);
let
contentColorIndex
=
cloneColorArr
.
indexOf
(
tempData
.
contentColor
);
try
{
expect
(
backgroundIndex
===
-
1
)
.
assertTrue
();
expect
(
contentColorIndex
===
-
1
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
}
}
}
console
.
log
(
msgStr
+
'tempWnd.on systemBarTintChange finished'
);
})
let
tempWnd
;
let
tempWnd
;
tempWnd
=
await
windowStage
.
getMainWindow
()
.
catch
((
err
)
=>
{
tempWnd
=
await
windowStage
.
getMainWindow
()
.
catch
((
err
)
=>
{
console
.
error
(
msgStr
+
'Failed to obtain the main window. Cause: '
+
JSON
.
stringify
(
err
));
console
.
error
(
msgStr
+
'Failed to obtain the main window. Cause: '
+
JSON
.
stringify
(
err
));
...
@@ -988,7 +794,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -988,7 +794,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
done
();
done
();
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
listenerFlag
=
true
let
loopCount
=
commonRGBColorArr
.
length
let
loopCount
=
commonRGBColorArr
.
length
for
(
let
i
=
0
;
i
<
loopCount
;
i
++
)
{
for
(
let
i
=
0
;
i
<
loopCount
;
i
++
)
{
let
tempColor
=
commonKEYColorArr
[
i
];
let
tempColor
=
commonKEYColorArr
[
i
];
...
@@ -1001,7 +806,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
...
@@ -1001,7 +806,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
navigationBarContentColor
:
tempColor
,
navigationBarContentColor
:
tempColor
,
};
};
tempWnd
.
setSystemBarProperties
(
systemBarProperties
,
(
err
,
data
)
=>
{
tempWnd
.
setSystemBarProperties
(
systemBarProperties
,
(
err
,
data
)
=>
{
console
.
log
(
msgStr
+
'tempWnd.setSystemBarProperties err'
+
JSON
.
stringify
(
err
));
console
.
log
(
msgStr
+
'tempWnd.setSystemBarProperties data'
+
JSON
.
stringify
(
data
));
console
.
log
(
msgStr
+
'tempWnd.setSystemBarProperties data'
+
JSON
.
stringify
(
data
));
if
(
err
&&
err
.
code
)
{
if
(
err
&&
err
.
code
)
{
try
{
try
{
...
...
graphic/windowStage/entry/src/main/ets/test/windowPromise.test.ets
浏览文件 @
ff19efa9
此差异已折叠。
点击以展开。
graphic/windowStage/entry/src/main/ets/test/windowRefactorInterface.test.ets
浏览文件 @
ff19efa9
...
@@ -92,42 +92,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
...
@@ -92,42 +92,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
let
listenerFlag
=
listenerStatus
.
ready
;
let
listenerFlag
=
listenerStatus
.
ready
;
let
caseName
=
'setWindowSystemBarPropertiesTest1'
;
let
caseName
=
'setWindowSystemBarPropertiesTest1'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
info
(
'setWindowSystemBarPropertiesTest1'
);
listenerData
.
on
=
true
;
listenerData
.
typeStr
=
'systemBarTintChange'
;
ohosWindow
.
on
(
'systemBarTintChange'
,
(
systemBarData
)
=>
{
console
.
info
(
'setWindowSystemBarPropertiesTest1 systemBatData : '
+
JSON
.
stringify
(
systemBarData
));
if
(
listenerFlag
===
listenerStatus
.
pending
)
{
try
{
expect
(
!!
systemBarData
)
.
assertTrue
();
expect
(
!!
systemBarData
.
regionTint
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
let
arrLength
=
systemBarData
.
regionTint
.
length
;
console
.
log
(
'setWindowSystemBarPropertiesTest1 arrLength is: '
+
systemBarData
.
regionTint
.
length
)
for
(
let
i
=
0
;
i
<
arrLength
;
i
++
){
console
.
info
(
'setWindowSystemBarPropertiesTest1 start step:'
+
i
);
// 单个导航栏或者系统状态信息
let
SystemBarRegionTint
=
systemBarData
.
regionTint
[
i
];
if
(
SystemBarRegionTint
.
type
===
ohosWindow
.
WindowType
.
TYPE_STATUS_BAR
||
SystemBarRegionTint
.
type
===
ohosWindow
.
WindowType
.
TYPE_NAVIGATION_BAR
)
{
console
.
info
(
'setWindowSystemBarPropertiesTest1 assert1 start!'
);
let
backgroundIndex
=
cloneColorArr
.
indexOf
(
SystemBarRegionTint
.
backgroundColor
);
let
contentColorIndex
=
cloneColorArr
.
indexOf
(
SystemBarRegionTint
.
contentColor
);
try
{
expect
(
backgroundIndex
===
-
1
)
.
assertTrue
();
expect
(
contentColorIndex
===
-
1
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
if
(
i
==
arrLength
-
1
){
console
.
info
(
'setWindowSystemBarPropertiesTest1 finished step:'
+
i
);
}
}
}
}
})
console
.
info
(
'setWindowSystemBarPropertiesTest1 on systemBarTintChange finished'
);
let
mainWsync
=
windowStage
.
getMainWindowSync
();
let
mainWsync
=
windowStage
.
getMainWindowSync
();
expect
(
mainWsync
!=
null
)
.
assertTrue
();
expect
(
mainWsync
!=
null
)
.
assertTrue
();
await
mainWsync
.
showWindow
()
.
catch
(
err
=>
{
await
mainWsync
.
showWindow
()
.
catch
(
err
=>
{
...
@@ -141,7 +105,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
...
@@ -141,7 +105,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
done
();
done
();
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
listenerFlag
=
listenerStatus
.
pending
;
for
(
let
i
=
0
;
i
<
commonRGBColorArr
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
commonRGBColorArr
.
length
;
i
++
){
console
.
info
(
'setWindowSystemBarPropertiesTest1 begin step:'
+
i
);
console
.
info
(
'setWindowSystemBarPropertiesTest1 begin step:'
+
i
);
let
tempColor
=
commonRGBColorArr
[
i
];
let
tempColor
=
commonRGBColorArr
[
i
];
...
@@ -184,63 +147,8 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
...
@@ -184,63 +147,8 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
NBC
:
JSON
.
parse
(
JSON
.
stringify
(
commonNUMBERColorArr
)),
NBC
:
JSON
.
parse
(
JSON
.
stringify
(
commonNUMBERColorArr
)),
NCC
:
JSON
.
parse
(
JSON
.
stringify
(
commonNUMBERColorArr
))
NCC
:
JSON
.
parse
(
JSON
.
stringify
(
commonNUMBERColorArr
))
};
};
let
listenerFlag
=
listenerStatus
.
ready
;
listenerData
.
on
=
true
;
listenerData
.
typeStr
=
'systemBarTintChange'
;
let
caseName
=
'setWindowSystemBarPropertiesTest2'
;
let
caseName
=
'setWindowSystemBarPropertiesTest2'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
info
(
'setWindowSystemBarPropertiesTest2'
);
ohosWindow
.
on
(
'systemBarTintChange'
,
(
systemBarData
)
=>
{
console
.
info
(
'setWindowSystemBarPropertiesTest2 systemBatData : '
+
JSON
.
stringify
(
systemBarData
));
if
(
listenerFlag
===
listenerStatus
.
pending
)
{
// 单个导航栏或者系统状态信息
try
{
expect
(
!!
systemBarData
)
.
assertTrue
();
expect
(
!!
systemBarData
.
regionTint
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
let
arrLength
=
systemBarData
.
regionTint
.
length
;
for
(
let
i
=
0
;
i
<
arrLength
;
i
++
)
{
let
systemBarRegionTint
=
systemBarData
.
regionTint
[
i
];
if
(
systemBarRegionTint
.
type
===
ohosWindow
.
WindowType
.
TYPE_STATUS_BAR
)
{
console
.
info
(
'setWindowSystemBarPropertiesTest2 assert2 start!'
);
let
backgroundIndex
=
cloneColorArr
.
SBC
.
indexOf
(
systemBarRegionTint
.
backgroundColor
);
let
contentColorIndex
=
cloneColorArr
.
SCC
.
indexOf
(
systemBarRegionTint
.
contentColor
);
if
(
backgroundIndex
>=
0
)
{
cloneColorArr
.
SBC
.
splice
(
backgroundIndex
,
1
);
}
if
(
contentColorIndex
>=
0
)
{
cloneColorArr
.
SCC
.
splice
(
contentColorIndex
,
1
);
}
try
{
expect
(
backgroundIndex
!==
-
1
)
.
assertTrue
();
expect
(
contentColorIndex
!==
-
1
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
done
();
}
else
if
(
systemBarRegionTint
.
type
===
ohosWindow
.
WindowType
.
TYPE_NAVIGATION_BAR
)
{
let
backgroundIndex
=
cloneColorArr
.
NBC
.
indexOf
(
systemBarRegionTint
.
backgroundColor
);
let
contentColorIndex
=
cloneColorArr
.
NCC
.
indexOf
(
systemBarRegionTint
.
contentColor
);
if
(
backgroundIndex
>=
0
)
{
cloneColorArr
.
NBC
.
splice
(
backgroundIndex
,
1
);
}
if
(
contentColorIndex
>=
0
)
{
cloneColorArr
.
NCC
.
splice
(
contentColorIndex
,
1
);
}
try
{
expect
(
backgroundIndex
!==
-
1
)
.
assertTrue
();
expect
(
contentColorIndex
!==
-
1
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
done
();
}
}
}
})
console
.
info
(
'setWindowSystemBarPropertiesTest2 on systemBarTintChange finished'
);
let
mainWsync
=
windowStage
.
getMainWindowSync
();
let
mainWsync
=
windowStage
.
getMainWindowSync
();
expect
(
mainWsync
!=
null
)
.
assertTrue
();
expect
(
mainWsync
!=
null
)
.
assertTrue
();
await
mainWsync
.
showWindow
()
.
catch
((
err
)
=>
{
await
mainWsync
.
showWindow
()
.
catch
((
err
)
=>
{
...
@@ -255,7 +163,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
...
@@ -255,7 +163,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
done
();
done
();
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
listenerFlag
=
listenerStatus
.
pending
;
for
(
let
i
=
0
;
i
<
commonNUMBERColorArr
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
commonNUMBERColorArr
.
length
;
i
++
){
console
.
info
(
'setWindowSystemBarPropertiesTest2 begin step:'
+
i
);
console
.
info
(
'setWindowSystemBarPropertiesTest2 begin step:'
+
i
);
let
tempColor
=
commonNUMBERColorArr
[
i
];
let
tempColor
=
commonNUMBERColorArr
[
i
];
...
@@ -293,39 +200,8 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
...
@@ -293,39 +200,8 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
*/
*/
it
(
'setWindowSystemBarPropertiesTest3'
,
0
,
async
function
(
done
)
{
it
(
'setWindowSystemBarPropertiesTest3'
,
0
,
async
function
(
done
)
{
let
cloneColorArr
=
JSON
.
parse
(
JSON
.
stringify
(
commonKEYColorArr
));
let
cloneColorArr
=
JSON
.
parse
(
JSON
.
stringify
(
commonKEYColorArr
));
let
listenerFlag
=
listenerStatus
.
ready
;
let
caseName
=
'setWindowSystemBarPropertiesTest3'
;
let
caseName
=
'setWindowSystemBarPropertiesTest3'
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
let
msgStr
=
'jsunittest '
+
caseName
+
' '
;
console
.
info
(
'setWindowSystemBarPropertiesTest3 start'
);
listenerData
.
on
=
true
;
listenerData
.
typeStr
=
'systemBarTintChange'
;
ohosWindow
.
on
(
'systemBarTintChange'
,
(
systemBarData
)
=>
{
console
.
info
(
'setWindowSystemBarPropertiesTest3 systemBatData : '
+
JSON
.
stringify
(
systemBarData
));
if
(
listenerFlag
===
listenerStatus
.
pending
)
{
try
{
expect
(
!!
systemBarData
)
.
assertTrue
();
expect
(
!!
systemBarData
.
regionTint
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
let
arrLength
=
systemBarData
.
regionTint
.
length
;
// 单个导航栏或者系统状态信息
for
(
let
i
=
0
;
i
<
arrLength
;
i
++
)
{
let
tempData
=
systemBarData
.
regionTint
[
i
];
if
(
tempData
.
type
===
ohosWindow
.
WindowType
.
TYPE_STATUS_BAR
||
tempData
.
type
===
ohosWindow
.
WindowType
.
TYPE_NAVIGATION_BAR
)
{
let
backgroundIndex
=
cloneColorArr
.
indexOf
(
tempData
.
backgroundColor
);
let
contentColorIndex
=
cloneColorArr
.
indexOf
(
tempData
.
contentColor
);
try
{
expect
(
backgroundIndex
===
-
1
)
.
assertTrue
();
expect
(
contentColorIndex
===
-
1
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`ohosWindow.on catch error: ${JSON.stringify(error)}`
)
}
done
();
}
}
}
})
let
tempWnd
=
windowStage
.
getMainWindowSync
();
let
tempWnd
=
windowStage
.
getMainWindowSync
();
expect
(
tempWnd
!=
null
)
.
assertTrue
();
expect
(
tempWnd
!=
null
)
.
assertTrue
();
await
tempWnd
.
showWindow
()
.
catch
((
err
)
=>
{
await
tempWnd
.
showWindow
()
.
catch
((
err
)
=>
{
...
@@ -339,7 +215,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
...
@@ -339,7 +215,6 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
done
();
done
();
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
listenerFlag
=
listenerStatus
.
pending
;
for
(
let
i
=
0
;
i
<
commonKEYColorArr
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
commonKEYColorArr
.
length
;
i
++
){
console
.
info
(
'setWindowSystemBarPropertiesTest3 begin step:'
+
i
);
console
.
info
(
'setWindowSystemBarPropertiesTest3 begin step:'
+
i
);
let
tempColor
=
commonKEYColorArr
[
i
];
let
tempColor
=
commonKEYColorArr
[
i
];
...
...
graphic/windowStage/entry/src/main/ets/test/windowRichScene.test.ets
0 → 100644
浏览文件 @
ff19efa9
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录