Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6e1faa9d
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看板
未验证
提交
6e1faa9d
编写于
6月 23, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3691 更新master分支上Worker模块的XTS用例
Merge pull request !3691 from hyq5234/OpenHarmony-3.1-Release
上级
cd50709c
61bc1586
变更
10
展开全部
显示空白变更内容
内联
并排
Showing
10 changed file
with
834 addition
and
209 deletion
+834
-209
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_009.js
...er_lib_standard/src/main/js/default/workers/worker_009.js
+13
-0
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_010.js
...er_lib_standard/src/main/js/default/workers/worker_010.js
+8
-0
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_012.js
...er_lib_standard/src/main/js/default/workers/worker_012.js
+8
-0
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_0121.js
...r_lib_standard/src/main/js/default/workers/worker_0121.js
+4
-1
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_0122.js
...r_lib_standard/src/main/js/default/workers/worker_0122.js
+1
-1
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_013.js
...er_lib_standard/src/main/js/default/workers/worker_013.js
+8
-0
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_014.js
...er_lib_standard/src/main/js/default/workers/worker_014.js
+8
-0
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_015.js
...er_lib_standard/src/main/js/default/workers/worker_015.js
+4
-1
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_0151.js
...r_lib_standard/src/main/js/default/workers/worker_0151.js
+4
-1
compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js
...ntime/worker_lib_standard/src/main/js/test/Worker.test.js
+776
-205
未找到文件。
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_009.js
浏览文件 @
6e1faa9d
...
...
@@ -17,6 +17,7 @@ import worker from "@ohos.worker"
const
parentPort
=
worker
.
parentPort
;
var
ss
=
undefined
;
var
flag
=
false
;
parentPort
.
onmessage
=
function
(
e
)
{
let
data
=
e
.
data
;
...
...
@@ -24,8 +25,20 @@ parentPort.onmessage = function(e) {
case
"
new
"
:
ss
=
new
worker
.
Worker
(
"
workers/worker_0091.js
"
);
console
.
log
(
"
worker:: workerxx
"
);
ss
.
onexit
=
function
()
{
flag
=
true
;
}
parentPort
.
postMessage
(
ss
!=
null
);
break
;
case
"
wait
"
:
if
(
flag
)
{
parentPort
.
postMessage
(
"
terminate
"
);
}
break
;
case
"
terminate
"
:
flag
=
false
;
ss
.
terminate
();
break
;
default
:
break
;
}
...
...
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_010.js
浏览文件 @
6e1faa9d
...
...
@@ -29,6 +29,10 @@ parentPort.onmessage = function(e) {
backValue
=
ee
.
data
;
flag
=
true
;
}
ss
.
onexit
=
function
()
{
backValue
=
"
terminate
"
;
flag
=
true
;
}
ss
.
postMessage
(
data
.
value
);
break
;
case
"
wait
"
:
...
...
@@ -36,6 +40,10 @@ parentPort.onmessage = function(e) {
parentPort
.
postMessage
(
backValue
);
}
break
;
case
"
terminate
"
:
flag
=
false
;
ss
.
terminate
();
break
;
default
:
break
;
}
...
...
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_012.js
浏览文件 @
6e1faa9d
...
...
@@ -29,6 +29,10 @@ parentPort.onmessage = function(e) {
backValue
=
ee
.
data
;
flag
=
true
;
}
ss
.
onexit
=
function
()
{
backValue
=
"
terminate
"
;
flag
=
true
;
}
ss
.
postMessage
({
type
:
"
new
"
});
break
;
case
"
wait
"
:
...
...
@@ -36,6 +40,10 @@ parentPort.onmessage = function(e) {
parentPort
.
postMessage
(
backValue
);
}
break
;
case
"
terminate
"
:
flag
=
false
;
ss
.
terminate
();
break
;
default
:
break
;
}
...
...
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_0121.js
浏览文件 @
6e1faa9d
...
...
@@ -25,7 +25,10 @@ parentPort.onmessage = function(e) {
switch
(
data
.
type
)
{
case
"
new
"
:
ss
=
new
worker
.
Worker
(
"
workers/worker_0122.js
"
);
parentPort
.
postMessage
(
ss
!=
null
)
ss
.
terminate
();
ss
.
onexit
=
function
()
{
parentPort
.
postMessage
(
ss
!=
null
);
}
break
;
default
:
break
;
...
...
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_0122.js
浏览文件 @
6e1faa9d
...
...
@@ -21,5 +21,5 @@ var backValue = undefined;
var
flag
=
false
;
parentPort
.
onmessage
=
function
(
e
)
{
console
.
log
(
"
worker:: thrid worker onmessage
"
)
console
.
info
(
"
worker:: thrid worker onmessage
"
)
}
\ No newline at end of file
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_013.js
浏览文件 @
6e1faa9d
...
...
@@ -29,6 +29,10 @@ parentPort.onmessage = function(e) {
backValue
=
ee
.
data
;
flag
=
true
;
}
ss
.
onexit
=
function
()
{
backValue
=
"
terminate
"
;
flag
=
true
;
}
ss
.
postMessage
(
data
.
value
);
break
;
case
"
wait
"
:
...
...
@@ -36,6 +40,10 @@ parentPort.onmessage = function(e) {
parentPort
.
postMessage
(
backValue
);
}
break
;
case
"
terminate
"
:
flag
=
false
;
ss
.
terminate
();
break
;
default
:
break
;
}
...
...
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_014.js
浏览文件 @
6e1faa9d
...
...
@@ -29,6 +29,10 @@ parentPort.onmessage = function(e) {
backValue
=
ee
.
data
;
flag
=
true
;
}
ss
.
onexit
=
function
()
{
backValue
=
"
terminate
"
;
flag
=
true
;
}
ss
.
postMessage
(
data
.
value
);
break
;
case
"
wait
"
:
...
...
@@ -36,6 +40,10 @@ parentPort.onmessage = function(e) {
parentPort
.
postMessage
(
backValue
);
}
break
;
case
"
terminate
"
:
flag
=
false
;
ss
.
terminate
();
break
;
default
:
break
;
}
...
...
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_015.js
浏览文件 @
6e1faa9d
...
...
@@ -25,6 +25,9 @@ parentPort.onmessage = function(e) {
switch
(
data
.
type
)
{
case
"
new
"
:
ss
=
new
worker
.
Worker
(
"
workers/worker_0151.js
"
);
ss
.
onexit
=
function
()
{
parentPort
.
postMessage
(
backValue
);
// 16
}
ss
.
onmessage
=
function
(
ee
)
{
backValue
=
ee
.
data
;
// 16
flag
=
true
;
...
...
@@ -34,7 +37,7 @@ parentPort.onmessage = function(e) {
case
"
wait
"
:
ss
.
postMessage
({
type
:
"
wait
"
});
if
(
flag
)
{
parentPort
.
postMessage
(
backValue
);
// 16
ss
.
terminate
();
}
break
;
default
:
...
...
compileruntime/worker_lib_standard/src/main/js/default/workers/worker_0151.js
浏览文件 @
6e1faa9d
...
...
@@ -25,6 +25,9 @@ parentPort.onmessage = function(e) {
switch
(
data
.
type
)
{
case
"
new
"
:
ss
=
new
worker
.
Worker
(
"
workers/worker_0152.js
"
);
ss
.
onexit
=
function
()
{
parentPort
.
postMessage
(
backValue
);
// 16
}
ss
.
onmessage
=
function
(
ee
)
{
backValue
=
ee
.
data
;
flag
=
true
;
...
...
@@ -33,7 +36,7 @@ parentPort.onmessage = function(e) {
break
;
case
"
wait
"
:
if
(
flag
)
{
parentPort
.
postMessage
(
backValue
);
// 16
ss
.
terminate
();
}
break
;
default
:
...
...
compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js
浏览文件 @
6e1faa9d
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录