From ca6a7566d9780e78bacb8832838f52809074532a Mon Sep 17 00:00:00 2001 From: lifansheng Date: Mon, 27 Sep 2021 16:55:19 +0800 Subject: [PATCH] Signed-off-by: lifansheng On branch master Your branch is up to date with 'origin/master'. Changes to be committed: modified: compileruntime/BUILD.gn modified: compileruntime/process_lib_standard/BUILD.gn modified: compileruntime/process_lib_standard/Test.json deleted: compileruntime/process_lib_standard/project/entry/package.json new file: compileruntime/process_lib_standard/signature/openharmony_sx.p7b renamed: compileruntime/util_lib_standard/project/entry/src/main/config.json -> compileruntime/process_lib_standard/src/main/config.json renamed: compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java -> compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MainAbility.java renamed: compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java -> compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MyApplication.java renamed: compileruntime/process_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/process_lib_standard/src/main/js/default/app.js renamed: compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/process_lib_standard/src/main/js/default/i18n/en-US.json renamed: compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/process_lib_standard/src/main/js/default/i18n/zh-CN.json renamed: compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/process_lib_standard/src/main/js/default/pages/index/index.css renamed: compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/process_lib_standard/src/main/js/default/pages/index/index.hml renamed: compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/process_lib_standard/src/main/js/default/pages/index/index.js renamed: compileruntime/process_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/process_lib_standard/src/main/js/test/ExampleJsunit.test.js renamed: compileruntime/process_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/process_lib_standard/src/main/js/test/List.test.js renamed: compileruntime/process_lib_standard/project/entry/src/main/js/test/Process.test.js -> compileruntime/process_lib_standard/src/main/js/test/Process.test.js renamed: compileruntime/process_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/process_lib_standard/src/main/resources/base/element/string.json renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/app.js -> compileruntime/process_lib_standard/src/ohosTest/js/default/app.js renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json -> compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/en-US.json renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json -> compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css -> compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.css renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml -> compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.hml renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js -> compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.js renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js -> compileruntime/process_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/List.test.js -> compileruntime/process_lib_standard/src/ohosTest/js/test/List.test.js renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json -> compileruntime/process_lib_standard/src/ohosTest/resources/base/element/string.json modified: compileruntime/url_lib_standard/BUILD.gn modified: compileruntime/url_lib_standard/Test.json deleted: compileruntime/url_lib_standard/project/entry/package.json new file: compileruntime/url_lib_standard/signature/openharmony_sx.p7b renamed: compileruntime/url_lib_standard/project/entry/src/main/config.json -> compileruntime/url_lib_standard/src/main/config.json renamed: compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java -> compileruntime/url_lib_standard/src/main/java/com/example/url/MainAbility.java renamed: compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java -> compileruntime/url_lib_standard/src/main/java/com/example/url/MyApplication.java renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/url_lib_standard/src/main/js/default/app.js renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png -> compileruntime/url_lib_standard/src/main/js/default/common/images/Wallpaper.png renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg -> compileruntime/url_lib_standard/src/main/js/default/common/images/bg-tv.jpg renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/url_lib_standard/src/main/js/default/i18n/en-US.json renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/url_lib_standard/src/main/js/default/i18n/zh-CN.json renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/url_lib_standard/src/main/js/default/pages/index/index.css renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/url_lib_standard/src/main/js/default/pages/index/index.hml renamed: compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/url_lib_standard/src/main/js/default/pages/index/index.js renamed: compileruntime/url_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/url_lib_standard/src/main/js/test/ExampleJsunit.test.js renamed: compileruntime/url_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/url_lib_standard/src/main/js/test/List.test.js renamed: compileruntime/url_lib_standard/project/entry/src/main/js/test/url.test.js -> compileruntime/url_lib_standard/src/main/js/test/url.test.js renamed: compileruntime/util_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/url_lib_standard/src/main/resources/base/element/string.json renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/app.js -> compileruntime/url_lib_standard/src/ohosTest/js/default/app.js renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json -> compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/en-US.json renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json -> compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css -> compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.css renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml -> compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.hml renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js -> compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.js renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js -> compileruntime/url_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/List.test.js -> compileruntime/url_lib_standard/src/ohosTest/js/test/List.test.js renamed: compileruntime/url_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json -> compileruntime/url_lib_standard/src/ohosTest/resources/base/element/string.json modified: compileruntime/util_lib_standard/BUILD.gn modified: compileruntime/util_lib_standard/Test.json deleted: compileruntime/util_lib_standard/project/entry/package.json new file: compileruntime/util_lib_standard/signature/openharmony_sx.p7b renamed: compileruntime/process_lib_standard/project/entry/src/main/config.json -> compileruntime/util_lib_standard/src/main/config.json renamed: compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java -> compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MainAbility.java renamed: compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java -> compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MyApplication.java renamed: compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java -> compileruntime/util_lib_standard/src/main/java/com/example/url/MainAbility.java renamed: compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java -> compileruntime/util_lib_standard/src/main/java/com/example/url/MyApplication.java renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/util_lib_standard/src/main/js/default/app.js renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png -> compileruntime/util_lib_standard/src/main/js/default/common/images/Wallpaper.png renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg -> compileruntime/util_lib_standard/src/main/js/default/common/images/bg-tv.jpg renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/util_lib_standard/src/main/js/default/i18n/en-US.json renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/util_lib_standard/src/main/js/default/i18n/zh-CN.json renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/util_lib_standard/src/main/js/default/pages/index/index.css renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/util_lib_standard/src/main/js/default/pages/index/index.hml renamed: compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/util_lib_standard/src/main/js/default/pages/index/index.js renamed: compileruntime/util_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/util_lib_standard/src/main/js/test/ExampleJsunit.test.js renamed: compileruntime/util_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/util_lib_standard/src/main/js/test/List.test.js renamed: compileruntime/util_lib_standard/project/entry/src/main/js/test/TextCodr.test.js -> compileruntime/util_lib_standard/src/main/js/test/TextCodr.test.js renamed: compileruntime/util_lib_standard/project/entry/src/main/js/test/url.test.js -> compileruntime/util_lib_standard/src/main/js/test/url.test.js renamed: compileruntime/url_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/util_lib_standard/src/main/resources/base/element/string.json renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/app.js -> compileruntime/util_lib_standard/src/ohosTest/js/default/app.js renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json -> compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/en-US.json renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json -> compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css -> compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.css renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml -> compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.hml renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js -> compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.js renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js -> compileruntime/util_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js renamed: compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/List.test.js -> compileruntime/util_lib_standard/src/ohosTest/js/test/List.test.js renamed: compileruntime/util_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json -> compileruntime/util_lib_standard/src/ohosTest/resources/base/element/string.json modified: compileruntime/worker_lib_standard/BUILD.gn modified: compileruntime/worker_lib_standard/Test.json deleted: compileruntime/worker_lib_standard/hap/entry-debug-standard-unsigned.hap deleted: compileruntime/worker_lib_standard/project/entry/package.json new file: compileruntime/worker_lib_standard/signature/openharmony_sx.p7b renamed: compileruntime/worker_lib_standard/project/entry/src/main/config.json -> compileruntime/worker_lib_standard/src/main/config.json renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/worker_lib_standard/src/main/js/default/app.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/worker_lib_standard/src/main/js/default/i18n/en-US.json renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/worker_lib_standard/src/main/js/default/i18n/zh-CN.json renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.css renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.hml renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.css -> compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.css renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.hml -> compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.hml renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.js -> compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_002.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_002.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_003.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_003.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_004.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_004.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_005.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_005.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_006.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_006.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_007.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_007.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_008.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_008.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/worker_lib_standard/src/main/js/test/ExampleJsunit.test.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/worker_lib_standard/src/main/js/test/List.test.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/js/test/Worker.test.js -> compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js renamed: compileruntime/worker_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/worker_lib_standard/src/main/resources/base/element/string.json renamed: compileruntime/worker_lib_standard/project/entry/src/main/resources/base/media/icon.png -> compileruntime/worker_lib_standard/src/main/resources/base/media/icon.png --- compileruntime/BUILD.gn | 17 +- compileruntime/process_lib_standard/BUILD.gn | 26 +- compileruntime/process_lib_standard/Test.json | 2 +- .../project/entry/package.json | 1 - .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../src/main/config.json | 112 +- .../com/example/childprocess/MainAbility.java | 62 +- .../example/childprocess/MyApplication.java | 50 +- .../entry => }/src/main/js/default/app.js | 0 .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../src/main/js/test/ExampleJsunit.test.js | 0 .../entry => }/src/main/js/test/List.test.js | 32 +- .../src/main/js/test/Process.test.js | 999 +++++++-------- .../main/resources/base/element/string.json | 22 +- .../entry => }/src/ohosTest/js/default/app.js | 0 .../src/ohosTest/js/default/i18n/en-US.json | 0 .../src/ohosTest/js/default/i18n/zh-CN.json | 0 .../ohosTest/js/default/pages/index/index.css | 0 .../ohosTest/js/default/pages/index/index.hml | 0 .../ohosTest/js/default/pages/index/index.js | 0 .../ohosTest/js/test/ExampleJsunit.test.js | 0 .../src/ohosTest/js/test/List.test.js | 30 +- .../resources/base/element/string.json | 22 +- compileruntime/url_lib_standard/BUILD.gn | 26 +- compileruntime/url_lib_standard/Test.json | 2 +- .../project/entry/package.json | 1 - .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../{project/entry => }/src/main/config.json | 112 +- .../java/com/example/url/MainAbility.java | 60 +- .../java/com/example/url/MyApplication.java | 48 +- .../entry => }/src/main/js/default/app.js | 0 .../js/default/common/images/Wallpaper.png | Bin .../main/js/default/common/images/bg-tv.jpg | Bin .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../src/main/js/test/ExampleJsunit.test.js | 0 .../entry => }/src/main/js/test/List.test.js | 32 +- .../entry => }/src/main/js/test/url.test.js | 1126 ++++++++--------- .../main/resources/base/element/string.json | 22 +- .../entry => }/src/ohosTest/js/default/app.js | 0 .../src/ohosTest/js/default/i18n/en-US.json | 0 .../src/ohosTest/js/default/i18n/zh-CN.json | 0 .../ohosTest/js/default/pages/index/index.css | 0 .../ohosTest/js/default/pages/index/index.hml | 0 .../ohosTest/js/default/pages/index/index.js | 0 .../ohosTest/js/test/ExampleJsunit.test.js | 0 .../src/ohosTest/js/test/List.test.js | 30 +- .../resources/base/element/string.json | 24 +- compileruntime/util_lib_standard/BUILD.gn | 26 +- compileruntime/util_lib_standard/Test.json | 2 +- .../project/entry/package.json | 1 - .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../src/main/config.json | 112 +- .../com/example/childprocess/MainAbility.java | 62 +- .../example/childprocess/MyApplication.java | 50 +- .../java/com/example/url/MainAbility.java | 60 +- .../java/com/example/url/MyApplication.java | 48 +- .../entry => }/src/main/js/default/app.js | 0 .../js/default/common/images/Wallpaper.png | Bin .../main/js/default/common/images/bg-tv.jpg | Bin .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../src/main/js/test/ExampleJsunit.test.js | 0 .../entry => }/src/main/js/test/List.test.js | 32 +- .../src/main/js/test/TextCodr.test.js | 896 ++++++------- .../entry => }/src/main/js/test/url.test.js | 1126 ++++++++--------- .../main/resources/base/element/string.json | 22 +- .../entry => }/src/ohosTest/js/default/app.js | 0 .../src/ohosTest/js/default/i18n/en-US.json | 0 .../src/ohosTest/js/default/i18n/zh-CN.json | 0 .../ohosTest/js/default/pages/index/index.css | 0 .../ohosTest/js/default/pages/index/index.hml | 0 .../ohosTest/js/default/pages/index/index.js | 0 .../ohosTest/js/test/ExampleJsunit.test.js | 0 .../src/ohosTest/js/test/List.test.js | 30 +- .../resources/base/element/string.json | 24 +- compileruntime/worker_lib_standard/BUILD.gn | 26 +- compileruntime/worker_lib_standard/Test.json | 2 +- .../hap/entry-debug-standard-unsigned.hap | Bin 235532 -> 0 bytes .../project/entry/package.json | 1 - .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../{project/entry => }/src/main/config.json | 118 +- .../entry => }/src/main/js/default/app.js | 0 .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../main/js/default/pages/second/second.css | 0 .../main/js/default/pages/second/second.hml | 0 .../main/js/default/pages/second/second.js | 0 .../src/main/js/default/workers/worker.js | 130 +- .../src/main/js/default/workers/worker_002.js | 62 +- .../src/main/js/default/workers/worker_003.js | 58 +- .../src/main/js/default/workers/worker_004.js | 60 +- .../src/main/js/default/workers/worker_005.js | 56 +- .../src/main/js/default/workers/worker_006.js | 56 +- .../src/main/js/default/workers/worker_007.js | 56 +- .../src/main/js/default/workers/worker_008.js | 56 +- .../src/main/js/test/ExampleJsunit.test.js | 0 .../entry => }/src/main/js/test/List.test.js | 32 +- .../src/main/js/test/Worker.test.js | 1090 ++++++++-------- .../main/resources/base/element/string.json | 22 +- .../src/main/resources/base/media/icon.png | Bin 114 files changed, 3612 insertions(+), 3562 deletions(-) delete mode 100644 compileruntime/process_lib_standard/project/entry/package.json create mode 100644 compileruntime/process_lib_standard/signature/openharmony_sx.p7b rename compileruntime/{util_lib_standard/project/entry => process_lib_standard}/src/main/config.json (95%) rename compileruntime/{util_lib_standard/project/entry => process_lib_standard}/src/main/java/com/example/childprocess/MainAbility.java (96%) rename compileruntime/{util_lib_standard/project/entry => process_lib_standard}/src/main/java/com/example/childprocess/MyApplication.java (97%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/default/app.js (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/default/i18n/en-US.json (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/default/i18n/zh-CN.json (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.css (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.hml (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.js (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/test/ExampleJsunit.test.js (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/test/List.test.js (93%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/js/test/Process.test.js (79%) rename compileruntime/process_lib_standard/{project/entry => }/src/main/resources/base/element/string.json (94%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/js/default/app.js (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/js/default/i18n/en-US.json (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/js/default/i18n/zh-CN.json (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.css (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.hml (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.js (100%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/js/test/ExampleJsunit.test.js (100%) rename compileruntime/{url_lib_standard/project/entry => process_lib_standard}/src/ohosTest/js/test/List.test.js (92%) rename compileruntime/process_lib_standard/{project/entry => }/src/ohosTest/resources/base/element/string.json (93%) delete mode 100644 compileruntime/url_lib_standard/project/entry/package.json create mode 100644 compileruntime/url_lib_standard/signature/openharmony_sx.p7b rename compileruntime/url_lib_standard/{project/entry => }/src/main/config.json (95%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/java/com/example/url/MainAbility.java (96%) rename compileruntime/{util_lib_standard/project/entry => url_lib_standard}/src/main/java/com/example/url/MyApplication.java (97%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/app.js (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/common/images/Wallpaper.png (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/common/images/bg-tv.jpg (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/i18n/en-US.json (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/i18n/zh-CN.json (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.css (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.hml (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.js (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/test/ExampleJsunit.test.js (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/test/List.test.js (97%) rename compileruntime/url_lib_standard/{project/entry => }/src/main/js/test/url.test.js (97%) rename compileruntime/{util_lib_standard/project/entry => url_lib_standard}/src/main/resources/base/element/string.json (94%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/js/default/app.js (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/js/default/i18n/en-US.json (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/js/default/i18n/zh-CN.json (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.css (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.hml (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.js (100%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/js/test/ExampleJsunit.test.js (100%) rename compileruntime/{util_lib_standard/project/entry => url_lib_standard}/src/ohosTest/js/test/List.test.js (92%) rename compileruntime/url_lib_standard/{project/entry => }/src/ohosTest/resources/base/element/string.json (93%) delete mode 100644 compileruntime/util_lib_standard/project/entry/package.json create mode 100644 compileruntime/util_lib_standard/signature/openharmony_sx.p7b rename compileruntime/{process_lib_standard/project/entry => util_lib_standard}/src/main/config.json (95%) rename compileruntime/{process_lib_standard/project/entry => util_lib_standard}/src/main/java/com/example/childprocess/MainAbility.java (96%) rename compileruntime/{process_lib_standard/project/entry => util_lib_standard}/src/main/java/com/example/childprocess/MyApplication.java (97%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/java/com/example/url/MainAbility.java (96%) rename compileruntime/{url_lib_standard/project/entry => util_lib_standard}/src/main/java/com/example/url/MyApplication.java (97%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/app.js (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/common/images/Wallpaper.png (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/common/images/bg-tv.jpg (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/i18n/en-US.json (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/i18n/zh-CN.json (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.css (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.hml (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.js (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/test/ExampleJsunit.test.js (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/test/List.test.js (93%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/test/TextCodr.test.js (96%) rename compileruntime/util_lib_standard/{project/entry => }/src/main/js/test/url.test.js (97%) rename compileruntime/{url_lib_standard/project/entry => util_lib_standard}/src/main/resources/base/element/string.json (94%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/js/default/app.js (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/js/default/i18n/en-US.json (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/js/default/i18n/zh-CN.json (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.css (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.hml (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/js/default/pages/index/index.js (100%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/js/test/ExampleJsunit.test.js (100%) rename compileruntime/{process_lib_standard/project/entry => util_lib_standard}/src/ohosTest/js/test/List.test.js (92%) rename compileruntime/util_lib_standard/{project/entry => }/src/ohosTest/resources/base/element/string.json (93%) delete mode 100644 compileruntime/worker_lib_standard/hap/entry-debug-standard-unsigned.hap delete mode 100644 compileruntime/worker_lib_standard/project/entry/package.json create mode 100644 compileruntime/worker_lib_standard/signature/openharmony_sx.p7b rename compileruntime/worker_lib_standard/{project/entry => }/src/main/config.json (95%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/app.js (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/i18n/en-US.json (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/i18n/zh-CN.json (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.css (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.hml (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/pages/index/index.js (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/pages/second/second.css (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/pages/second/second.hml (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/pages/second/second.js (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker_002.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker_003.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker_004.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker_005.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker_006.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker_007.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/default/workers/worker_008.js (97%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/test/ExampleJsunit.test.js (100%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/test/List.test.js (93%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/js/test/Worker.test.js (96%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/resources/base/element/string.json (94%) rename compileruntime/worker_lib_standard/{project/entry => }/src/main/resources/base/media/icon.png (100%) diff --git a/compileruntime/BUILD.gn b/compileruntime/BUILD.gn index 9ffdd79f7..5fbd3642b 100644 --- a/compileruntime/BUILD.gn +++ b/compileruntime/BUILD.gn @@ -10,13 +10,16 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import("//test/xts/tools/build/suite.gni") -group("jsapi") { +group("compileruntime") { testonly = true - deps = [ - "StartupProcessJSApiTest:startup_process_js_test", - "StartupUrlJSApiTest:startup_url_js_test", - "StartupUtilJSApiTest:startup_util_js_test", - "StartupWorkerJSApiTest:startup_worker_js_test", - ] + if (is_standard_system) { + deps = [ + "process_lib_standard:process_js_test", + "url_lib_standard:url_js_test", + "util_lib_standard:util_js_test", + "worker_lib_standard:worker_js_hap", + ] + } } diff --git a/compileruntime/process_lib_standard/BUILD.gn b/compileruntime/process_lib_standard/BUILD.gn index ef3f729ce..0c4e64017 100644 --- a/compileruntime/process_lib_standard/BUILD.gn +++ b/compileruntime/process_lib_standard/BUILD.gn @@ -10,9 +10,29 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import("//test/xts/tools/build/suite.gni") +ohos_js_hap_suite("process_js_test") { + hap_profile = "./src/main/config.json" + deps = [ + ":process_js_assets", + ":process_resources", + ] + + # shared_libraries = [ + # "//third_party/giflib:libgif", + # "//third_party/libpng:libpng", + # ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ProcessJSApiTest" -ohos_js_hap_suite("startup_process_js_test") { - test_hap_name = "StartupProcessJSApiTest" - hap_source_path = "hap/entry-debug-rich-unsigned.hap" + # part_name = "prebuilt_hap" + # subsystem_name = "xts" +} +ohos_js_assets("process_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("process_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" } diff --git a/compileruntime/process_lib_standard/Test.json b/compileruntime/process_lib_standard/Test.json index 619814044..58980316e 100644 --- a/compileruntime/process_lib_standard/Test.json +++ b/compileruntime/process_lib_standard/Test.json @@ -9,7 +9,7 @@ "kits": [ { "test-file-name": [ - "StartupProcessJSApiTest.hap" + "ProcessJSApiTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/compileruntime/process_lib_standard/project/entry/package.json b/compileruntime/process_lib_standard/project/entry/package.json deleted file mode 100644 index 69a88e3b6..000000000 --- a/compileruntime/process_lib_standard/project/entry/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/compileruntime/process_lib_standard/signature/openharmony_sx.p7b b/compileruntime/process_lib_standard/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 GIT binary patch literal 3437 zcmcgvX>b$g8MY4FF(5FQyMT=#m||qU)nQ9cId-MBB-<-lvSdq&snM}IENNF>t+bK| zgowuF2vC|SxSZxNN5eHhV%(WPpbeB9Fc3;JDMtzMBv1-XAc2N~c2_tCXW&OCGw6qQ z-s9VS-tT?h=bI0tMS+~WDXqHJyCPmLzdbE-fV8Nd&*MRZfG8(#POFZG3xs@Lb{0ry z=R8j3wWo!5g=yjKx#BoZMFS)uA)H}cTp@-^K`9VV?RC3J59@}eik*>n|pRKOLZ zxdn7G!Yv@9O#y<&eUy{)vMXb;fQR)ffVAADQsEMXm;IBMDLfLD0w^U;6%HVo-0Q_5 zCHEa?DBuauNpZzoF+tK27w#n~?u%toS-DhR4k@Q*{7x^8Q=D6&kd^_~J#VVG2LXkL zaAy=}U*?Jto)9hx5MGjdp9hcQAu@tfk_;l!PeyxPY<8b&+&D!CyaBh9=8BSVKLpk4 z4Ml3yY|&Th)vyK4cpC{!uU8v2YBlVV`d~(nz&<@{G1oe*DHub1z7~J5*;s2bX<)_* zV_GbsPQg`(&rpxRb_*Od7}++3+liSw-$!1 zs5*g}EHWhI3i|!-FcfzYL0`SL-rq>LENC;PMl)G(0(1U2%Va|smp0UFx0xd@soZA* zD5LYc4OlbE7@ARt#h}rr3>K@bf%B#^-c+xz8Hr)0D5ExIFltezN@Hn8>o5d~bSfYtkc+_Z&kI#-N5_GhCg*V-^TSO=!G~ z(fXy{n2XV+k}6w_W`dTOP2a4u0ly;ANZ>4OxSK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E}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/compileruntime/util_lib_standard/project/entry/src/main/config.json b/compileruntime/process_lib_standard/src/main/config.json similarity index 95% rename from compileruntime/util_lib_standard/project/entry/src/main/config.json rename to compileruntime/process_lib_standard/src/main/config.json index f3773ec2f..75d1ac144 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/config.json +++ b/compileruntime/process_lib_standard/src/main/config.json @@ -1,57 +1,57 @@ -{ - "app": { - "bundleName": "com.example.childprocess", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.childprocess", - "name": ".MyApplication", - "mainAbility": "com.example.childprocess.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.childprocess.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } +{ + "app": { + "bundleName": "com.example.childprocess", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.childprocess", + "name": ".MyApplication", + "mainAbility": "com.example.childprocess.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.example.childprocess.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": true + } + } + ] + } } \ No newline at end of file diff --git a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java b/compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MainAbility.java similarity index 96% rename from compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java rename to compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MainAbility.java index 1bc0c4d53..dbdddf742 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java +++ b/compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MainAbility.java @@ -1,31 +1,31 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.childprocess; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class MainAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.childprocess; + +import ohos.ace.ability.AceAbility; +import ohos.aafwk.content.Intent; + +public class MainAbility extends AceAbility { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + } + + @Override + public void onStop() { + super.onStop(); + } +} diff --git a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java b/compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MyApplication.java similarity index 97% rename from compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java rename to compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MyApplication.java index b27ffa96e..bf24a9676 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java +++ b/compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MyApplication.java @@ -1,25 +1,25 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.childprocess; - -import ohos.aafwk.ability.AbilityPackage; - -public class MyApplication extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.childprocess; + +import ohos.aafwk.ability.AbilityPackage; + +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/default/app.js b/compileruntime/process_lib_standard/src/main/js/default/app.js similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/main/js/default/app.js rename to compileruntime/process_lib_standard/src/main/js/default/app.js diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/en-US.json b/compileruntime/process_lib_standard/src/main/js/default/i18n/en-US.json similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/en-US.json rename to compileruntime/process_lib_standard/src/main/js/default/i18n/en-US.json diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json b/compileruntime/process_lib_standard/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json rename to compileruntime/process_lib_standard/src/main/js/default/i18n/zh-CN.json diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.css b/compileruntime/process_lib_standard/src/main/js/default/pages/index/index.css similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.css rename to compileruntime/process_lib_standard/src/main/js/default/pages/index/index.css diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.hml b/compileruntime/process_lib_standard/src/main/js/default/pages/index/index.hml similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.hml rename to compileruntime/process_lib_standard/src/main/js/default/pages/index/index.hml diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.js b/compileruntime/process_lib_standard/src/main/js/default/pages/index/index.js similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.js rename to compileruntime/process_lib_standard/src/main/js/default/pages/index/index.js diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js b/compileruntime/process_lib_standard/src/main/js/test/ExampleJsunit.test.js similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js rename to compileruntime/process_lib_standard/src/main/js/test/ExampleJsunit.test.js diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/test/List.test.js b/compileruntime/process_lib_standard/src/main/js/test/List.test.js similarity index 93% rename from compileruntime/process_lib_standard/project/entry/src/main/js/test/List.test.js rename to compileruntime/process_lib_standard/src/main/js/test/List.test.js index fe9706bb6..ccd2b4ce7 100644 --- a/compileruntime/process_lib_standard/project/entry/src/main/js/test/List.test.js +++ b/compileruntime/process_lib_standard/src/main/js/test/List.test.js @@ -1,17 +1,17 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./ExampleJsunit.test.js') +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require('./ExampleJsunit.test.js') require('./Process.test.js') \ No newline at end of file diff --git a/compileruntime/process_lib_standard/project/entry/src/main/js/test/Process.test.js b/compileruntime/process_lib_standard/src/main/js/test/Process.test.js similarity index 79% rename from compileruntime/process_lib_standard/project/entry/src/main/js/test/Process.test.js rename to compileruntime/process_lib_standard/src/main/js/test/Process.test.js index 63a957bdf..801ed7f40 100644 --- a/compileruntime/process_lib_standard/project/entry/src/main/js/test/Process.test.js +++ b/compileruntime/process_lib_standard/src/main/js/test/Process.test.js @@ -1,515 +1,486 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/lite' -import process from '@ohos.process' - -describe('ChildProcessTest', function () { - - // childprocess runCmd test - it('test_runCmd_001', 0, async function () { - var child = process.runCmd('echo abc') - child.wait() - var array = new Uint8Array([97, 98, 99, 10, 0]) - child.getOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - }) - - it('test_runCmd_002', 0, async function () { - var child = process.runCmd('echo abc;', { maxBuffer : 2 }) - child.wait() - var array = new Uint8Array([97, 98, 0]) - child.getOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - }) - - it('test_runCmd_003', 0, async function () { - var child = process.runCmd('sleep 5; echo abc;', { timeout : 1, killSignal : 9 }) - child.wait() - var array = new Uint8Array([0]) - child.getOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - expect(child.exitCode).assertEqual(9) - }) - - it('test_runCmd_004', 0, async function () { - var child = process.runCmd('sleep 2; echo abc;', { timeout : 9000, killSignal : 9 }) - child.wait() - var array = new Uint8Array([97, 98, 99, 10, 0]) - child.getOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - expect(child.exitCode).assertEqual(0) - }) - - // childprocess getOutput test - it('test_getOutput_001', 0, async function () { - var child = process.runCmd('echo bcd;') - child.wait() - var array = new Uint8Array([98, 99, 100, 0]) - child.getOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - }) - - // childprocess getErrorOutput test - it('test_getErrorOutput_001', 0, async function () { - var child = process.runCmd('makdir 1.txt') - child.wait() - var array = new Uint8Array([115, 104, 58, 32, 109, 97, 107, 100, 105, 114, 58, 32, 105, 110, 97, 99, 99, - 101, 115, 115, 105, 98, 108, 101, 32, 111, 114, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 10, 0]) - child.getErrorOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - }) - - it('test_getErrorOutput_002', 0, async function () { - var child = process.runCmd('echo "error" 1>&2') - child.wait() - var array = new Uint8Array([101, 114, 111, 114, 10, 0]) - child.getErrorOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - }) - - it('test_getErrorOutput_003', 0, async function () { - var child = process.runCmd('1') - child.wait() - var array = new Uint8Array([115, 104, 58, 32, 49, 58, 32, 105, 110, 97, 99, 99, 101, 115, 115, 105, 98, - 108, 101, 32, 111, 114, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 10, 0]) - child.getErrorOutput().then(val=>{ - for (var i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]) - } - }) - }) - - // childprocess wait test - it('test_wait_001', 0, async function () { - var child = process.runCmd('ls') - var status = child.wait() - status.then(val=>{ - expect(val).assertEqual(0) - }) - }) - - it('test_wait_002', 0, async function () { - var child = process.runCmd('ls; sleep 5;') - child.kill(9); - var status = child.wait() - status.then(val=>{ - expect(val).assertEqual(9) - }) - }) - - // childprocess pid test - it('test_pid_001', 0, function () { - var child = process.runCmd('ls; sleep 5;') - child.wait() - var pid_ = child.pid - expect(pid_ > 0).assertEqual(true) - }) - - // childprocess ppid test - it('test_ppid_001', 0, function () { - var child = process.runCmd('ls; sleep 5;') - var status = child.wait() - var ppid_ = child.ppid - expect(ppid_ > 0).assertEqual(true) - }) - - // childprocess kill test - it('test_kill_001', 0, function () { - var child = process.runCmd('ls; sleep 5s;') - var result = child.kill(13) - var temp = child.killed - expect(temp).assertEqual(true) - }) - - it('test_kill_002', 0, function () { - var child = process.runCmd('ls; sleep 5s;') - var result = child.kill(1) - var temp = child.killed - expect(temp).assertEqual(true) - }) - - it('test_kill_003', 0, function () { - var child = process.runCmd('ls; sleep 5s;') - var result = child.kill('SIGHUP') - var temp = child.killed - expect(temp).assertEqual(true) - }) - - it('test_kill_004', 0, function () { - var child = process.runCmd('ls; sleep 5s;') - var result = child.kill('ABC') - var temp = child.killed - expect(temp).assertEqual(true) - }) - - it('test_kill_005', 0, function () { - var child = process.runCmd('ls') - child.wait() - var result = child.kill(9) - var temp = child.killed - expect(temp).assertEqual(false) - }) - - // childprocess close test - it('test_close_001', 0, function () { - var child = process.runCmd('ls; sleep 5s;') - var result = child.close() - expect(child.exitCode).assertEqual(9) - }) - - it('test_close_002', 0, function () { - var child = process.runCmd('ls') - function sleep(ms, callback) { - setTimeout(callback, ms) - } - sleep(1000, () => {} ) - var result = child.close() - expect(child.exitCode===0).assertEqual(false) - }) - - it('test_close_003', 0, function () { - var child = process.runCmd('ls;') - var status = child.wait() - var result = child.close() - expect(child.exitCode).assertEqual(0) - }) - - // childprocess killed test - it('test_killed_001', 0, function () { - var child = process.runCmd('ls; sleep 5s;') - var result = child.kill(3) - var temp = child.killed - expect(temp).assertEqual(true) - }) - - // childprocess exitCode test - it('test_exitCode_001', 0, function () { - var child = process.runCmd('ls; sleep 5s;') - var temp = child.kill(9) - child.wait() - var result = child.exitCode - expect(result).assertEqual(9) - }) - - // process GetUid test - it('GetUid_test_001', 0, function () { - var that = new process.Process() - var result = that.getUid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - }) - - it('GetUid_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++){ - var result = that.getUid - if(result != null) { - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - } - } - }) - - // process GetGid test - it('GetGid_test_001', 0, function () { - var that = new process.Process() - var result = that.getGid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - }) - - it('GetGid_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++){ - var result = that.getGid - if(result != null) { - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - } - } - }) - - // process GetEuid test - it('GetEuid_test_001', 0, function () { - var that = new process.Process() - var result = that.getEuid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - }) - - it('GetEuid_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++){ - var result = that.getEuid - if(result != null) { - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - } - } - }) - - // process GetEgid test - it('GetEgid_test_001', 0, function () { - var that = new process.Process() - var result = that.getEgid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - }) - - it('GetEgid_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++){ - var result = that.getEgid - if(result != null) { - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - } - } - }) - - // process GetGroups test - it('GetGroups_test_001', 0, function () { - var that = new process.Process() - var result = that.getGroups - var len = result.length - if(len > 0) { - var flag = true - } - expect(flag).assertEqual(true) - }) - - it('GetGroups_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++){ - var result = that.getGroups - if(result != null) { - var len = result.length - if(len > 0) { - var flag = true - } - expect(flag).assertEqual(true) - } - } - }) - - // process chdir test - it('chdir_test_001', 0, function () { - var that = new process.Process() - var result = that.chdir('/system') - var result1 = that.cwd() - expect(result1).assertEqual('/system') - }) - - it('chdir_test_002', 0, function () { - var that = new process.Process() - var result = that.chdir('/system/lib') - var result1 = that.cwd() - expect(result1).assertEqual('/system/lib') - }) - - it('chdir_test_003', 0, function () { - var that = new process.Process() - var result = that.chdir('/..') - var result1 = that.cwd() - expect(result1).assertEqual('/') - }) - - // process kill test - it('kill_test_001', 0, function () { - var that = new process.Process() - var result = that.kill(123, 3) - expect(result).assertEqual(false) - }) - - it('kill_test_002', 0, function () { - var that = new process.Process() - var pres = that.getPid - var result = that.kill(pres, 23) - expect(result).assertEqual(true) - }) - - it('kill_test_003', 0, function () { - var that = new process.Process() - var pres = that.getPid - var result = that.kill(pres, 28) - expect(result).assertEqual(true) - }) - - it('kill_test_004', 0, function () { - var that = new process.Process() - var pres = that.getPid - var result = that.kill(pres, 17) - expect(result).assertEqual(true) - }) - - // process uptime test - it('uptime_test_001', 0, function () { - var that = new process.Process() - var result1 = that.uptime() - function sleep(d){ - while(that.uptime() - result1 <= d); - } - sleep(5); - var result2 = that.uptime() - 6 - expect(result1).assertEqual(result2) - }) - - it('uptime_test_002', 0, function () { - var that = new process.Process() - var result1 = that.uptime() - function sleep(d){ - while(that.uptime() - result1 <= d); - } - sleep(8); - var result2 = that.uptime() - 9 - expect(result1).assertEqual(result2) - }) - - it('uptime_test_003', 0, function () { - var that = new process.Process() - var result1 = that.uptime() - function sleep(d){ - while(that.uptime() - result1 <= d); - } - sleep(10); - var result2 = that.uptime() - 11 - expect(result1).assertEqual(result2) - }) - - // process pid test - it('pid_test_001', 0, function () { - var that = new process.Process() - var result = that.getPid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - }) - - it('pid_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++) - { - var result = that.getPid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - } - }) - - // process ppid test - it('ppid_test_001', 0, function () { - var that = new process.Process() - var result = that.getPpid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - }) - - it('ppid_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++) - { - var result = that.getPpid - if(result > 0) { - var flag = true - } - expect(flag).assertEqual(true) - } - }) - - // process cwd test - it('cwd_test_001', 0, function () { - var that =new process.Process() - var cwd = that.cwd() - expect(cwd).assertEqual('/') - }) - - it('cwd_test_002', 0, function () { - var that = new process.Process() - for(var i = 0; i < 3; i++) - { - var cwd = that.cwd() - expect(cwd).assertEqual('/') - } - }) - - // process on test - it('on_test_001', 0, function () { - var that = new process.Process() - function add(){ - var value = 3 + 2 - } - var ontest = that.on(1, add) - expect(ontest).assertEqual(false) - }) - - it('on_test_002', 0, function () { - var that = new process.Process() - function add1(num){ - var value = num + 3 - } - var on = that.on("add123", add1) - }) - - it('on_test_003', 0, function () { - var that = new process.Process() - function add2(num0, num1){ - var value = num0 + num1 - } - var ontest = that.on(879, add2) - expect(ontest).assertEqual(false) - }) +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/lite' +import process from '@ohos.process' + +describe('ChildProcessTest', function () { + + // childprocess runCmd test + it('test_runCmd_001', 0, async function () { + var child = process.runCmd('echo abc') + child.wait() + var array = new Uint8Array([97, 98, 99, 10, 0]) + child.getOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + it('test_runCmd_002', 0, async function () { + var child = process.runCmd('echo abc;', { maxBuffer : 2 }) + child.wait() + var array = new Uint8Array([97, 98, 0]) + child.getOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + it('test_runCmd_003', 0, async function () { + var child = process.runCmd('sleep 5; echo abc;', { timeout : 1, killSignal : 9 }) + child.wait() + var array = new Uint8Array([0]) + child.getOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + expect(child.exitCode).assertEqual(9) + }) + + it('test_runCmd_004', 0, async function () { + var child = process.runCmd('sleep 2; echo abc;', { timeout : 9000, killSignal : 9 }) + child.wait() + var array = new Uint8Array([97, 98, 99, 10, 0]) + child.getOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + expect(child.exitCode).assertEqual(0) + }) + + // childprocess getOutput test + it('test_getOutput_001', 0, async function () { + var child = process.runCmd('echo bcd;') + child.wait() + var array = new Uint8Array([98, 99, 100, 0]) + child.getOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + // childprocess getErrorOutput test + it('test_getErrorOutput_001', 0, async function () { + var child = process.runCmd('makdir 1.txt') + child.wait() + var array = new Uint8Array([115, 104, 58, 32, 109, 97, 107, 100, 105, 114, 58, 32, 105, 110, 97, 99, 99, + 101, 115, 115, 105, 98, 108, 101, 32, 111, 114, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 10, 0]) + child.getErrorOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + it('test_getErrorOutput_002', 0, async function () { + var child = process.runCmd('echo "error" 1>&2') + child.wait() + var array = new Uint8Array([101, 114, 111, 114, 10, 0]) + child.getErrorOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + it('test_getErrorOutput_003', 0, async function () { + var child = process.runCmd('1') + child.wait() + var array = new Uint8Array([115, 104, 58, 32, 49, 58, 32, 105, 110, 97, 99, 99, 101, 115, 115, 105, 98, + 108, 101, 32, 111, 114, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 10, 0]) + child.getErrorOutput().then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + // childprocess wait test + it('test_wait_001', 0, async function () { + var child = process.runCmd('ls') + var status = child.wait() + status.then(val=>{ + expect(val).assertEqual(0) + }) + }) + + it('test_wait_002', 0, async function () { + var child = process.runCmd('ls; sleep 5;') + child.kill(9); + var status = child.wait() + status.then(val=>{ + expect(val).assertEqual(9) + }) + }) + + // childprocess pid test + it('test_pid_001', 0, function () { + var child = process.runCmd('ls; sleep 5;') + child.wait() + var pid_ = child.pid + expect(pid_ > 0).assertEqual(true) + }) + + // childprocess ppid test + it('test_ppid_001', 0, function () { + var child = process.runCmd('ls; sleep 5;') + var status = child.wait() + var ppid_ = child.ppid + expect(ppid_ > 0).assertEqual(true) + }) + + // childprocess kill test + it('test_kill_001', 0, function () { + var child = process.runCmd('ls; sleep 5s;') + var result = child.kill(13) + var temp = child.killed + expect(temp).assertEqual(true) + }) + + it('test_kill_002', 0, function () { + var child = process.runCmd('ls; sleep 5s;') + var result = child.kill(1) + var temp = child.killed + expect(temp).assertEqual(true) + }) + + it('test_kill_003', 0, function () { + var child = process.runCmd('ls; sleep 5s;') + var result = child.kill('SIGHUP') + var temp = child.killed + expect(temp).assertEqual(true) + }) + + it('test_kill_004', 0, function () { + var child = process.runCmd('ls; sleep 5s;') + var result = child.kill('ABC') + var temp = child.killed + expect(temp).assertEqual(true) + }) + + it('test_kill_005', 0, function () { + var child = process.runCmd('ls') + child.wait() + var result = child.kill(9) + var temp = child.killed + expect(temp).assertEqual(false) + }) + + // childprocess close test + it('test_close_001', 0, function () { + var child = process.runCmd('ls; sleep 5s;') + var result = child.close() + expect(child.exitCode).assertEqual(9) + }) + + it('test_close_002', 0, function () { + var child = process.runCmd('ls') + function sleep(ms, callback) { + setTimeout(callback, ms) + } + sleep(1000, () => {} ) + var result = child.close() + expect(child.exitCode===0).assertEqual(false) + }) + + it('test_close_003', 0, function () { + var child = process.runCmd('ls;') + var status = child.wait() + var result = child.close() + expect(child.exitCode).assertEqual(0) + }) + + // childprocess killed test + it('test_killed_001', 0, function () { + var child = process.runCmd('ls; sleep 5s;') + var result = child.kill(3) + var temp = child.killed + expect(temp).assertEqual(true) + }) + + // childprocess exitCode test + it('test_exitCode_001', 0, function () { + var child = process.runCmd('ls; sleep 5s;') + var temp = child.kill(9) + child.wait() + var result = child.exitCode + expect(result).assertEqual(9) + }) + + // process GetUid test + it('GetUid_test_001', 0, function () { + var result = process.getUid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + }) + + it('GetUid_test_002', 0, function () { + for(var i = 0; i < 3; i++){ + var result = process.getUid + if(result != null) { + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + } + } + }) + + // process GetGid test + it('GetGid_test_001', 0, function () { + var result = process.getGid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + }) + + it('GetGid_test_002', 0, function () { + for(var i = 0; i < 3; i++){ + var result = process.getGid + if(result != null) { + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + } + } + }) + + // process GetEuid test + it('GetEuid_test_001', 0, function () { + var result = process.getEuid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + }) + + it('GetEuid_test_002', 0, function () { + for(var i = 0; i < 3; i++){ + var result = process.getEuid + if(result != null) { + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + } + } + }) + + // process GetEgid test + it('GetEgid_test_001', 0, function () { + var result = process.getEgid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + }) + + it('GetEgid_test_002', 0, function () { + for(var i = 0; i < 3; i++){ + var result = process.getEgid + if(result != null) { + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + } + } + }) + + // process GetGroups test + it('GetGroups_test_001', 0, function () { + var result = process.getGroups + var len = result.length + if(len > 0) { + var flag = true + } + expect(flag).assertEqual(true) + }) + + it('GetGroups_test_002', 0, function () { + for(var i = 0; i < 3; i++){ + var result = process.getGroups + if(result != null) { + var len = result.length + if(len > 0) { + var flag = true + } + expect(flag).assertEqual(true) + } + } + }) + + // process chdir test + it('chdir_test_001', 0, function () { + var result = process.chdir('/system') + var result1 = process.cwd() + expect(result1).assertEqual('/system') + }) + + it('chdir_test_002', 0, function () { + var result = process.chdir('/system/lib') + var result1 = process.cwd() + expect(result1).assertEqual('/system/lib') + }) + + it('chdir_test_003', 0, function () { + var result = process.chdir('/..') + var result1 = process.cwd() + expect(result1).assertEqual('/') + }) + + // process kill test + it('kill_test_001', 0, function () { + var result = process.kill(123, 3) + expect(result).assertEqual(false) + }) + + it('kill_test_002', 0, function () { + var pres = process.getPid + var result = process.kill(pres, 23) + expect(result).assertEqual(true) + }) + + it('kill_test_003', 0, function () { + var pres = process.getPid + var result = process.kill(pres, 28) + expect(result).assertEqual(true) + }) + + it('kill_test_004', 0, function () { + var pres = process.getPid + var result = process.kill(pres, 17) + expect(result).assertEqual(true) + }) + + // process uptime test + it('uptime_test_001', 0, function () { + var result1 = process.uptime() + function sleep(d){ + while(process.uptime() - result1 <= d); + } + sleep(5); + var result2 = process.uptime() - 6 + expect(result1).assertEqual(result2) + }) + + it('uptime_test_002', 0, function () { + var result1 = process.uptime() + function sleep(d){ + while(process.uptime() - result1 <= d); + } + sleep(8); + var result2 = process.uptime() - 9 + expect(result1).assertEqual(result2) + }) + + it('uptime_test_003', 0, function () { + var result1 = process.uptime() + function sleep(d){ + while(process.uptime() - result1 <= d); + } + sleep(10); + var result2 = process.uptime() - 11 + expect(result1).assertEqual(result2) + }) + + // process pid test + it('pid_test_001', 0, function () { + var result = process.getPid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + }) + + it('pid_test_002', 0, function () { + for(var i = 0; i < 3; i++) + { + var result = process.getPid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + } + }) + + // process ppid test + it('ppid_test_001', 0, function () { + var result = process.getPpid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + }) + + it('ppid_test_002', 0, function () { + for(var i = 0; i < 3; i++) + { + var result = process.getPpid + if(result > 0) { + var flag = true + } + expect(flag).assertEqual(true) + } + }) + + // process cwd test + it('cwd_test_001', 0, function () { + var cwd = process.cwd() + expect(cwd).assertEqual('/') + }) + + it('cwd_test_002', 0, function () { + for(var i = 0; i < 3; i++) + { + var cwd = process.cwd() + expect(cwd).assertEqual('/') + } + }) + + // process on test + it('on_test_001', 0, function () { + function add(){ + var value = 3 + 2 + } + var ontest = process.on(1, add) + expect(ontest).assertEqual(false) + }) + + it('on_test_002', 0, function () { + function add1(num){ + var value = num + 3 + } + var on = process.on("add123", add1) + }) + + it('on_test_003', 0, function () { + function add2(num0, num1){ + var value = num0 + num1 + } + var ontest = process.on(879, add2) + expect(ontest).assertEqual(false) + }) }) \ No newline at end of file diff --git a/compileruntime/process_lib_standard/project/entry/src/main/resources/base/element/string.json b/compileruntime/process_lib_standard/src/main/resources/base/element/string.json similarity index 94% rename from compileruntime/process_lib_standard/project/entry/src/main/resources/base/element/string.json rename to compileruntime/process_lib_standard/src/main/resources/base/element/string.json index c0dd3a09e..0bae6bd40 100644 --- a/compileruntime/process_lib_standard/project/entry/src/main/resources/base/element/string.json +++ b/compileruntime/process_lib_standard/src/main/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] } \ No newline at end of file diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/app.js b/compileruntime/process_lib_standard/src/ohosTest/js/default/app.js similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/app.js rename to compileruntime/process_lib_standard/src/ohosTest/js/default/app.js diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json b/compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/en-US.json similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json rename to compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/en-US.json diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json b/compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json rename to compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css b/compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.css similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css rename to compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.css diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml b/compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.hml similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml rename to compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.hml diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js b/compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.js similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js rename to compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.js diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js b/compileruntime/process_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js similarity index 100% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js rename to compileruntime/process_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/List.test.js b/compileruntime/process_lib_standard/src/ohosTest/js/test/List.test.js similarity index 92% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/List.test.js rename to compileruntime/process_lib_standard/src/ohosTest/js/test/List.test.js index d21d41758..86ae9fa26 100644 --- a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/List.test.js +++ b/compileruntime/process_lib_standard/src/ohosTest/js/test/List.test.js @@ -1,16 +1,16 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + require('./ExampleJsunit.test.js') \ No newline at end of file diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json b/compileruntime/process_lib_standard/src/ohosTest/resources/base/element/string.json similarity index 93% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json rename to compileruntime/process_lib_standard/src/ohosTest/resources/base/element/string.json index e6620b59d..757cc9dc2 100644 --- a/compileruntime/process_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json +++ b/compileruntime/process_lib_standard/src/ohosTest/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "app_name", - "value": "childprocess" - }, - { - "name": "mainability_description", - "value": "hap sample empty page" - } - ] +{ + "string": [ + { + "name": "app_name", + "value": "childprocess" + }, + { + "name": "mainability_description", + "value": "hap sample empty page" + } + ] } \ No newline at end of file diff --git a/compileruntime/url_lib_standard/BUILD.gn b/compileruntime/url_lib_standard/BUILD.gn index a5f48ae0f..967123cbc 100644 --- a/compileruntime/url_lib_standard/BUILD.gn +++ b/compileruntime/url_lib_standard/BUILD.gn @@ -10,9 +10,29 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import("//test/xts/tools/build/suite.gni") +ohos_js_hap_suite("url_js_test") { + hap_profile = "./src/main/config.json" + deps = [ + ":url_js_assets", + ":url_resources", + ] + + # shared_libraries = [ + # "//third_party/giflib:libgif", + # "//third_party/libpng:libpng", + # ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "UrlJsTest" -ohos_js_hap_suite("startup_url_js_test") { - test_hap_name = "StartupUrlJSApiTest" - hap_source_path = "hap/entry-debug-rich-unsigned.hap" + # part_name = "prebuilt_hap" + # subsystem_name = "xts" +} +ohos_js_assets("url_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("url_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" } diff --git a/compileruntime/url_lib_standard/Test.json b/compileruntime/url_lib_standard/Test.json index a5d217e9f..724697276 100644 --- a/compileruntime/url_lib_standard/Test.json +++ b/compileruntime/url_lib_standard/Test.json @@ -9,7 +9,7 @@ "kits": [ { "test-file-name": [ - "startup_url_js_test.hap" + "UrlJsTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/compileruntime/url_lib_standard/project/entry/package.json b/compileruntime/url_lib_standard/project/entry/package.json deleted file mode 100644 index 69a88e3b6..000000000 --- a/compileruntime/url_lib_standard/project/entry/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/compileruntime/url_lib_standard/signature/openharmony_sx.p7b b/compileruntime/url_lib_standard/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 GIT binary patch literal 3437 zcmcgvX>b$g8M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#P#Pf#*luqI_wR;fISDCJhAqSG6R%xItn%~QtZ@m%&u zjGGLX;t6Ls62eQvNmf@v+}J%54^CygxRZ`?8X#r|wkev7(s;Ou4T#y1XNNf)h;o7z z8a^Lfq<1uH`E{G9E z*(=)Css_LSk=>E9jr)s5^2-!+MN=Ds}>1hRma4`uCIz9%p3O77839E{xf z4c_I?**|1`K2tg4!Hvyrou4BsJQuv*UfF)<%CelYIS>D^o?X)3+MK%la6kooW8&G@BU)Y0hT`+mOm$Z_%rB=a%o>I z!2c6lHyKQN)VjiFwa!eE^p8jc$sy$vB+8i25lI~6KPFFh$!o$avA~rj#L6xvR|Z83 z*WD6T9e+5Pyy=F+)pNTf{ny3cy>7Rkd3o*TS?TZJ`NS^NF2%HMkyS{?uJ$`!P4_L^ z1`NFDUbNyg_qREifgktnp1_v{Jbb`7m}2PTyUdOmtJj~m z9bB=ecw4_^rw1IW=of+>nrW5=d3k`3qHCxsIN_F{T1A545};;+fsyC&qChi+YV zr~M63H8ZLCPYmsjY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/compileruntime/url_lib_standard/project/entry/src/main/config.json b/compileruntime/url_lib_standard/src/main/config.json similarity index 95% rename from compileruntime/url_lib_standard/project/entry/src/main/config.json rename to compileruntime/url_lib_standard/src/main/config.json index 31cf457ed..eded041ca 100644 --- a/compileruntime/url_lib_standard/project/entry/src/main/config.json +++ b/compileruntime/url_lib_standard/src/main/config.json @@ -1,57 +1,57 @@ -{ - "app": { - "bundleName": "com.example.url", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.url", - "name": ".MyApplication", - "mainAbility": "com.example.url.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.url.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } +{ + "app": { + "bundleName": "com.example.url", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.url", + "name": ".MyApplication", + "mainAbility": "com.example.url.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.example.url.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": true + } + } + ] + } } \ No newline at end of file diff --git a/compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java b/compileruntime/url_lib_standard/src/main/java/com/example/url/MainAbility.java similarity index 96% rename from compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java rename to compileruntime/url_lib_standard/src/main/java/com/example/url/MainAbility.java index ab25e441f..1029c0119 100644 --- a/compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java +++ b/compileruntime/url_lib_standard/src/main/java/com/example/url/MainAbility.java @@ -1,30 +1,30 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.example.url; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class MainAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.url; + +import ohos.ace.ability.AceAbility; +import ohos.aafwk.content.Intent; + +public class MainAbility extends AceAbility { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + } + + @Override + public void onStop() { + super.onStop(); + } +} diff --git a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java b/compileruntime/url_lib_standard/src/main/java/com/example/url/MyApplication.java similarity index 97% rename from compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java rename to compileruntime/url_lib_standard/src/main/java/com/example/url/MyApplication.java index 8b5743ec6..d0bd8e832 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java +++ b/compileruntime/url_lib_standard/src/main/java/com/example/url/MyApplication.java @@ -1,24 +1,24 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.example.url; - -import ohos.aafwk.ability.AbilityPackage; - -public class MyApplication extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.url; + +import ohos.aafwk.ability.AbilityPackage; + +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/app.js b/compileruntime/url_lib_standard/src/main/js/default/app.js similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/app.js rename to compileruntime/url_lib_standard/src/main/js/default/app.js diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png b/compileruntime/url_lib_standard/src/main/js/default/common/images/Wallpaper.png similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png rename to compileruntime/url_lib_standard/src/main/js/default/common/images/Wallpaper.png diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg b/compileruntime/url_lib_standard/src/main/js/default/common/images/bg-tv.jpg similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg rename to compileruntime/url_lib_standard/src/main/js/default/common/images/bg-tv.jpg diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/en-US.json b/compileruntime/url_lib_standard/src/main/js/default/i18n/en-US.json similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/en-US.json rename to compileruntime/url_lib_standard/src/main/js/default/i18n/en-US.json diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json b/compileruntime/url_lib_standard/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json rename to compileruntime/url_lib_standard/src/main/js/default/i18n/zh-CN.json diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.css b/compileruntime/url_lib_standard/src/main/js/default/pages/index/index.css similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.css rename to compileruntime/url_lib_standard/src/main/js/default/pages/index/index.css diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.hml b/compileruntime/url_lib_standard/src/main/js/default/pages/index/index.hml similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.hml rename to compileruntime/url_lib_standard/src/main/js/default/pages/index/index.hml diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.js b/compileruntime/url_lib_standard/src/main/js/default/pages/index/index.js similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.js rename to compileruntime/url_lib_standard/src/main/js/default/pages/index/index.js diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js b/compileruntime/url_lib_standard/src/main/js/test/ExampleJsunit.test.js similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js rename to compileruntime/url_lib_standard/src/main/js/test/ExampleJsunit.test.js diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/test/List.test.js b/compileruntime/url_lib_standard/src/main/js/test/List.test.js similarity index 97% rename from compileruntime/url_lib_standard/project/entry/src/main/js/test/List.test.js rename to compileruntime/url_lib_standard/src/main/js/test/List.test.js index dca817748..8a9a35ff2 100644 --- a/compileruntime/url_lib_standard/project/entry/src/main/js/test/List.test.js +++ b/compileruntime/url_lib_standard/src/main/js/test/List.test.js @@ -1,16 +1,16 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -require('./url.test.js') -require('./ExampleJsunit.test.js') +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +require('./url.test.js') +require('./ExampleJsunit.test.js') diff --git a/compileruntime/url_lib_standard/project/entry/src/main/js/test/url.test.js b/compileruntime/url_lib_standard/src/main/js/test/url.test.js similarity index 97% rename from compileruntime/url_lib_standard/project/entry/src/main/js/test/url.test.js rename to compileruntime/url_lib_standard/src/main/js/test/url.test.js index df00cd8ab..19e410b32 100644 --- a/compileruntime/url_lib_standard/project/entry/src/main/js/test/url.test.js +++ b/compileruntime/url_lib_standard/src/main/js/test/url.test.js @@ -1,564 +1,564 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License') - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/lite' -import Url from '@ohos.url' - -describe('Url_mxa_jk_Test', function () { - it('Url_append_test_001', 0, function () { - var that = new Url.URL('http://username:password@host:8080/directory/file?foo=1&bar=2') - var params = new Url.URLSearchParams(that.search) - params.append('ma', 'jk') - var result = params.toString() - expect(result).assertEqual('foo=1&bar=2&ma=jk') - }) - it('Url_append_test_002', 0, function () { - let that = new Url.URL('https://example.com?foo=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.append('ma 大', 'jk¥') - var result = params.toString() - expect(result).assertEqual('foo=1&bar=2&ma+%E5%A4%A7=jk%EF%BF%A5') - }) - it('Url_append_test_003', 0, function () { - let that = new Url.URL('https://example.com?foo=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.append('foo~!@#$%^&*()_+-=', 'jk') - var result = params.toString() - expect(result).assertEqual('foo=1&bar=2&foo%7E%21%40%23%24%25%5E%26*%28%29_%2B-%3D=jk') - }) - it('Url_delete_test_001', 0, function () { - let that = new Url.URL('https://example.com?foo=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.delete('foo') - var result = params.toString() - expect(result).assertEqual('bar=2') - }) - it('Url_delete_test_002', 0, function () { - let that = new Url.URL('https://example.com?foo大=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.delete('foo') - var result = params.toString() - expect(result).assertEqual('foo%E5%A4%A7=1&bar=2') - }) - it('Url_delete_test_003', 0, function () { - let that = new Url.URL('https://example.com?foo大=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.delete('foo大') - var result = params.toString() - expect(result).assertEqual('bar=2') - }) - - it('Url_entries_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var i = 0; - var arr = {}; - for(var pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[1]).assertEqual('value1') - }) - it('Url_entries_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var i = 0; - var arr = {}; - for(var pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[2]).assertEqual('key2') - }) - it('Url_entries_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('foo', 'jk') - var i = 0; - var arr = {}; - for(var pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[5]).assertEqual('jk') - }) - - it('Url_forEach_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var arr = {}; - var i = 0; - function func(str1, str2, params) { - arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params - i++; - } - params.forEach(func) - expect(arr[0]).assertEqual('key=key1 value=value1 flag=key1=value1&key2=value2') - }) - it('Url_forEach_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var arr = {}; - var i = 0; - function func(str1, str2, params) { - arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params - i++; - } - params.forEach(func) - expect(arr[1]).assertEqual('key=key2 value=value2 flag=key1=value1&key2=value2') - }) - it('Url_forEach_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('foo', 'jk') - var arr = {}; - var i = 0; - function func(str1, str2, params) { - arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params - i++; - } - params.forEach(func) - expect(arr[2]).assertEqual('key=foo value=jk flag=key1=value1&key2=value2&foo=jk') - }) - it('Url_get_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var result = params.get('1') - expect(result).assertEqual(undefined) - }) - it('Url_get_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var result = params.get('key2') - expect(result).assertEqual('value2') - }) - it('Url_get_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('5', 'JKL') - var result = params.get('5') - expect(result).assertEqual('JKL') - }) - it('Url_getAll_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('key1', 'AAA') - var result = params.getAll('key1') - expect(result).assertEqual('value1,AAA') - }) - it('Url_getAll_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&8=DEF') - params.append('8', 'A8A') - var result = params.getAll('8') - expect(result).assertEqual('DEF,A8A') - }) - it('Url_getAll_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') - params.append('key3', 'A3A') - var result = params.getAll('key3') - expect(result).assertEqual('大,A3A') - }) - it('Url_has_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') - var result = params.has('2') - expect(result).assertEqual(false) - }) - it('Url_has_test_002', 0, function () { - let params = new Url.URLSearchParams('小=value1&key2=value2&key3=大') - var result = params.has('小') - expect(result).assertEqual(true) - }) - it('Url_has_test_003', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - params.append('¥', 'ACA') - var result = params.has('¥') - expect(result).assertEqual(true) - }) - it('Url_keys_test_001', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - var arr = {}; - var i = 0; - for (var key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[0]).assertEqual('小') - }) - it('Url_keys_test_002', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - var arr = {}; - var i = 0; - for (var key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[1]).assertEqual('¥') - }) - it('Url_keys_test_003', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - var arr = {}; - var i = 0; - for (var key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[2]).assertEqual('key3') - }) - it('Url_set_test_001', 0, function () { - let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') - params.set('11', 'CCC') - var res = params.toString() - expect(res).assertEqual('1=value1&2=value2&key3=3&11=CCC') - }) - it('Url_set_test_002', 0, function () { - let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') - params.set('10', 'BBB') - var res = params.toString() - expect(res).assertEqual('1=value1&2=value2&key3=3&10=BBB') - }) - it('Url_set_test_003', 0, function () { - let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') - params.set('ma 大', '10¥') - var res = params.toString() - expect(res).assertEqual('1=value1&2=value2&key3=3&ma+%E5%A4%A7=10%EF%BF%A5') - }) - it('Url_sort_test_001', 0, function () { - let params = new Url.URLSearchParams('1=value1&3=value3&2=key2') - params.sort() - var res = params.toString() - expect(res).assertEqual('1=value1&2=key2&3=value3') - }) - it('Url_sort_test_002', 0, function () { - let params = new Url.URLSearchParams('a=value1&c=value2&b=key2') - params.sort() - var res = params.toString() - expect(res).assertEqual('a=value1&b=key2&c=value2') - }) - it('Url_sort_test_003', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=33') - params.append('a', 'ACA') - params.sort() - var res = params.toString() - expect(res).assertEqual('a=ACA&b=33&c=value2&d=value1') - }) - it('Url_Values_test_001', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - var arr = {}; - var i = 0; - for (var value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[0]).assertEqual('value1') - }) - it('Url_Values_test_002', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - var arr = {}; - var i = 0; - for (var value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[1]).assertEqual('value2') - }) - it('Url_Values_test_003', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - params.append('a', 'ACA') - var arr = {}; - var i = 0; - for (var value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[3]).assertEqual('ACA') - }) - it('Url_toString_test_001', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - var result = params.toString() - expect(result).assertEqual('d=value1&c=value2&b=%E5%A4%A7') - }) - it('Url_toString_test_002', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b= 大') - params.append('1 12', 'QQQ') - var result = params.toString() - expect(result).assertEqual('d=value1&c=value2&b=+%E5%A4%A7&1+12=QQQ') - }) - it('Url_toString_test_003', 0, function () { - let params = new Url.URLSearchParams('¥=)') - params.delete('5') - var result = params.toString() - expect(result).assertEqual('%EF%BF%A5=%29') - }) - //new url SearchParams - it('Url_construction_test_001', 0, function () { - let params = new Url.URLSearchParams('?user=abc&query=xyz') - var result = params.toString() - expect(result).assertEqual('user=abc&query=xyz') - }) - it('Url_construction_test_002', 0, function () { - let params = new Url.URLSearchParams({ - user: 'abc', - query: ['first', 'second'] - }) - var result = params.toString() - expect(result).assertEqual('user=abc&query=first%2Csecond') - }) - it('Url_construction_test_003', 0, function () { - let params = new Url.URLSearchParams([ - ['user', 'abc'], - ['query', 'first'], - ['query', 'second'], - ]) - var result = params.toString() - expect(result).assertEqual('user=abc&query=first&query=second') - }) - it('Url_construction_test_004', 0, function () { - const map = new Map() - map.set('user', 'abc') - map.set('query', 'xyz') - let params = new Url.URLSearchParams(map) - var result = params.toString() - expect(result).assertEqual('user=abc&query=xyz') - }) - it('Url_construction_test_004', 0, function () { - function* getQueryPairs() { - yield ['user', 'abc'] - yield ['query', 'first'] - yield ['query', 'second'] - } - let params = new Url.URLSearchParams(getQueryPairs()) - var result = params.toString() - expect(result).assertEqual('user=abc&query=first&query=second') - }) - //new url - get - it('Url_to_string_test_001', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.to_string() - expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') - }) - - it('Url_href_test_002', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.href - expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') - }) - it('Url_origin_test_003', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.origin - expect(result).assertEqual('http://host:8080') - }) - it('Url_protocol_test_004', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.protocol - expect(result).assertEqual('http:') - }) - it('Url_username_test_005', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.username - expect(result).assertEqual('username') - }) - it('Url_password_test_006', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.password - expect(result).assertEqual('password') - }) - it('Url_host_test_007', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.host - expect(result).assertEqual('host:8080') - }) - it('Url_hostname_test_008', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.hostname - expect(result).assertEqual('host') - }) - it('Url_port_test_009', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.port - expect(result).assertEqual('8080') - }) - it('Url_pathname_test_010', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result = params.pathname - expect(result).assertEqual('/directory/file') - }) - it('Url_search_test_011', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') - var result = params.search - expect(result).assertEqual('?query=qqqq') - }) - it('Url_search_test_012', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') - var result = params.search - expect(result).assertEqual('?query=pppppp') - }) - it('Url_hash_test_013', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') - var result = params.hash - expect(result).assertEqual('#fragment') - }) - //new url - set - it('Url_href_test_001', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.href = 'http://[::192.9.5.5]/ipng' - var result = params.href - expect(result).assertEqual('http://[::c009:505]/ipng') - }) - it('Url_protocol_test_002', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.protocol = 'https:' - var result = params.href - expect(result).assertEqual('https://username:password@host:8080/directory/file?query#fragment') - }) - it('Url_username_test_003', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.username = 'username1' - var result = params.href - expect(result).assertEqual('http://username1:password@host:8080/directory/file?query#fragment') - }) - it('Url_password_test_004', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.password = 'passwd' - var result = params.href - expect(result).assertEqual('http://username:passwd@host:8080/directory/file?query#fragment') - }) - - it('Url_host_test_005', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.host = 'www.baidu.com:99' - var result = params.href - expect(result).assertEqual('http://username:password@www.baidu.com:99/directory/file?query#fragment') - }) - - it('Url_hostname_test_006', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.hostname = 'www.baidu.com' - var result = params.href - expect(result).assertEqual('http://username:password@www.baidu.com:8080/directory/file?query#fragment') - }) - it('Url_port_test_007', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.port = '99' - var result = params.href - expect(result).assertEqual('http://username:password@host:99/directory/file?query#fragment') - }) - it('Url_pathname_test_008', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.pathname = '/path/ddd' - var result = params.href - expect(result).assertEqual('http://username:password@host:8080/path/ddd?query#fragment') - }) - it('Url_search_test_009', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') - params.search = '?pppppp=1234' - var result = params.href - expect(result).assertEqual('http://username:password@host:8080/directory/file?pppppp=1234#fragment') - }) - it('Url_hash_test_010', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') - params.hash = '#qwer=da' - var result = params.href - expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') - }) - //new url JSON - it('Url_toJSON_test_001', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') - var result = params.toJSON() - expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') - }) - //new url IPV6 - it('Url_IPV6_test_001', 0, function () { - let params = new Url.URL('http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html') - var result = params.href - expect(result).assertEqual('http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/index.html') - }) - it('Url_IPV6_test_002', 0, function () { - let params = new Url.URL('http://[1080:0:0:0:8:800:200C:417A]/index.html') - var result = params.href - expect(result).assertEqual('http://[1080::8:800:200c:417a]/index.html') - }) - it('Url_IPV6_test_003', 0, function () { - let params = new Url.URL('http://[::FFFF:129.144.52.38]:80/index.html') - var result = params.href - expect(result).assertEqual('http://[::ffff:8190:3426]/index.html') - }) - //new url IPV4 - it('Url_IPV4_test_001', 0, function () { - let params = new Url.URL('http://0377.0xff.255.1:80/index.html') - var result = params.href - expect(result).assertEqual('http://255.255.255.1/index.html') - }) - it('Url_IPV4_test_002', 0, function () { - let params = new Url.URL('http://0377.0xff.255.g/index.html') - var result = params.href - expect(result).assertEqual('http://0377.0xff.255.g/index.html') - }) - it('Url_IPV4_test_003', 0, function () { - let params = new Url.URL('http://190.254.245.9:80/index.html') - var result = params.href - expect(result).assertEqual('http://190.254.245.9/index.html') - }) - //new url url_base - it('Url_base_test_001', 0, function () { - let params = new Url.URL('https://developer.mozilla.org',) - var result = params.href - expect(result).assertEqual('https://developer.mozilla.org/') - }) - it('Url_base_test_002', 0, function () { - let params = new Url.URL('https://developer.mozilla.org', 'flie:/developer.mozilla.org') - var result = params.href - expect(result).assertEqual('https://developer.mozilla.org/') - }) - it('Url_base_test_003', 0, function () { - let params = new Url.URL('https://developer.mozilla.org', 'ftp://www.example.com') - var result = params.href - expect(result).assertEqual('https://developer.mozilla.org/') - }) - it('Url_base_test_004', 0, function () { - let params = new Url.URL(' ', 'http://www.example.com') - var result = params.href - expect(result).assertEqual('http://www.example.com/') - }) - it('Url_base_test_005', 0, function () { - let params = new Url.URL('.', 'http://www.example.com') - var result = params.href - expect(result).assertEqual('http://www.example.com/') - }) - it('Url_base_test_006', 0, function () { - let params = new Url.URL('../h:', 'http://www.example.com') - var result = params.href - expect(result).assertEqual('http://www.example.com/h:') - }) - it('Url_base_test_007', 0, function () { - let params = new Url.URL('/sca/./path/path/../scasa/jjjjj', 'http://www.example.com') - var result = params.href - expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_008', 0, function () { - let params = new Url.URL('sca/./path/path/../scasa/jjjjj', 'http://www.example.com') - var result = params.href - expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_009', 0, function () { - let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'http://www.example.com') - var result = params.href - expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_010', 0, function () { - let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'file://www.example.com') - var result = params.href - expect(result).assertEqual('file://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_011', 0, function () { - let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'file1://www.example.com') - var result = params.href - expect(result).assertEqual('file1://www.example.com/sca/path/scasa/jjjjj') - }) +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/lite' +import Url from '@ohos.url' + +describe('Url_mxa_jk_Test', function () { + it('Url_append_test_001', 0, function () { + var that = new Url.URL('http://username:password@host:8080/directory/file?foo=1&bar=2') + var params = new Url.URLSearchParams(that.search) + params.append('ma', 'jk') + var result = params.toString() + expect(result).assertEqual('foo=1&bar=2&ma=jk') + }) + it('Url_append_test_002', 0, function () { + let that = new Url.URL('https://example.com?foo=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.append('ma 大', 'jk¥') + var result = params.toString() + expect(result).assertEqual('foo=1&bar=2&ma+%E5%A4%A7=jk%EF%BF%A5') + }) + it('Url_append_test_003', 0, function () { + let that = new Url.URL('https://example.com?foo=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.append('foo~!@#$%^&*()_+-=', 'jk') + var result = params.toString() + expect(result).assertEqual('foo=1&bar=2&foo%7E%21%40%23%24%25%5E%26*%28%29_%2B-%3D=jk') + }) + it('Url_delete_test_001', 0, function () { + let that = new Url.URL('https://example.com?foo=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.delete('foo') + var result = params.toString() + expect(result).assertEqual('bar=2') + }) + it('Url_delete_test_002', 0, function () { + let that = new Url.URL('https://example.com?foo大=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.delete('foo') + var result = params.toString() + expect(result).assertEqual('foo%E5%A4%A7=1&bar=2') + }) + it('Url_delete_test_003', 0, function () { + let that = new Url.URL('https://example.com?foo大=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.delete('foo大') + var result = params.toString() + expect(result).assertEqual('bar=2') + }) + + it('Url_entries_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var i = 0; + var arr = {}; + for(var pair of params.entries()) { + arr[i] = pair[0]; + i++; + arr[i] = pair[1]; + i++; + } + expect(arr[1]).assertEqual('value1') + }) + it('Url_entries_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var i = 0; + var arr = {}; + for(var pair of params.entries()) { + arr[i] = pair[0]; + i++; + arr[i] = pair[1]; + i++; + } + expect(arr[2]).assertEqual('key2') + }) + it('Url_entries_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('foo', 'jk') + var i = 0; + var arr = {}; + for(var pair of params.entries()) { + arr[i] = pair[0]; + i++; + arr[i] = pair[1]; + i++; + } + expect(arr[5]).assertEqual('jk') + }) + + it('Url_forEach_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var arr = {}; + var i = 0; + function func(str1, str2, params) { + arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params + i++; + } + params.forEach(func) + expect(arr[0]).assertEqual('key=key1 value=value1 flag=key1=value1&key2=value2') + }) + it('Url_forEach_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var arr = {}; + var i = 0; + function func(str1, str2, params) { + arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params + i++; + } + params.forEach(func) + expect(arr[1]).assertEqual('key=key2 value=value2 flag=key1=value1&key2=value2') + }) + it('Url_forEach_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('foo', 'jk') + var arr = {}; + var i = 0; + function func(str1, str2, params) { + arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params + i++; + } + params.forEach(func) + expect(arr[2]).assertEqual('key=foo value=jk flag=key1=value1&key2=value2&foo=jk') + }) + it('Url_get_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var result = params.get('1') + expect(result).assertEqual(undefined) + }) + it('Url_get_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var result = params.get('key2') + expect(result).assertEqual('value2') + }) + it('Url_get_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('5', 'JKL') + var result = params.get('5') + expect(result).assertEqual('JKL') + }) + it('Url_getAll_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('key1', 'AAA') + var result = params.getAll('key1') + expect(result).assertEqual('value1,AAA') + }) + it('Url_getAll_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&8=DEF') + params.append('8', 'A8A') + var result = params.getAll('8') + expect(result).assertEqual('DEF,A8A') + }) + it('Url_getAll_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') + params.append('key3', 'A3A') + var result = params.getAll('key3') + expect(result).assertEqual('大,A3A') + }) + it('Url_has_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') + var result = params.has('2') + expect(result).assertEqual(false) + }) + it('Url_has_test_002', 0, function () { + let params = new Url.URLSearchParams('小=value1&key2=value2&key3=大') + var result = params.has('小') + expect(result).assertEqual(true) + }) + it('Url_has_test_003', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + params.append('¥', 'ACA') + var result = params.has('¥') + expect(result).assertEqual(true) + }) + it('Url_keys_test_001', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + var arr = {}; + var i = 0; + for (var key of params.keys()) { + arr[i] = key; + i++; + } + expect(arr[0]).assertEqual('小') + }) + it('Url_keys_test_002', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + var arr = {}; + var i = 0; + for (var key of params.keys()) { + arr[i] = key; + i++; + } + expect(arr[1]).assertEqual('¥') + }) + it('Url_keys_test_003', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + var arr = {}; + var i = 0; + for (var key of params.keys()) { + arr[i] = key; + i++; + } + expect(arr[2]).assertEqual('key3') + }) + it('Url_set_test_001', 0, function () { + let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') + params.set('11', 'CCC') + var res = params.toString() + expect(res).assertEqual('1=value1&2=value2&key3=3&11=CCC') + }) + it('Url_set_test_002', 0, function () { + let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') + params.set('10', 'BBB') + var res = params.toString() + expect(res).assertEqual('1=value1&2=value2&key3=3&10=BBB') + }) + it('Url_set_test_003', 0, function () { + let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') + params.set('ma 大', '10¥') + var res = params.toString() + expect(res).assertEqual('1=value1&2=value2&key3=3&ma+%E5%A4%A7=10%EF%BF%A5') + }) + it('Url_sort_test_001', 0, function () { + let params = new Url.URLSearchParams('1=value1&3=value3&2=key2') + params.sort() + var res = params.toString() + expect(res).assertEqual('1=value1&2=key2&3=value3') + }) + it('Url_sort_test_002', 0, function () { + let params = new Url.URLSearchParams('a=value1&c=value2&b=key2') + params.sort() + var res = params.toString() + expect(res).assertEqual('a=value1&b=key2&c=value2') + }) + it('Url_sort_test_003', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=33') + params.append('a', 'ACA') + params.sort() + var res = params.toString() + expect(res).assertEqual('a=ACA&b=33&c=value2&d=value1') + }) + it('Url_Values_test_001', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + var arr = {}; + var i = 0; + for (var value of params.values()) { + arr[i] = value; + i++; + } + expect(arr[0]).assertEqual('value1') + }) + it('Url_Values_test_002', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + var arr = {}; + var i = 0; + for (var value of params.values()) { + arr[i] = value; + i++; + } + expect(arr[1]).assertEqual('value2') + }) + it('Url_Values_test_003', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + params.append('a', 'ACA') + var arr = {}; + var i = 0; + for (var value of params.values()) { + arr[i] = value; + i++; + } + expect(arr[3]).assertEqual('ACA') + }) + it('Url_toString_test_001', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + var result = params.toString() + expect(result).assertEqual('d=value1&c=value2&b=%E5%A4%A7') + }) + it('Url_toString_test_002', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b= 大') + params.append('1 12', 'QQQ') + var result = params.toString() + expect(result).assertEqual('d=value1&c=value2&b=+%E5%A4%A7&1+12=QQQ') + }) + it('Url_toString_test_003', 0, function () { + let params = new Url.URLSearchParams('¥=)') + params.delete('5') + var result = params.toString() + expect(result).assertEqual('%EF%BF%A5=%29') + }) + //new url SearchParams + it('Url_construction_test_001', 0, function () { + let params = new Url.URLSearchParams('?user=abc&query=xyz') + var result = params.toString() + expect(result).assertEqual('user=abc&query=xyz') + }) + it('Url_construction_test_002', 0, function () { + let params = new Url.URLSearchParams({ + user: 'abc', + query: ['first', 'second'] + }) + var result = params.toString() + expect(result).assertEqual('user=abc&query=first%2Csecond') + }) + it('Url_construction_test_003', 0, function () { + let params = new Url.URLSearchParams([ + ['user', 'abc'], + ['query', 'first'], + ['query', 'second'], + ]) + var result = params.toString() + expect(result).assertEqual('user=abc&query=first&query=second') + }) + it('Url_construction_test_004', 0, function () { + const map = new Map() + map.set('user', 'abc') + map.set('query', 'xyz') + let params = new Url.URLSearchParams(map) + var result = params.toString() + expect(result).assertEqual('user=abc&query=xyz') + }) + it('Url_construction_test_004', 0, function () { + function* getQueryPairs() { + yield ['user', 'abc'] + yield ['query', 'first'] + yield ['query', 'second'] + } + let params = new Url.URLSearchParams(getQueryPairs()) + var result = params.toString() + expect(result).assertEqual('user=abc&query=first&query=second') + }) + //new url - get + it('Url_to_string_test_001', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.to_string() + expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') + }) + + it('Url_href_test_002', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.href + expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') + }) + it('Url_origin_test_003', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.origin + expect(result).assertEqual('http://host:8080') + }) + it('Url_protocol_test_004', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.protocol + expect(result).assertEqual('http:') + }) + it('Url_username_test_005', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.username + expect(result).assertEqual('username') + }) + it('Url_password_test_006', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.password + expect(result).assertEqual('password') + }) + it('Url_host_test_007', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.host + expect(result).assertEqual('host:8080') + }) + it('Url_hostname_test_008', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.hostname + expect(result).assertEqual('host') + }) + it('Url_port_test_009', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.port + expect(result).assertEqual('8080') + }) + it('Url_pathname_test_010', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result = params.pathname + expect(result).assertEqual('/directory/file') + }) + it('Url_search_test_011', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') + var result = params.search + expect(result).assertEqual('?query=qqqq') + }) + it('Url_search_test_012', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') + var result = params.search + expect(result).assertEqual('?query=pppppp') + }) + it('Url_hash_test_013', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') + var result = params.hash + expect(result).assertEqual('#fragment') + }) + //new url - set + it('Url_href_test_001', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.href = 'http://[::192.9.5.5]/ipng' + var result = params.href + expect(result).assertEqual('http://[::c009:505]/ipng') + }) + it('Url_protocol_test_002', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.protocol = 'https:' + var result = params.href + expect(result).assertEqual('https://username:password@host:8080/directory/file?query#fragment') + }) + it('Url_username_test_003', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.username = 'username1' + var result = params.href + expect(result).assertEqual('http://username1:password@host:8080/directory/file?query#fragment') + }) + it('Url_password_test_004', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.password = 'passwd' + var result = params.href + expect(result).assertEqual('http://username:passwd@host:8080/directory/file?query#fragment') + }) + + it('Url_host_test_005', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.host = 'www.baidu.com:99' + var result = params.href + expect(result).assertEqual('http://username:password@www.baidu.com:99/directory/file?query#fragment') + }) + + it('Url_hostname_test_006', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.hostname = 'www.baidu.com' + var result = params.href + expect(result).assertEqual('http://username:password@www.baidu.com:8080/directory/file?query#fragment') + }) + it('Url_port_test_007', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.port = '99' + var result = params.href + expect(result).assertEqual('http://username:password@host:99/directory/file?query#fragment') + }) + it('Url_pathname_test_008', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.pathname = '/path/ddd' + var result = params.href + expect(result).assertEqual('http://username:password@host:8080/path/ddd?query#fragment') + }) + it('Url_search_test_009', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') + params.search = '?pppppp=1234' + var result = params.href + expect(result).assertEqual('http://username:password@host:8080/directory/file?pppppp=1234#fragment') + }) + it('Url_hash_test_010', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') + params.hash = '#qwer=da' + var result = params.href + expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') + }) + //new url JSON + it('Url_toJSON_test_001', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') + var result = params.toJSON() + expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') + }) + //new url IPV6 + it('Url_IPV6_test_001', 0, function () { + let params = new Url.URL('http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html') + var result = params.href + expect(result).assertEqual('http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/index.html') + }) + it('Url_IPV6_test_002', 0, function () { + let params = new Url.URL('http://[1080:0:0:0:8:800:200C:417A]/index.html') + var result = params.href + expect(result).assertEqual('http://[1080::8:800:200c:417a]/index.html') + }) + it('Url_IPV6_test_003', 0, function () { + let params = new Url.URL('http://[::FFFF:129.144.52.38]:80/index.html') + var result = params.href + expect(result).assertEqual('http://[::ffff:8190:3426]/index.html') + }) + //new url IPV4 + it('Url_IPV4_test_001', 0, function () { + let params = new Url.URL('http://0377.0xff.255.1:80/index.html') + var result = params.href + expect(result).assertEqual('http://255.255.255.1/index.html') + }) + it('Url_IPV4_test_002', 0, function () { + let params = new Url.URL('http://0377.0xff.255.g/index.html') + var result = params.href + expect(result).assertEqual('http://0377.0xff.255.g/index.html') + }) + it('Url_IPV4_test_003', 0, function () { + let params = new Url.URL('http://190.254.245.9:80/index.html') + var result = params.href + expect(result).assertEqual('http://190.254.245.9/index.html') + }) + //new url url_base + it('Url_base_test_001', 0, function () { + let params = new Url.URL('https://developer.mozilla.org',) + var result = params.href + expect(result).assertEqual('https://developer.mozilla.org/') + }) + it('Url_base_test_002', 0, function () { + let params = new Url.URL('https://developer.mozilla.org', 'flie:/developer.mozilla.org') + var result = params.href + expect(result).assertEqual('https://developer.mozilla.org/') + }) + it('Url_base_test_003', 0, function () { + let params = new Url.URL('https://developer.mozilla.org', 'ftp://www.example.com') + var result = params.href + expect(result).assertEqual('https://developer.mozilla.org/') + }) + it('Url_base_test_004', 0, function () { + let params = new Url.URL(' ', 'http://www.example.com') + var result = params.href + expect(result).assertEqual('http://www.example.com/') + }) + it('Url_base_test_005', 0, function () { + let params = new Url.URL('.', 'http://www.example.com') + var result = params.href + expect(result).assertEqual('http://www.example.com/') + }) + it('Url_base_test_006', 0, function () { + let params = new Url.URL('../h:', 'http://www.example.com') + var result = params.href + expect(result).assertEqual('http://www.example.com/h:') + }) + it('Url_base_test_007', 0, function () { + let params = new Url.URL('/sca/./path/path/../scasa/jjjjj', 'http://www.example.com') + var result = params.href + expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_008', 0, function () { + let params = new Url.URL('sca/./path/path/../scasa/jjjjj', 'http://www.example.com') + var result = params.href + expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_009', 0, function () { + let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'http://www.example.com') + var result = params.href + expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_010', 0, function () { + let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'file://www.example.com') + var result = params.href + expect(result).assertEqual('file://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_011', 0, function () { + let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'file1://www.example.com') + var result = params.href + expect(result).assertEqual('file1://www.example.com/sca/path/scasa/jjjjj') + }) }) \ No newline at end of file diff --git a/compileruntime/util_lib_standard/project/entry/src/main/resources/base/element/string.json b/compileruntime/url_lib_standard/src/main/resources/base/element/string.json similarity index 94% rename from compileruntime/util_lib_standard/project/entry/src/main/resources/base/element/string.json rename to compileruntime/url_lib_standard/src/main/resources/base/element/string.json index c0dd3a09e..0bae6bd40 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/resources/base/element/string.json +++ b/compileruntime/url_lib_standard/src/main/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] } \ No newline at end of file diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/app.js b/compileruntime/url_lib_standard/src/ohosTest/js/default/app.js similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/app.js rename to compileruntime/url_lib_standard/src/ohosTest/js/default/app.js diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json b/compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/en-US.json similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json rename to compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/en-US.json diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json b/compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json rename to compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css b/compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.css similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css rename to compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.css diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml b/compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.hml similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml rename to compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.hml diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js b/compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.js similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js rename to compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.js diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js b/compileruntime/url_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js similarity index 100% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js rename to compileruntime/url_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/List.test.js b/compileruntime/url_lib_standard/src/ohosTest/js/test/List.test.js similarity index 92% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/List.test.js rename to compileruntime/url_lib_standard/src/ohosTest/js/test/List.test.js index d21d41758..86ae9fa26 100644 --- a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/List.test.js +++ b/compileruntime/url_lib_standard/src/ohosTest/js/test/List.test.js @@ -1,16 +1,16 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + require('./ExampleJsunit.test.js') \ No newline at end of file diff --git a/compileruntime/url_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json b/compileruntime/url_lib_standard/src/ohosTest/resources/base/element/string.json similarity index 93% rename from compileruntime/url_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json rename to compileruntime/url_lib_standard/src/ohosTest/resources/base/element/string.json index 3b04ea845..2dffe5ba6 100644 --- a/compileruntime/url_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json +++ b/compileruntime/url_lib_standard/src/ohosTest/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "app_name", - "value": "URL" - }, - { - "name": "mainability_description", - "value": "hap sample empty page" - } - ] -} +{ + "string": [ + { + "name": "app_name", + "value": "URL" + }, + { + "name": "mainability_description", + "value": "hap sample empty page" + } + ] +} diff --git a/compileruntime/util_lib_standard/BUILD.gn b/compileruntime/util_lib_standard/BUILD.gn index b428754de..cceaf8a1f 100644 --- a/compileruntime/util_lib_standard/BUILD.gn +++ b/compileruntime/util_lib_standard/BUILD.gn @@ -10,9 +10,29 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import("//test/xts/tools/build/suite.gni") +ohos_js_hap_suite("util_js_test") { + hap_profile = "./src/main/config.json" + deps = [ + ":util_js_assets", + ":util_resources", + ] + + # shared_libraries = [ + # "//third_party/giflib:libgif", + # "//third_party/libpng:libpng", + # ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "UtilJsTest" -ohos_js_hap_suite("startup_util_js_test") { - test_hap_name = "StartupUtilJSApiTest" - hap_source_path = "hap/entry-debug-rich-unsigned.hap" + # part_name = "prebuilt_hap" + # subsystem_name = "xts" +} +ohos_js_assets("util_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("util_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" } diff --git a/compileruntime/util_lib_standard/Test.json b/compileruntime/util_lib_standard/Test.json index 301ce904e..111d1ab5e 100644 --- a/compileruntime/util_lib_standard/Test.json +++ b/compileruntime/util_lib_standard/Test.json @@ -9,7 +9,7 @@ "kits": [ { "test-file-name": [ - "startup_util_js_test.hap" + "UtilJsTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/compileruntime/util_lib_standard/project/entry/package.json b/compileruntime/util_lib_standard/project/entry/package.json deleted file mode 100644 index 69a88e3b6..000000000 --- a/compileruntime/util_lib_standard/project/entry/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/compileruntime/util_lib_standard/signature/openharmony_sx.p7b b/compileruntime/util_lib_standard/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 GIT binary patch literal 3437 zcmcgvX>b$g8MY4FF(5FQyMT=#m||qU)nQ9cId-MBB-<-lvSdq&snM}IENNF>t+bK| zgowuF2vC|SxSZxNN5eHhV%(WPpbeB9Fc3;JDMtzMBv1-XAc2N~c2_tCXW&OCGw6qQ z-s9VS-tT?h=bI0tMS+~WDXqHJyCPmLzdbE-fV8Nd&*MRZfG8(#POFZG3xs@Lb{0ry z=R8j3wWo!5g=yjKx#BoZMFS)uA)H}cTp@-^K`9VV?RC3J59@}eik*>n|pRKOLZ zxdn7G!Yv@9O#y<&eUy{)vMXb;fQR)ffVAADQsEMXm;IBMDLfLD0w^U;6%HVo-0Q_5 zCHEa?DBuauNpZzoF+tK27w#n~?u%toS-DhR4k@Q*{7x^8Q=D6&kd^_~J#VVG2LXkL zaAy=}U*?Jto)9hx5MGjdp9hcQAu@tfk_;l!PeyxPY<8b&+&D!CyaBh9=8BSVKLpk4 z4Ml3yY|&Th)vyK4cpC{!uU8v2YBlVV`d~(nz&<@{G1oe*DHub1z7~J5*;s2bX<)_* zV_GbsPQg`(&rpxRb_*Od7}++3+liSw-$!1 zs5*g}EHWhI3i|!-FcfzYL0`SL-rq>LENC;PMl)G(0(1U2%Va|smp0UFx0xd@soZA* zD5LYc4OlbE7@ARt#h}rr3>K@bf%B#^-c+xz8Hr)0D5ExIFltezN@Hn8>o5d~bSfYtkc+_Z&kI#-N5_GhCg*V-^TSO=!G~ z(fXy{n2XV+k}6w_W`dTOP2a4u0ly;ANZ>4OxSKAzFB!yBzdo`gX zO?o|H@W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#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/compileruntime/process_lib_standard/project/entry/src/main/config.json b/compileruntime/util_lib_standard/src/main/config.json similarity index 95% rename from compileruntime/process_lib_standard/project/entry/src/main/config.json rename to compileruntime/util_lib_standard/src/main/config.json index f3773ec2f..75d1ac144 100644 --- a/compileruntime/process_lib_standard/project/entry/src/main/config.json +++ b/compileruntime/util_lib_standard/src/main/config.json @@ -1,57 +1,57 @@ -{ - "app": { - "bundleName": "com.example.childprocess", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.childprocess", - "name": ".MyApplication", - "mainAbility": "com.example.childprocess.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.childprocess.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } +{ + "app": { + "bundleName": "com.example.childprocess", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.childprocess", + "name": ".MyApplication", + "mainAbility": "com.example.childprocess.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.example.childprocess.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": true + } + } + ] + } } \ No newline at end of file diff --git a/compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java b/compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MainAbility.java similarity index 96% rename from compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java rename to compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MainAbility.java index 1bc0c4d53..dbdddf742 100644 --- a/compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java +++ b/compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MainAbility.java @@ -1,31 +1,31 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.childprocess; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class MainAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.childprocess; + +import ohos.ace.ability.AceAbility; +import ohos.aafwk.content.Intent; + +public class MainAbility extends AceAbility { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + } + + @Override + public void onStop() { + super.onStop(); + } +} diff --git a/compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java b/compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MyApplication.java similarity index 97% rename from compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java rename to compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MyApplication.java index b27ffa96e..bf24a9676 100644 --- a/compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java +++ b/compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MyApplication.java @@ -1,25 +1,25 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.childprocess; - -import ohos.aafwk.ability.AbilityPackage; - -public class MyApplication extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.childprocess; + +import ohos.aafwk.ability.AbilityPackage; + +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java b/compileruntime/util_lib_standard/src/main/java/com/example/url/MainAbility.java similarity index 96% rename from compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java rename to compileruntime/util_lib_standard/src/main/java/com/example/url/MainAbility.java index ab25e441f..1029c0119 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java +++ b/compileruntime/util_lib_standard/src/main/java/com/example/url/MainAbility.java @@ -1,30 +1,30 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.example.url; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class MainAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.url; + +import ohos.ace.ability.AceAbility; +import ohos.aafwk.content.Intent; + +public class MainAbility extends AceAbility { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + } + + @Override + public void onStop() { + super.onStop(); + } +} diff --git a/compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java b/compileruntime/util_lib_standard/src/main/java/com/example/url/MyApplication.java similarity index 97% rename from compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java rename to compileruntime/util_lib_standard/src/main/java/com/example/url/MyApplication.java index 8b5743ec6..d0bd8e832 100644 --- a/compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java +++ b/compileruntime/util_lib_standard/src/main/java/com/example/url/MyApplication.java @@ -1,24 +1,24 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.example.url; - -import ohos.aafwk.ability.AbilityPackage; - -public class MyApplication extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.url; + +import ohos.aafwk.ability.AbilityPackage; + +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/app.js b/compileruntime/util_lib_standard/src/main/js/default/app.js similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/app.js rename to compileruntime/util_lib_standard/src/main/js/default/app.js diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png b/compileruntime/util_lib_standard/src/main/js/default/common/images/Wallpaper.png similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png rename to compileruntime/util_lib_standard/src/main/js/default/common/images/Wallpaper.png diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg b/compileruntime/util_lib_standard/src/main/js/default/common/images/bg-tv.jpg similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg rename to compileruntime/util_lib_standard/src/main/js/default/common/images/bg-tv.jpg diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/en-US.json b/compileruntime/util_lib_standard/src/main/js/default/i18n/en-US.json similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/en-US.json rename to compileruntime/util_lib_standard/src/main/js/default/i18n/en-US.json diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json b/compileruntime/util_lib_standard/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json rename to compileruntime/util_lib_standard/src/main/js/default/i18n/zh-CN.json diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.css b/compileruntime/util_lib_standard/src/main/js/default/pages/index/index.css similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.css rename to compileruntime/util_lib_standard/src/main/js/default/pages/index/index.css diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.hml b/compileruntime/util_lib_standard/src/main/js/default/pages/index/index.hml similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.hml rename to compileruntime/util_lib_standard/src/main/js/default/pages/index/index.hml diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.js b/compileruntime/util_lib_standard/src/main/js/default/pages/index/index.js similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.js rename to compileruntime/util_lib_standard/src/main/js/default/pages/index/index.js diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js b/compileruntime/util_lib_standard/src/main/js/test/ExampleJsunit.test.js similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js rename to compileruntime/util_lib_standard/src/main/js/test/ExampleJsunit.test.js diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/test/List.test.js b/compileruntime/util_lib_standard/src/main/js/test/List.test.js similarity index 93% rename from compileruntime/util_lib_standard/project/entry/src/main/js/test/List.test.js rename to compileruntime/util_lib_standard/src/main/js/test/List.test.js index 78c997a16..e4726ba94 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/js/test/List.test.js +++ b/compileruntime/util_lib_standard/src/main/js/test/List.test.js @@ -1,17 +1,17 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./ExampleJsunit.test.js') +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require('./ExampleJsunit.test.js') require('./TextCodr.test.js') \ No newline at end of file diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/test/TextCodr.test.js b/compileruntime/util_lib_standard/src/main/js/test/TextCodr.test.js similarity index 96% rename from compileruntime/util_lib_standard/project/entry/src/main/js/test/TextCodr.test.js rename to compileruntime/util_lib_standard/src/main/js/test/TextCodr.test.js index 147a1d7c1..9026eca17 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/js/test/TextCodr.test.js +++ b/compileruntime/util_lib_standard/src/main/js/test/TextCodr.test.js @@ -1,449 +1,449 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -import util from '@ohos.util' -describe('textEncoderTest', function () { - it('util_printf_test_001', 0, function () { - var format = "%i,%s"; - var value1 = 1.5; - var value2 = "qwer"; - var value3 = 15; - var result = util.printf(format, value1, value2, value3); - expect(result).assertEqual("1,qwer 15"); - }) - - it('util_printf_test_002', 0, function () { - var format = "%O"; - var value = { name: 'jack', age: 15 }; - var result = util.printf(format, value); - expect(result).assertEqual("{ name: 'jack' ,age: 15 }\n"); - }) - - it('util_printf_test_003', 0, function () { - var format = "%o"; - var value = [1, 2, 3]; - var result = util.printf(format, value); - var res = '[ 1, 2, 3, [length]: 3 ]' - expect(result).assertEqual(' [ 1, 2, 3, [length]: 3 ]'); - }) - - it('util_printf_test_004', 0, function () { - var format = "%s,%s,%s"; - var value1 = "1.5"; - var value2 = "qwer"; - var result = util.printf(format, value1, value2); - expect(result).assertEqual('1.5,qwer,%s'); - }) - - it('util_getErrorString_test_001', 0, async function () { - var errnum = 10; - var result = util.getErrorString(errnum); - expect(result).assertEqual('No child process'); - }) - - it('util_getErrorString_test_002', 0, async function () { - console.log('--SK-- util_getErrorString_test_002'); - var errnum = 0; - var result = util.getErrorString(errnum); - expect(result).assertEqual('No error information'); - }) - - it('util_getErrorString_test_003', 0, async function () { - var errnum = -1; - var result = util.getErrorString(errnum); - expect(result).assertEqual('No error information'); - }) - - it('util_promisewrapper_test_002', 0, async function () { - function aysnFun(str1, str2, callback) { - if (typeof str1 === 'string' && typeof str1 === 'string') { - callback(null, str1 + str2); - } else { - callback('type err'); - } - } - let newPromiseObj = util.promiseWrapper(aysnFun)("Hello", 'World'); - newPromiseObj.then(res => { - expect(res).strictEqual('HelloWorld'); - }) - }) - - it('util_promisewrapper_test_003', 0, async function () { - function aysnFun(str1, str2, callback) { - if (typeof str1 === 'string' && typeof str1 === 'string') { - callback(null, str1 + str2); - } else { - callback('type err'); - } - } - let newPromiseObj = util.promiseWrapper(aysnFun)([1, 2], 'World'); - newPromiseObj.catch(err => { - expect(err).strictEqual('type err'); - }) - }) - - it('util_promisewrapper_test_004', 0, async function () { - const a = util.promiseWrapper(function() {}); - const b = util.promiseWrapper(a); - expect(a).strictEqual(b); - }) - - it('util_promisewrapper_test_005', 0, async function () { - let errToThrow; - const thrower = util.promiseWrapper(function(a, b, c, cb) { - errToThrow = new Error(); - throw errToThrow; - }); - thrower(1, 2, 3).catch(err => { - expect(err).strictEqual(errToThrow); - }) - }) - - it('util_promisewrapper_test_006', 0, async function () { - const err = new Error(); - const a = util.promiseWrapper((cb) => cb(err))(); - const b = util.promiseWrapper(() => {throw err;})(); - Promise.all([ - a.then(e => { - expect(e).strictEqual(err); - }), - b.then(e => { - expect(e).strictEqual(err); - }) - ]); - }) - - it('util_promisewrapper_test_007', 0, async function () { - const err = new Error('callback with the error.'); - const stack = err.stack; - const fn = util.promiseWrapper(function(cb) { - cb(null); - cb(err); - }); - (async () => { - await fn(); - await Promise.resolve(); - return expect(stack).strictEqual(err.stack); - })(); - }) - - it('util_promisewrapper_test_008', 0, async function () { - function fn(err, val, callback) { - callback(err, val); - } - (async () => { - const value = await util.promiseWrapper(fn)(null, 42); - expect(value).strictEqual(42); - })(); - }) - - it('util_callbackWrapper_test_001', 0, async function () { - const promiseFn = [1, 2]; - try { - util.callbackWrapper(promiseFn); - } catch(e) { - expect(e.message).strictEqual('original is not function'); - } - }) - - it('util_callbackWrapper_test_002', 0, async function () { - async function promiseFn() { - return Promise.resolve('value'); - }; - var cb = util.callbackWrapper(promiseFn); - cb((err, ret) => { - expect(err).strictEqual(null); - expect(ret).strictEqual('value'); - }) - }) - - it('util_callbackWrapper_test_003', 0, async function () { - async function promiseFn() { - return 42; - }; - var cb = util.callbackWrapper(promiseFn); - cb((err, ret) => { - expect(err).strictEqual(null); - expect(ret).strictEqual(42); - }) - }) - - it('util_callbackWrapper_test_004', 0, async function () { - async function promiseFn() { - return Promise.reject('value'); - }; - var cb = util.callbackWrapper(promiseFn); - cb((err, ret) => { - expect(err).strictEqual('value'); - expect(ret).strictEqual(undefined); - }) - }) - - it('util_callbackWrapper_test_005', 0, async function () { - async function promiseFn(a, b) { - return a + b; - }; - var cb = util.callbackWrapper(promiseFn); - cb(1, 2, (err, ret) => { - expect(err).strictEqual(null); - expect(ret).strictEqual(3); - }) - }) - - it('util_callbackWrapper_test_006', 0, async function () { - async function promiseFn(){ - return null; - }; - var cb = util.callbackWrapper(promiseFn); - try { - cb([1, 2]) - } catch(err) { - expect(err.message).strictEqual('maybe is not function'); - } - }) - - it('encoding_test_001', 0, function () { - var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) - var retStr = that.encoding - expect(retStr).assertEqual('utf-8') - }) - - // encoding test - it('encoding_test_002', 0, function () { - var that = new util.TextDecoder('utf-16le') - var encodingStr = that.encoding - expect(encodingStr).assertEqual('utf-16le') - }) - - it('encoding_test_003', 0, function () { - var that = new util.TextDecoder('utf-16be') - var encodingStr = that.encoding - expect(encodingStr).assertEqual('utf-16be') - }) - - // fatal test - it('fatal_test_001', 0, function () { - var that = new util.TextDecoder('utf-16be', { fatal : true }) - var fatalStr = that.fatal - expect(fatalStr).assertEqual(true) - }) - - it('fatal_test_002', 0, function () { - var that = new util.TextDecoder('utf-16be', { fatal : false }) - var fatalStr = that.fatal - expect(fatalStr).assertEqual(false) - }) - - it('fatal_test_003', 0, function () { - var that = new util.TextDecoder('utf-16be') - var fatalStr = that.fatal - expect(fatalStr).assertEqual(false) - }) - - it('fatal_test_004', 0, function () { - var that = new util.TextDecoder('utf-8') - var fatalStr = that.fatal - expect(fatalStr).assertEqual(false) - }) - - // ignoreBOM test - it('ignoreBOM_test_001', 0, function () { - var that = new util.TextDecoder('utf-16be', { ignoreBOM : true }) - var ignoreBOMStr = that.ignoreBOM - expect(ignoreBOMStr).assertEqual(true) - }) - - it('ignoreBOM_test_002', 0, function () { - var that = new util.TextDecoder('utf-16be', { ignoreBOM : false }) - var ignoreBOMStr = that.ignoreBOM - expect(ignoreBOMStr).assertEqual(false) - }) - - it('ignoreBOM_test_003', 0, function () { - var that = new util.TextDecoder('utf-16be') - var ignoreBOMStr = that.ignoreBOM - expect(ignoreBOMStr).assertEqual(false) - }) - - it('ignoreBOM_test_004', 0, function () { - var that = new util.TextDecoder('utf-8') - var ignoreBOMStr = that.ignoreBOM - expect(ignoreBOMStr).assertEqual(false) - }) - - it('decode_test_001', 0, function () { - var that = new util.TextDecoder('utf-8'); - var arr = new Uint8Array(3); - for (var i = 0; i < 3; i++) { - arr[i] = 0x61 + i; - } - var retStr = that.decode(arr); - var rel = 'abc'; - expect(retStr).assertEqual(rel); - }) - - it('decode_test_002', 0, function () { - var that = new util.TextDecoder('utf-16le') - var arr = new Uint8Array(6) - arr[0] = 0x61; - arr[1] = 0x00; - arr[2] = 0x62; - arr[3] = 0x00; - arr[4] = 0x63; - arr[5] = 0x00; - var retStr = that.decode(arr) - var rel = 'abc' - expect(retStr).assertEqual(rel) - }) - - it('decode_test_003', 0, function () { - var that = new util.TextDecoder('utf-16be'); - var arr = new Uint8Array(6); - arr[0] = 0x00; - arr[1] = 0x61; - arr[2] = 0x00; - arr[3] = 0x62; - arr[4] = 0x00; - arr[5] = 0x63; - var retStr = that.decode(arr); - var rel = 'abc' - expect(retStr).assertEqual(rel); - }) - - it('decode_test_004', 0, function () { - var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) - var arr = new Uint8Array(6) - arr[0] = 0xEF; - arr[1] = 0xBB; - arr[2] = 0xBF; - arr[3] = 0x61; - arr[4] = 0x62; - arr[5] = 0x63; - var retStr = that.decode(arr, {stream:true}) - var BOM = '\uFEFF' - var rel = 'abc' - var re = BOM + rel - expect(retStr).assertEqual(re); - }) - - it('decode_test_005', 0, function () { - var that = new util.TextDecoder('utf-16le', { ignoreBOM : false }) - var arr = new Uint8Array(8) - arr[0] = 0xFF; - arr[1] = 0xFE; - arr[2] = 0x61; - arr[3] = 0x00; - arr[4] = 0x62; - arr[5] = 0x00 - arr[6] = 0x63; - arr[7] = 0x00; - var retStr = that.decode(arr, { stream : false }) - var BOM = '\uFEFF' - var rel = 'abc' - var re = BOM + rel - expect(retStr).assertEqual(re) - }) - - // encode test - it('test_get_encoding', 0, function () { - var that = new util.TextEncoder() - var str = that.encoding - expect(str).assertEqual('utf-8') - }) - - it('test_encode_01', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(20) - var result = new Uint8Array(buffer) - result = that.encode('\uD800楼楼') - expect(result[5]).assertEqual(188) - }) - - it('test_encode_02', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(20) - var result = new Uint8Array(buffer) - result = that.encode('a\uD800楼楼') - expect(result[0]).assertEqual(0x61) - }) - - it('test_encode_03', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(20) - var result = new Uint8Array(buffer) - result = that.encode('abc\uD800楼楼') - expect(result[1]).assertEqual(0x62) - }) - - it('test_encode_04', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(20) - var result = new Uint8Array(buffer) - result = that.encode('123\uD800楼楼') - expect(result[0]).assertEqual(49) - expect(result[9]).assertEqual(230) - }) - - it('test_encodeInto_01', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(20) - var dest = new Uint8Array(buffer, 0, 13) - var result = new Uint32Array(20) - result = that.encodeInto('\uD800A\uDF06A楼HiA', dest) - expect(result.read).assertEqual(7) - expect(result.written).assertEqual(13) - }) - - it('test_encodeInto_02', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(6) - var dest = new Uint8Array(buffer) - var result = new Object() - result = that.encodeInto('abc\u2603d', dest) - expect(result.read).assertEqual(4) - expect(result.written).assertEqual(6) - }) - - it('test_encodeInto_03', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(4) - var dest = new Uint8Array(buffer) - var result = new Object() - result = that.encodeInto('abcd', dest) - expect(result.read).assertEqual(4) - expect(result.written).assertEqual(4) - }) - - it('test_encodeInto_04', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(4) - var dest = new Uint8Array(buffer) - var result = new Object() - result = that.encodeInto('12345', dest) - expect(result.read).assertEqual(4) - expect(result.written).assertEqual(4) - }) - - it('test_encodeInto_05', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(4) - var dest = new Uint8Array(buffer) - var result = new Object() - result = that.encodeInto('123 4*!@#', dest) - expect(result.read).assertEqual(4) - expect(result.written).assertEqual(4) - }) +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' +import util from '@ohos.util' +describe('textEncoderTest', function () { + it('util_printf_test_001', 0, function () { + var format = "%i,%s"; + var value1 = 1.5; + var value2 = "qwer"; + var value3 = 15; + var result = util.printf(format, value1, value2, value3); + expect(result).assertEqual("1,qwer 15"); + }) + + it('util_printf_test_002', 0, function () { + var format = "%O"; + var value = { name: 'jack', age: 15 }; + var result = util.printf(format, value); + expect(result).assertEqual("{ name: 'jack' ,age: 15 }\n"); + }) + + it('util_printf_test_003', 0, function () { + var format = "%o"; + var value = [1, 2, 3]; + var result = util.printf(format, value); + var res = '[ 1, 2, 3, [length]: 3 ]' + expect(result).assertEqual(' [ 1, 2, 3, [length]: 3 ]'); + }) + + it('util_printf_test_004', 0, function () { + var format = "%s,%s,%s"; + var value1 = "1.5"; + var value2 = "qwer"; + var result = util.printf(format, value1, value2); + expect(result).assertEqual('1.5,qwer,%s'); + }) + + it('util_getErrorString_test_001', 0, async function () { + var errnum = 10; + var result = util.getErrorString(errnum); + expect(result).assertEqual('No child process'); + }) + + it('util_getErrorString_test_002', 0, async function () { + console.log('--SK-- util_getErrorString_test_002'); + var errnum = 0; + var result = util.getErrorString(errnum); + expect(result).assertEqual('No error information'); + }) + + it('util_getErrorString_test_003', 0, async function () { + var errnum = -1; + var result = util.getErrorString(errnum); + expect(result).assertEqual('No error information'); + }) + + it('util_promisewrapper_test_002', 0, async function () { + function aysnFun(str1, str2, callback) { + if (typeof str1 === 'string' && typeof str1 === 'string') { + callback(null, str1 + str2); + } else { + callback('type err'); + } + } + let newPromiseObj = util.promiseWrapper(aysnFun)("Hello", 'World'); + newPromiseObj.then(res => { + expect(res).strictEqual('HelloWorld'); + }) + }) + + it('util_promisewrapper_test_003', 0, async function () { + function aysnFun(str1, str2, callback) { + if (typeof str1 === 'string' && typeof str1 === 'string') { + callback(null, str1 + str2); + } else { + callback('type err'); + } + } + let newPromiseObj = util.promiseWrapper(aysnFun)([1, 2], 'World'); + newPromiseObj.catch(err => { + expect(err).strictEqual('type err'); + }) + }) + + it('util_promisewrapper_test_004', 0, async function () { + const a = util.promiseWrapper(function() {}); + const b = util.promiseWrapper(a); + expect(a).strictEqual(b); + }) + + it('util_promisewrapper_test_005', 0, async function () { + let errToThrow; + const thrower = util.promiseWrapper(function(a, b, c, cb) { + errToThrow = new Error(); + throw errToThrow; + }); + thrower(1, 2, 3).catch(err => { + expect(err).strictEqual(errToThrow); + }) + }) + + it('util_promisewrapper_test_006', 0, async function () { + const err = new Error(); + const a = util.promiseWrapper((cb) => cb(err))(); + const b = util.promiseWrapper(() => {throw err;})(); + Promise.all([ + a.then(e => { + expect(e).strictEqual(err); + }), + b.then(e => { + expect(e).strictEqual(err); + }) + ]); + }) + + it('util_promisewrapper_test_007', 0, async function () { + const err = new Error('callback with the error.'); + const stack = err.stack; + const fn = util.promiseWrapper(function(cb) { + cb(null); + cb(err); + }); + (async () => { + await fn(); + await Promise.resolve(); + return expect(stack).strictEqual(err.stack); + })(); + }) + + it('util_promisewrapper_test_008', 0, async function () { + function fn(err, val, callback) { + callback(err, val); + } + (async () => { + const value = await util.promiseWrapper(fn)(null, 42); + expect(value).strictEqual(42); + })(); + }) + + it('util_callbackWrapper_test_001', 0, async function () { + const promiseFn = [1, 2]; + try { + util.callbackWrapper(promiseFn); + } catch(e) { + expect(e.message).strictEqual('original is not function'); + } + }) + + it('util_callbackWrapper_test_002', 0, async function () { + async function promiseFn() { + return Promise.resolve('value'); + }; + var cb = util.callbackWrapper(promiseFn); + cb((err, ret) => { + expect(err).strictEqual(null); + expect(ret).strictEqual('value'); + }) + }) + + it('util_callbackWrapper_test_003', 0, async function () { + async function promiseFn() { + return 42; + }; + var cb = util.callbackWrapper(promiseFn); + cb((err, ret) => { + expect(err).strictEqual(null); + expect(ret).strictEqual(42); + }) + }) + + it('util_callbackWrapper_test_004', 0, async function () { + async function promiseFn() { + return Promise.reject('value'); + }; + var cb = util.callbackWrapper(promiseFn); + cb((err, ret) => { + expect(err).strictEqual('value'); + expect(ret).strictEqual(undefined); + }) + }) + + it('util_callbackWrapper_test_005', 0, async function () { + async function promiseFn(a, b) { + return a + b; + }; + var cb = util.callbackWrapper(promiseFn); + cb(1, 2, (err, ret) => { + expect(err).strictEqual(null); + expect(ret).strictEqual(3); + }) + }) + + it('util_callbackWrapper_test_006', 0, async function () { + async function promiseFn(){ + return null; + }; + var cb = util.callbackWrapper(promiseFn); + try { + cb([1, 2]) + } catch(err) { + expect(err.message).strictEqual('maybe is not function'); + } + }) + + it('encoding_test_001', 0, function () { + var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) + var retStr = that.encoding + expect(retStr).assertEqual('utf-8') + }) + + // encoding test + it('encoding_test_002', 0, function () { + var that = new util.TextDecoder('utf-16le') + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16le') + }) + + it('encoding_test_003', 0, function () { + var that = new util.TextDecoder('utf-16be') + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16be') + }) + + // fatal test + it('fatal_test_001', 0, function () { + var that = new util.TextDecoder('utf-16be', { fatal : true }) + var fatalStr = that.fatal + expect(fatalStr).assertEqual(true) + }) + + it('fatal_test_002', 0, function () { + var that = new util.TextDecoder('utf-16be', { fatal : false }) + var fatalStr = that.fatal + expect(fatalStr).assertEqual(false) + }) + + it('fatal_test_003', 0, function () { + var that = new util.TextDecoder('utf-16be') + var fatalStr = that.fatal + expect(fatalStr).assertEqual(false) + }) + + it('fatal_test_004', 0, function () { + var that = new util.TextDecoder('utf-8') + var fatalStr = that.fatal + expect(fatalStr).assertEqual(false) + }) + + // ignoreBOM test + it('ignoreBOM_test_001', 0, function () { + var that = new util.TextDecoder('utf-16be', { ignoreBOM : true }) + var ignoreBOMStr = that.ignoreBOM + expect(ignoreBOMStr).assertEqual(true) + }) + + it('ignoreBOM_test_002', 0, function () { + var that = new util.TextDecoder('utf-16be', { ignoreBOM : false }) + var ignoreBOMStr = that.ignoreBOM + expect(ignoreBOMStr).assertEqual(false) + }) + + it('ignoreBOM_test_003', 0, function () { + var that = new util.TextDecoder('utf-16be') + var ignoreBOMStr = that.ignoreBOM + expect(ignoreBOMStr).assertEqual(false) + }) + + it('ignoreBOM_test_004', 0, function () { + var that = new util.TextDecoder('utf-8') + var ignoreBOMStr = that.ignoreBOM + expect(ignoreBOMStr).assertEqual(false) + }) + + it('decode_test_001', 0, function () { + var that = new util.TextDecoder('utf-8'); + var arr = new Uint8Array(3); + for (var i = 0; i < 3; i++) { + arr[i] = 0x61 + i; + } + var retStr = that.decode(arr); + var rel = 'abc'; + expect(retStr).assertEqual(rel); + }) + + it('decode_test_002', 0, function () { + var that = new util.TextDecoder('utf-16le') + var arr = new Uint8Array(6) + arr[0] = 0x61; + arr[1] = 0x00; + arr[2] = 0x62; + arr[3] = 0x00; + arr[4] = 0x63; + arr[5] = 0x00; + var retStr = that.decode(arr) + var rel = 'abc' + expect(retStr).assertEqual(rel) + }) + + it('decode_test_003', 0, function () { + var that = new util.TextDecoder('utf-16be'); + var arr = new Uint8Array(6); + arr[0] = 0x00; + arr[1] = 0x61; + arr[2] = 0x00; + arr[3] = 0x62; + arr[4] = 0x00; + arr[5] = 0x63; + var retStr = that.decode(arr); + var rel = 'abc' + expect(retStr).assertEqual(rel); + }) + + it('decode_test_004', 0, function () { + var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) + var arr = new Uint8Array(6) + arr[0] = 0xEF; + arr[1] = 0xBB; + arr[2] = 0xBF; + arr[3] = 0x61; + arr[4] = 0x62; + arr[5] = 0x63; + var retStr = that.decode(arr, {stream:true}) + var BOM = '\uFEFF' + var rel = 'abc' + var re = BOM + rel + expect(retStr).assertEqual(re); + }) + + it('decode_test_005', 0, function () { + var that = new util.TextDecoder('utf-16le', { ignoreBOM : false }) + var arr = new Uint8Array(8) + arr[0] = 0xFF; + arr[1] = 0xFE; + arr[2] = 0x61; + arr[3] = 0x00; + arr[4] = 0x62; + arr[5] = 0x00 + arr[6] = 0x63; + arr[7] = 0x00; + var retStr = that.decode(arr, { stream : false }) + var BOM = '\uFEFF' + var rel = 'abc' + var re = BOM + rel + expect(retStr).assertEqual(re) + }) + + // encode test + it('test_get_encoding', 0, function () { + var that = new util.TextEncoder() + var str = that.encoding + expect(str).assertEqual('utf-8') + }) + + it('test_encode_01', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encode('\uD800楼楼') + expect(result[5]).assertEqual(188) + }) + + it('test_encode_02', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encode('a\uD800楼楼') + expect(result[0]).assertEqual(0x61) + }) + + it('test_encode_03', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encode('abc\uD800楼楼') + expect(result[1]).assertEqual(0x62) + }) + + it('test_encode_04', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encode('123\uD800楼楼') + expect(result[0]).assertEqual(49) + expect(result[9]).assertEqual(230) + }) + + it('test_encodeInto_01', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var dest = new Uint8Array(buffer, 0, 13) + var result = new Uint32Array(20) + result = that.encodeInto('\uD800A\uDF06A楼HiA', dest) + expect(result.read).assertEqual(7) + expect(result.written).assertEqual(13) + }) + + it('test_encodeInto_02', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(6) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeInto('abc\u2603d', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(6) + }) + + it('test_encodeInto_03', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(4) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeInto('abcd', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(4) + }) + + it('test_encodeInto_04', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(4) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeInto('12345', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(4) + }) + + it('test_encodeInto_05', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(4) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeInto('123 4*!@#', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(4) + }) }) \ No newline at end of file diff --git a/compileruntime/util_lib_standard/project/entry/src/main/js/test/url.test.js b/compileruntime/util_lib_standard/src/main/js/test/url.test.js similarity index 97% rename from compileruntime/util_lib_standard/project/entry/src/main/js/test/url.test.js rename to compileruntime/util_lib_standard/src/main/js/test/url.test.js index 0c9363cd0..fe429b9e6 100644 --- a/compileruntime/util_lib_standard/project/entry/src/main/js/test/url.test.js +++ b/compileruntime/util_lib_standard/src/main/js/test/url.test.js @@ -1,564 +1,564 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License') - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/lite' -import Url from '@ohos.url' - -describe('Url_mxa_jk_Test', function () { - it('Url_append_test_001', 0, function () { - var that = new Url.URL('http://username:password@host:8080/directory/file?foo=1&bar=2') - var params = new Url.URLSearchParams(that.search) - params.append('ma', 'jk') - var result = params.toString() - expect(result).assertEqual('foo=1&bar=2&ma=jk') - }) - it('Url_append_test_002', 0, function () { - let that = new Url.URL('https://example.com?foo=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.append('ma 大', 'jk¥') - var result = params.toString() - expect(result).assertEqual('foo=1&bar=2&ma+%E5%A4%A7=jk%EF%BF%A5') - }) - it('Url_append_test_003', 0, function () { - let that = new Url.URL('https://example.com?foo=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.append('foo~!@#$%^&*()_+-=','jk') - var result = params.toString() - expect(result).assertEqual('foo=1&bar=2&foo%7E%21%40%23%24%25%5E%26*%28%29_%2B-%3D=jk') - }) - it('Url_delete_test_001', 0, function () { - let that = new Url.URL('https://example.com?foo=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.delete('foo') - var result = params.toString() - expect(result).assertEqual('bar=2') - }) - it('Url_delete_test_002', 0, function () { - let that = new Url.URL('https://example.com?foo大=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.delete('foo') - var result = params.toString() - expect(result).assertEqual('foo%E5%A4%A7=1&bar=2') - }) - it('Url_delete_test_003', 0, function () { - let that = new Url.URL('https://example.com?foo大=1&bar=2') - let params = new Url.URLSearchParams(that.search) - params.delete('foo大') - var result = params.toString() - expect(result).assertEqual('bar=2') - }) - - it('Url_entries_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var i = 0; - var arr = {}; - for(var pair of params.entries()) { - arr[i]=pair[0]; - i++; - arr[i]=pair[1]; - i++; - } - expect(arr[1]).assertEqual('value1') - }) - it('Url_entries_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var i = 0; - var arr = {}; - for(var pair of params.entries()) { - arr[i]=pair[0]; - i++; - arr[i]=pair[1]; - i++; - } - expect(arr[2]).assertEqual('key2') - }) - it('Url_entries_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('foo', 'jk') - var i = 0; - var arr = {}; - for(var pair of params.entries()) { - arr[i]=pair[0]; - i++; - arr[i]=pair[1]; - i++; - } - expect(arr[5]).assertEqual('jk') - }) - - it('Url_forEach_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var arr = {}; - var i = 0; - function func(str1, str2, params) { - arr[i] = 'key=' + str1 + ' ' +'value=' + str2 + ' ' + 'flag=' + params - i++; - } - params.forEach(func) - expect(arr[0]).assertEqual('key=key1 value=value1 flag=key1=value1&key2=value2') - }) - it('Url_forEach_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var arr = {}; - var i = 0; - function func(str1, str2, params) { - arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params - i++; - } - params.forEach(func) - expect(arr[1]).assertEqual('key=key2 value=value2 flag=key1=value1&key2=value2') - }) - it('Url_forEach_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('foo', 'jk') - var arr = {}; - var i = 0; - function func(str1, str2, params) { - arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params - i++; - } - params.forEach(func) - expect(arr[2]).assertEqual('key=foo value=jk flag=key1=value1&key2=value2&foo=jk') - }) - it('Url_get_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var result = params.get('1') - expect(result).assertEqual(undefined) - }) - it('Url_get_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - var result = params.get('key2') - expect(result).assertEqual('value2') - }) - it('Url_get_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('5', 'JKL') - var result = params.get('5') - expect(result).assertEqual('JKL') - }) - it('Url_getAll_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2') - params.append('key1', 'AAA') - var result = params.getAll('key1') - expect(result).assertEqual('value1,AAA') - }) - it('Url_getAll_test_002', 0, function () { - let params = new Url.URLSearchParams('key1=value1&8=DEF') - params.append('8', 'A8A') - var result = params.getAll('8') - expect(result).assertEqual('DEF,A8A') - }) - it('Url_getAll_test_003', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') - params.append('key3', 'A3A') - var result = params.getAll('key3') - expect(result).assertEqual('大,A3A') - }) - it('Url_has_test_001', 0, function () { - let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') - var result = params.has('2') - expect(result).assertEqual(false) - }) - it('Url_has_test_002', 0, function () { - let params = new Url.URLSearchParams('小=value1&key2=value2&key3=大') - var result = params.has('小') - expect(result).assertEqual(true) - }) - it('Url_has_test_003', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - params.append('¥', 'ACA') - var result = params.has('¥') - expect(result).assertEqual(true) - }) - it('Url_keys_test_001', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - var arr = {}; - var i = 0; - for(var key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[0]).assertEqual('小') - }) - it('Url_keys_test_002', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - var arr = {}; - var i = 0; - for(var key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[1]).assertEqual('¥') - }) - it('Url_keys_test_003', 0, function () { - let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') - var arr = {}; - var i = 0; - for(var key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[2]).assertEqual('key3') - }) - it('Url_set_test_001', 0, function () { - let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') - params.set('11', 'CCC') - var res = params.toString() - expect(res).assertEqual('1=value1&2=value2&key3=3&11=CCC') - }) - it('Url_set_test_002', 0, function () { - let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') - params.set('10', 'BBB') - var res = params.toString() - expect(res).assertEqual('1=value1&2=value2&key3=3&10=BBB') - }) - it('Url_set_test_003', 0, function () { - let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') - params.set('ma 大', '10¥') - var res = params.toString() - expect(res).assertEqual('1=value1&2=value2&key3=3&ma+%E5%A4%A7=10%EF%BF%A5') - }) - it('Url_sort_test_001', 0, function () { - let params = new Url.URLSearchParams('1=value1&3=value3&2=key2') - params.sort() - var res = params.toString() - expect(res).assertEqual('1=value1&2=key2&3=value3') - }) - it('Url_sort_test_002', 0, function () { - let params = new Url.URLSearchParams('a=value1&c=value2&b=key2') - params.sort() - var res = params.toString() - expect(res).assertEqual('a=value1&b=key2&c=value2') - }) - it('Url_sort_test_003', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=33') - params.append('a', 'ACA') - params.sort() - var res = params.toString() - expect(res).assertEqual('a=ACA&b=33&c=value2&d=value1') - }) - it('Url_Values_test_001', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - var arr = {}; - var i = 0; - for(var value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[0]).assertEqual('value1') - }) - it('Url_Values_test_002', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - var arr = {}; - var i = 0; - for(var value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[1]).assertEqual('value2') - }) - it('Url_Values_test_003', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - params.append('a', 'ACA') - var arr = {}; - var i = 0; - for(var value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[3]).assertEqual('ACA') - }) - it('Url_toString_test_001', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b=大') - var result= params.toString() - expect(result).assertEqual('d=value1&c=value2&b=%E5%A4%A7') - }) - it('Url_toString_test_002', 0, function () { - let params = new Url.URLSearchParams('d=value1&c=value2&b= 大') - params.append('1 12','QQQ') - var result= params.toString() - expect(result).assertEqual('d=value1&c=value2&b=+%E5%A4%A7&1+12=QQQ') - }) - it('Url_toString_test_003', 0, function () { - let params = new Url.URLSearchParams('¥=)') - params.delete('5') - var result= params.toString() - expect(result).assertEqual('%EF%BF%A5=%29') - }) - //new url SearchParams - it('Url_construction_test_001', 0, function () { - let params = new Url.URLSearchParams('?user=abc&query=xyz') - var result= params.toString() - expect(result).assertEqual('user=abc&query=xyz') - }) - it('Url_construction_test_002', 0, function () { - let params = new Url.URLSearchParams({ - user: 'abc', - query: ['first', 'second'] - }) - var result= params.toString() - expect(result).assertEqual('user=abc&query=first%2Csecond') - }) - it('Url_construction_test_003', 0, function () { - let params = new Url.URLSearchParams([ - ['user', 'abc'], - ['query', 'first'], - ['query', 'second'], - ]) - var result= params.toString() - expect(result).assertEqual('user=abc&query=first&query=second') - }) - it('Url_construction_test_004', 0, function () { - const map = new Map() - map.set('user', 'abc') - map.set('query', 'xyz') - let params = new Url.URLSearchParams(map) - var result= params.toString() - expect(result).assertEqual('user=abc&query=xyz') - }) - it('Url_construction_test_004', 0, function () { - function* getQueryPairs() { - yield ['user', 'abc'] - yield ['query', 'first'] - yield ['query', 'second'] - } - let params = new Url.URLSearchParams(getQueryPairs()) - var result= params.toString() - expect(result).assertEqual('user=abc&query=first&query=second') - }) - //new url - get - it('Url_to_string_test_001', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.to_string() - expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') - }) - - it('Url_href_test_002', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.href - expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') - }) - it('Url_origin_test_003', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.origin - expect(result).assertEqual('http://host:8080') - }) - it('Url_protocol_test_004', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.protocol - expect(result).assertEqual('http:') - }) - it('Url_username_test_005', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.username - expect(result).assertEqual('username') - }) - it('Url_password_test_006', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.password - expect(result).assertEqual('password') - }) - it('Url_host_test_007', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.host - expect(result).assertEqual('host:8080') - }) - it('Url_hostname_test_008', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.hostname - expect(result).assertEqual('host') - }) - it('Url_port_test_009', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.port - expect(result).assertEqual('8080') - }) - it('Url_pathname_test_010', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - var result= params.pathname - expect(result).assertEqual('/directory/file') - }) - it('Url_search_test_011', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') - var result= params.search - expect(result).assertEqual('?query=qqqq') - }) - it('Url_search_test_012', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') - var result= params.search - expect(result).assertEqual('?query=pppppp') - }) - it('Url_hash_test_013', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') - var result= params.hash - expect(result).assertEqual('#fragment') - }) - //new url - set - it('Url_href_test_001', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.href = 'http://[::192.9.5.5]/ipng' - var result = params.href - expect(result).assertEqual('http://[::c009:505]/ipng') - }) - it('Url_protocol_test_002', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.protocol = 'https:' - var result= params.href - expect(result).assertEqual('https://username:password@host:8080/directory/file?query#fragment') - }) - it('Url_username_test_003', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.username = 'username1' - var result= params.href - expect(result).assertEqual('http://username1:password@host:8080/directory/file?query#fragment') - }) - it('Url_password_test_004', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.password = 'passwd' - var result= params.href - expect(result).assertEqual('http://username:passwd@host:8080/directory/file?query#fragment') - }) - - it('Url_host_test_005', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.host = 'www.baidu.com:99' - var result= params.href - expect(result).assertEqual('http://username:password@www.baidu.com:99/directory/file?query#fragment') - }) - - it('Url_hostname_test_006', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.hostname = 'www.baidu.com' - var result= params.href - expect(result).assertEqual('http://username:password@www.baidu.com:8080/directory/file?query#fragment') - }) - it('Url_port_test_007', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.port = '99' - var result= params.href - expect(result).assertEqual('http://username:password@host:99/directory/file?query#fragment') - }) - it('Url_pathname_test_008', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') - params.pathname = '/path/ddd' - var result= params.href - expect(result).assertEqual('http://username:password@host:8080/path/ddd?query#fragment') - }) - it('Url_search_test_009', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') - params.search = '?pppppp=1234' - var result= params.href - expect(result).assertEqual('http://username:password@host:8080/directory/file?pppppp=1234#fragment') - }) - it('Url_hash_test_010', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') - params.hash = '#qwer=da' - var result= params.href - expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') - }) - //new url JSON - it('Url_toJSON_test_001', 0, function () { - let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') - var result= params.toJSON() - expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') - }) - //new url IPV6 - it('Url_IPV6_test_001', 0, function () { - let params = new Url.URL('http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html') - var result= params.href - expect(result).assertEqual('http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/index.html') - }) - it('Url_IPV6_test_002', 0, function () { - let params = new Url.URL('http://[1080:0:0:0:8:800:200C:417A]/index.html') - var result= params.href - expect(result).assertEqual('http://[1080::8:800:200c:417a]/index.html') - }) - it('Url_IPV6_test_003', 0, function () { - let params = new Url.URL('http://[::FFFF:129.144.52.38]:80/index.html') - var result= params.href - expect(result).assertEqual('http://[::ffff:8190:3426]/index.html') - }) - //new url IPV4 - it('Url_IPV4_test_001', 0, function () { - let params = new Url.URL('http://0377.0xff.255.1:80/index.html') - var result= params.href - expect(result).assertEqual('http://255.255.255.1/index.html') - }) - it('Url_IPV4_test_002', 0, function () { - let params = new Url.URL('http://0377.0xff.255.g/index.html') - var result= params.href - expect(result).assertEqual('http://0377.0xff.255.g/index.html') - }) - it('Url_IPV4_test_003', 0, function () { - let params = new Url.URL('http://190.254.245.9:80/index.html') - var result= params.href - expect(result).assertEqual('http://190.254.245.9/index.html') - }) - //new url url_base - it('Url_base_test_001', 0, function () { - let params = new Url.URL('https://developer.mozilla.org',) - var result= params.href - expect(result).assertEqual('https://developer.mozilla.org/') - }) - it('Url_base_test_002', 0, function () { - let params = new Url.URL('https://developer.mozilla.org', 'flie:/developer.mozilla.org') - var result= params.href - expect(result).assertEqual('https://developer.mozilla.org/') - }) - it('Url_base_test_003', 0, function () { - let params = new Url.URL('https://developer.mozilla.org', 'ftp://www.example.com') - var result= params.href - expect(result).assertEqual('https://developer.mozilla.org/') - }) - it('Url_base_test_004', 0, function () { - let params = new Url.URL(' ', 'http://www.example.com') - var result= params.href - expect(result).assertEqual('http://www.example.com/') - }) - it('Url_base_test_005', 0, function () { - let params = new Url.URL('.', 'http://www.example.com') - var result= params.href - expect(result).assertEqual('http://www.example.com/') - }) - it('Url_base_test_006', 0, function () { - let params = new Url.URL('../h:', 'http://www.example.com') - var result= params.href - expect(result).assertEqual('http://www.example.com/h:') - }) - it('Url_base_test_007', 0, function () { - let params = new Url.URL('/sca/./path/path/../scasa/jjjjj', 'http://www.example.com') - var result= params.href - expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_008', 0, function () { - let params = new Url.URL('sca/./path/path/../scasa/jjjjj', 'http://www.example.com') - var result= params.href - expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_009', 0, function () { - let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'http://www.example.com') - var result= params.href - expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_010', 0, function () { - let params = new Url.URL( '/../sca/./path/path/../scasa/jjjjj', 'file://www.example.com') - var result= params.href - expect(result).assertEqual('file://www.example.com/sca/path/scasa/jjjjj') - }) - it('Url_base_test_011', 0, function () { - let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'file1://www.example.com') - var result= params.href - expect(result).assertEqual('file1://www.example.com/sca/path/scasa/jjjjj') - }) +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/lite' +import Url from '@ohos.url' + +describe('Url_mxa_jk_Test', function () { + it('Url_append_test_001', 0, function () { + var that = new Url.URL('http://username:password@host:8080/directory/file?foo=1&bar=2') + var params = new Url.URLSearchParams(that.search) + params.append('ma', 'jk') + var result = params.toString() + expect(result).assertEqual('foo=1&bar=2&ma=jk') + }) + it('Url_append_test_002', 0, function () { + let that = new Url.URL('https://example.com?foo=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.append('ma 大', 'jk¥') + var result = params.toString() + expect(result).assertEqual('foo=1&bar=2&ma+%E5%A4%A7=jk%EF%BF%A5') + }) + it('Url_append_test_003', 0, function () { + let that = new Url.URL('https://example.com?foo=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.append('foo~!@#$%^&*()_+-=','jk') + var result = params.toString() + expect(result).assertEqual('foo=1&bar=2&foo%7E%21%40%23%24%25%5E%26*%28%29_%2B-%3D=jk') + }) + it('Url_delete_test_001', 0, function () { + let that = new Url.URL('https://example.com?foo=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.delete('foo') + var result = params.toString() + expect(result).assertEqual('bar=2') + }) + it('Url_delete_test_002', 0, function () { + let that = new Url.URL('https://example.com?foo大=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.delete('foo') + var result = params.toString() + expect(result).assertEqual('foo%E5%A4%A7=1&bar=2') + }) + it('Url_delete_test_003', 0, function () { + let that = new Url.URL('https://example.com?foo大=1&bar=2') + let params = new Url.URLSearchParams(that.search) + params.delete('foo大') + var result = params.toString() + expect(result).assertEqual('bar=2') + }) + + it('Url_entries_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var i = 0; + var arr = {}; + for(var pair of params.entries()) { + arr[i]=pair[0]; + i++; + arr[i]=pair[1]; + i++; + } + expect(arr[1]).assertEqual('value1') + }) + it('Url_entries_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var i = 0; + var arr = {}; + for(var pair of params.entries()) { + arr[i]=pair[0]; + i++; + arr[i]=pair[1]; + i++; + } + expect(arr[2]).assertEqual('key2') + }) + it('Url_entries_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('foo', 'jk') + var i = 0; + var arr = {}; + for(var pair of params.entries()) { + arr[i]=pair[0]; + i++; + arr[i]=pair[1]; + i++; + } + expect(arr[5]).assertEqual('jk') + }) + + it('Url_forEach_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var arr = {}; + var i = 0; + function func(str1, str2, params) { + arr[i] = 'key=' + str1 + ' ' +'value=' + str2 + ' ' + 'flag=' + params + i++; + } + params.forEach(func) + expect(arr[0]).assertEqual('key=key1 value=value1 flag=key1=value1&key2=value2') + }) + it('Url_forEach_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var arr = {}; + var i = 0; + function func(str1, str2, params) { + arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params + i++; + } + params.forEach(func) + expect(arr[1]).assertEqual('key=key2 value=value2 flag=key1=value1&key2=value2') + }) + it('Url_forEach_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('foo', 'jk') + var arr = {}; + var i = 0; + function func(str1, str2, params) { + arr[i] = 'key=' + str1 + ' ' + 'value=' + str2 + ' ' + 'flag=' + params + i++; + } + params.forEach(func) + expect(arr[2]).assertEqual('key=foo value=jk flag=key1=value1&key2=value2&foo=jk') + }) + it('Url_get_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var result = params.get('1') + expect(result).assertEqual(undefined) + }) + it('Url_get_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + var result = params.get('key2') + expect(result).assertEqual('value2') + }) + it('Url_get_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('5', 'JKL') + var result = params.get('5') + expect(result).assertEqual('JKL') + }) + it('Url_getAll_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2') + params.append('key1', 'AAA') + var result = params.getAll('key1') + expect(result).assertEqual('value1,AAA') + }) + it('Url_getAll_test_002', 0, function () { + let params = new Url.URLSearchParams('key1=value1&8=DEF') + params.append('8', 'A8A') + var result = params.getAll('8') + expect(result).assertEqual('DEF,A8A') + }) + it('Url_getAll_test_003', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') + params.append('key3', 'A3A') + var result = params.getAll('key3') + expect(result).assertEqual('大,A3A') + }) + it('Url_has_test_001', 0, function () { + let params = new Url.URLSearchParams('key1=value1&key2=value2&key3=大') + var result = params.has('2') + expect(result).assertEqual(false) + }) + it('Url_has_test_002', 0, function () { + let params = new Url.URLSearchParams('小=value1&key2=value2&key3=大') + var result = params.has('小') + expect(result).assertEqual(true) + }) + it('Url_has_test_003', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + params.append('¥', 'ACA') + var result = params.has('¥') + expect(result).assertEqual(true) + }) + it('Url_keys_test_001', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + var arr = {}; + var i = 0; + for(var key of params.keys()) { + arr[i] = key; + i++; + } + expect(arr[0]).assertEqual('小') + }) + it('Url_keys_test_002', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + var arr = {}; + var i = 0; + for(var key of params.keys()) { + arr[i] = key; + i++; + } + expect(arr[1]).assertEqual('¥') + }) + it('Url_keys_test_003', 0, function () { + let params = new Url.URLSearchParams('小=value1&¥=value2&key3=大') + var arr = {}; + var i = 0; + for(var key of params.keys()) { + arr[i] = key; + i++; + } + expect(arr[2]).assertEqual('key3') + }) + it('Url_set_test_001', 0, function () { + let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') + params.set('11', 'CCC') + var res = params.toString() + expect(res).assertEqual('1=value1&2=value2&key3=3&11=CCC') + }) + it('Url_set_test_002', 0, function () { + let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') + params.set('10', 'BBB') + var res = params.toString() + expect(res).assertEqual('1=value1&2=value2&key3=3&10=BBB') + }) + it('Url_set_test_003', 0, function () { + let params = new Url.URLSearchParams('1=value1&2=value2&key3=3') + params.set('ma 大', '10¥') + var res = params.toString() + expect(res).assertEqual('1=value1&2=value2&key3=3&ma+%E5%A4%A7=10%EF%BF%A5') + }) + it('Url_sort_test_001', 0, function () { + let params = new Url.URLSearchParams('1=value1&3=value3&2=key2') + params.sort() + var res = params.toString() + expect(res).assertEqual('1=value1&2=key2&3=value3') + }) + it('Url_sort_test_002', 0, function () { + let params = new Url.URLSearchParams('a=value1&c=value2&b=key2') + params.sort() + var res = params.toString() + expect(res).assertEqual('a=value1&b=key2&c=value2') + }) + it('Url_sort_test_003', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=33') + params.append('a', 'ACA') + params.sort() + var res = params.toString() + expect(res).assertEqual('a=ACA&b=33&c=value2&d=value1') + }) + it('Url_Values_test_001', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + var arr = {}; + var i = 0; + for(var value of params.values()) { + arr[i] = value; + i++; + } + expect(arr[0]).assertEqual('value1') + }) + it('Url_Values_test_002', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + var arr = {}; + var i = 0; + for(var value of params.values()) { + arr[i] = value; + i++; + } + expect(arr[1]).assertEqual('value2') + }) + it('Url_Values_test_003', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + params.append('a', 'ACA') + var arr = {}; + var i = 0; + for(var value of params.values()) { + arr[i] = value; + i++; + } + expect(arr[3]).assertEqual('ACA') + }) + it('Url_toString_test_001', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b=大') + var result= params.toString() + expect(result).assertEqual('d=value1&c=value2&b=%E5%A4%A7') + }) + it('Url_toString_test_002', 0, function () { + let params = new Url.URLSearchParams('d=value1&c=value2&b= 大') + params.append('1 12','QQQ') + var result= params.toString() + expect(result).assertEqual('d=value1&c=value2&b=+%E5%A4%A7&1+12=QQQ') + }) + it('Url_toString_test_003', 0, function () { + let params = new Url.URLSearchParams('¥=)') + params.delete('5') + var result= params.toString() + expect(result).assertEqual('%EF%BF%A5=%29') + }) + //new url SearchParams + it('Url_construction_test_001', 0, function () { + let params = new Url.URLSearchParams('?user=abc&query=xyz') + var result= params.toString() + expect(result).assertEqual('user=abc&query=xyz') + }) + it('Url_construction_test_002', 0, function () { + let params = new Url.URLSearchParams({ + user: 'abc', + query: ['first', 'second'] + }) + var result= params.toString() + expect(result).assertEqual('user=abc&query=first%2Csecond') + }) + it('Url_construction_test_003', 0, function () { + let params = new Url.URLSearchParams([ + ['user', 'abc'], + ['query', 'first'], + ['query', 'second'], + ]) + var result= params.toString() + expect(result).assertEqual('user=abc&query=first&query=second') + }) + it('Url_construction_test_004', 0, function () { + const map = new Map() + map.set('user', 'abc') + map.set('query', 'xyz') + let params = new Url.URLSearchParams(map) + var result= params.toString() + expect(result).assertEqual('user=abc&query=xyz') + }) + it('Url_construction_test_004', 0, function () { + function* getQueryPairs() { + yield ['user', 'abc'] + yield ['query', 'first'] + yield ['query', 'second'] + } + let params = new Url.URLSearchParams(getQueryPairs()) + var result= params.toString() + expect(result).assertEqual('user=abc&query=first&query=second') + }) + //new url - get + it('Url_to_string_test_001', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.to_string() + expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') + }) + + it('Url_href_test_002', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.href + expect(result).assertEqual('http://username:password@host:8080/directory/file?query#fragment') + }) + it('Url_origin_test_003', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.origin + expect(result).assertEqual('http://host:8080') + }) + it('Url_protocol_test_004', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.protocol + expect(result).assertEqual('http:') + }) + it('Url_username_test_005', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.username + expect(result).assertEqual('username') + }) + it('Url_password_test_006', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.password + expect(result).assertEqual('password') + }) + it('Url_host_test_007', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.host + expect(result).assertEqual('host:8080') + }) + it('Url_hostname_test_008', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.hostname + expect(result).assertEqual('host') + }) + it('Url_port_test_009', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.port + expect(result).assertEqual('8080') + }) + it('Url_pathname_test_010', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + var result= params.pathname + expect(result).assertEqual('/directory/file') + }) + it('Url_search_test_011', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') + var result= params.search + expect(result).assertEqual('?query=qqqq') + }) + it('Url_search_test_012', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') + var result= params.search + expect(result).assertEqual('?query=pppppp') + }) + it('Url_hash_test_013', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') + var result= params.hash + expect(result).assertEqual('#fragment') + }) + //new url - set + it('Url_href_test_001', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.href = 'http://[::192.9.5.5]/ipng' + var result = params.href + expect(result).assertEqual('http://[::c009:505]/ipng') + }) + it('Url_protocol_test_002', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.protocol = 'https:' + var result= params.href + expect(result).assertEqual('https://username:password@host:8080/directory/file?query#fragment') + }) + it('Url_username_test_003', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.username = 'username1' + var result= params.href + expect(result).assertEqual('http://username1:password@host:8080/directory/file?query#fragment') + }) + it('Url_password_test_004', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.password = 'passwd' + var result= params.href + expect(result).assertEqual('http://username:passwd@host:8080/directory/file?query#fragment') + }) + + it('Url_host_test_005', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.host = 'www.baidu.com:99' + var result= params.href + expect(result).assertEqual('http://username:password@www.baidu.com:99/directory/file?query#fragment') + }) + + it('Url_hostname_test_006', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.hostname = 'www.baidu.com' + var result= params.href + expect(result).assertEqual('http://username:password@www.baidu.com:8080/directory/file?query#fragment') + }) + it('Url_port_test_007', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.port = '99' + var result= params.href + expect(result).assertEqual('http://username:password@host:99/directory/file?query#fragment') + }) + it('Url_pathname_test_008', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query#fragment') + params.pathname = '/path/ddd' + var result= params.href + expect(result).assertEqual('http://username:password@host:8080/path/ddd?query#fragment') + }) + it('Url_search_test_009', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=qqqq#fragment') + params.search = '?pppppp=1234' + var result= params.href + expect(result).assertEqual('http://username:password@host:8080/directory/file?pppppp=1234#fragment') + }) + it('Url_hash_test_010', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#fragment') + params.hash = '#qwer=da' + var result= params.href + expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') + }) + //new url JSON + it('Url_toJSON_test_001', 0, function () { + let params = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') + var result= params.toJSON() + expect(result).assertEqual('http://username:password@host:8080/directory/file?query=pppppp#qwer=da') + }) + //new url IPV6 + it('Url_IPV6_test_001', 0, function () { + let params = new Url.URL('http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html') + var result= params.href + expect(result).assertEqual('http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/index.html') + }) + it('Url_IPV6_test_002', 0, function () { + let params = new Url.URL('http://[1080:0:0:0:8:800:200C:417A]/index.html') + var result= params.href + expect(result).assertEqual('http://[1080::8:800:200c:417a]/index.html') + }) + it('Url_IPV6_test_003', 0, function () { + let params = new Url.URL('http://[::FFFF:129.144.52.38]:80/index.html') + var result= params.href + expect(result).assertEqual('http://[::ffff:8190:3426]/index.html') + }) + //new url IPV4 + it('Url_IPV4_test_001', 0, function () { + let params = new Url.URL('http://0377.0xff.255.1:80/index.html') + var result= params.href + expect(result).assertEqual('http://255.255.255.1/index.html') + }) + it('Url_IPV4_test_002', 0, function () { + let params = new Url.URL('http://0377.0xff.255.g/index.html') + var result= params.href + expect(result).assertEqual('http://0377.0xff.255.g/index.html') + }) + it('Url_IPV4_test_003', 0, function () { + let params = new Url.URL('http://190.254.245.9:80/index.html') + var result= params.href + expect(result).assertEqual('http://190.254.245.9/index.html') + }) + //new url url_base + it('Url_base_test_001', 0, function () { + let params = new Url.URL('https://developer.mozilla.org',) + var result= params.href + expect(result).assertEqual('https://developer.mozilla.org/') + }) + it('Url_base_test_002', 0, function () { + let params = new Url.URL('https://developer.mozilla.org', 'flie:/developer.mozilla.org') + var result= params.href + expect(result).assertEqual('https://developer.mozilla.org/') + }) + it('Url_base_test_003', 0, function () { + let params = new Url.URL('https://developer.mozilla.org', 'ftp://www.example.com') + var result= params.href + expect(result).assertEqual('https://developer.mozilla.org/') + }) + it('Url_base_test_004', 0, function () { + let params = new Url.URL(' ', 'http://www.example.com') + var result= params.href + expect(result).assertEqual('http://www.example.com/') + }) + it('Url_base_test_005', 0, function () { + let params = new Url.URL('.', 'http://www.example.com') + var result= params.href + expect(result).assertEqual('http://www.example.com/') + }) + it('Url_base_test_006', 0, function () { + let params = new Url.URL('../h:', 'http://www.example.com') + var result= params.href + expect(result).assertEqual('http://www.example.com/h:') + }) + it('Url_base_test_007', 0, function () { + let params = new Url.URL('/sca/./path/path/../scasa/jjjjj', 'http://www.example.com') + var result= params.href + expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_008', 0, function () { + let params = new Url.URL('sca/./path/path/../scasa/jjjjj', 'http://www.example.com') + var result= params.href + expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_009', 0, function () { + let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'http://www.example.com') + var result= params.href + expect(result).assertEqual('http://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_010', 0, function () { + let params = new Url.URL( '/../sca/./path/path/../scasa/jjjjj', 'file://www.example.com') + var result= params.href + expect(result).assertEqual('file://www.example.com/sca/path/scasa/jjjjj') + }) + it('Url_base_test_011', 0, function () { + let params = new Url.URL('/../sca/./path/path/../scasa/jjjjj', 'file1://www.example.com') + var result= params.href + expect(result).assertEqual('file1://www.example.com/sca/path/scasa/jjjjj') + }) }) \ No newline at end of file diff --git a/compileruntime/url_lib_standard/project/entry/src/main/resources/base/element/string.json b/compileruntime/util_lib_standard/src/main/resources/base/element/string.json similarity index 94% rename from compileruntime/url_lib_standard/project/entry/src/main/resources/base/element/string.json rename to compileruntime/util_lib_standard/src/main/resources/base/element/string.json index c0dd3a09e..0bae6bd40 100644 --- a/compileruntime/url_lib_standard/project/entry/src/main/resources/base/element/string.json +++ b/compileruntime/util_lib_standard/src/main/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] } \ No newline at end of file diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/app.js b/compileruntime/util_lib_standard/src/ohosTest/js/default/app.js similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/app.js rename to compileruntime/util_lib_standard/src/ohosTest/js/default/app.js diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json b/compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/en-US.json similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json rename to compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/en-US.json diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json b/compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json rename to compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css b/compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.css similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css rename to compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.css diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml b/compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.hml similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml rename to compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.hml diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js b/compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.js similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js rename to compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.js diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js b/compileruntime/util_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js similarity index 100% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js rename to compileruntime/util_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js diff --git a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/List.test.js b/compileruntime/util_lib_standard/src/ohosTest/js/test/List.test.js similarity index 92% rename from compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/List.test.js rename to compileruntime/util_lib_standard/src/ohosTest/js/test/List.test.js index d21d41758..86ae9fa26 100644 --- a/compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/List.test.js +++ b/compileruntime/util_lib_standard/src/ohosTest/js/test/List.test.js @@ -1,16 +1,16 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + require('./ExampleJsunit.test.js') \ No newline at end of file diff --git a/compileruntime/util_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json b/compileruntime/util_lib_standard/src/ohosTest/resources/base/element/string.json similarity index 93% rename from compileruntime/util_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json rename to compileruntime/util_lib_standard/src/ohosTest/resources/base/element/string.json index a1d8e0cb1..ee04e2875 100644 --- a/compileruntime/util_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json +++ b/compileruntime/util_lib_standard/src/ohosTest/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "app_name", - "value": "childprocess" - }, - { - "name": "mainability_description", - "value": "hap sample empty page" - } - ] -} +{ + "string": [ + { + "name": "app_name", + "value": "childprocess" + }, + { + "name": "mainability_description", + "value": "hap sample empty page" + } + ] +} diff --git a/compileruntime/worker_lib_standard/BUILD.gn b/compileruntime/worker_lib_standard/BUILD.gn index 74c9b2ba4..9fcf8c928 100644 --- a/compileruntime/worker_lib_standard/BUILD.gn +++ b/compileruntime/worker_lib_standard/BUILD.gn @@ -10,9 +10,29 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import("//test/xts/tools/build/suite.gni") +ohos_js_hap_suite("worker_js_hap") { + hap_profile = "./src/main/config.json" + deps = [ + ":worker_js_assets", + ":worker_resources", + ] + + # shared_libraries = [ + # "//third_party/giflib:libgif", + # "//third_party/libpng:libpng", + # ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "WorkerJSTest" -ohos_js_hap_suite("startup_worker_js_test") { - test_hap_name = "StartupWorkerJSApiTest" - hap_source_path = "hap/entry-debug-standard-unsigned.hap" + # part_name = "prebuilt_hap" + # subsystem_name = "xts" +} +ohos_js_assets("worker_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("worker_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" } diff --git a/compileruntime/worker_lib_standard/Test.json b/compileruntime/worker_lib_standard/Test.json index 35b00e6e0..92175f082 100644 --- a/compileruntime/worker_lib_standard/Test.json +++ b/compileruntime/worker_lib_standard/Test.json @@ -9,7 +9,7 @@ "kits": [ { "test-file-name": [ - "startup_worker_js_test.hap" + "WorkerJSTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/compileruntime/worker_lib_standard/hap/entry-debug-standard-unsigned.hap b/compileruntime/worker_lib_standard/hap/entry-debug-standard-unsigned.hap deleted file mode 100644 index 2dd20e91797124322c3e93ef891286a28e0a7f75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 235532 zcmeD^31E}O(gn&@L=HtjIlhLYDWpkT?sBFFP$+F_%h{BYCSTjoG$}b+DpUnUl-mRF zyB@YiS4-f@JMFbSQ`2U&R@66FAZOYU4+V?QY_wCNk&d$!v&d%(n z4zCj&5){-R2>wEo|1XjmGQL(&5dLcu)Hq0Qx3dnrhP60sr5YP+w>oVG)~+^LjO>(A z84ZK#1oiKt!+&Y4-C?zwnJ9H+bTq=c&3}k6{6A=T!npLOxwaGI)6?tF@3mfsPb_i~ zK5N5gDEx?o?+v;4&4WlEvq$Jn7Hy8nY;u$ad3x4^tAntb1r1BjPADvLlrnskRzZaT zKu-Z=8(F)-W-4-+td=0Gco+P`#yir+M1pE^^mbNL$Qn(0jmcoOsEaIlL3M-hYf!3e zfad*F`xy2U|3!KoASpb(!(lV!I2|x-1#GEo(8__W@d-BIXLsl=4!=OFeFg1+A*m4Z zr*5Q2{KP$87Ur5O&-!X}B-b=tQwnCsL!7u0Z8tyy267`8KWdd5Wi zE(_ard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0hT`+mOm$Z_%rB=a%o>I z!2c6lHyKQN)VjiFwa!eE^p8jc$sy$vB+8i25lI~6KPFFh$!o$avA~rj#L6xvR|Z83 z*WD6T9e+5Pyy=F+)pNTf{ny3cy>7Rkd3o*TS?TZJ`NS^NF2%HMkyS{?uJ$`!P4_L^ z1`NFDUbNyg_qREifgktnp1_v{Jbb`7m}2PTyUdOmtJj~m z9bB=ecw4_^rw1IW=of+>nrW5=d3k`3qHCxsIN_F{T1A545};;+fsyC&qChi+YV zr~M63H8ZLCPYmsjY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/config.json b/compileruntime/worker_lib_standard/src/main/config.json similarity index 95% rename from compileruntime/worker_lib_standard/project/entry/src/main/config.json rename to compileruntime/worker_lib_standard/src/main/config.json index d3dc9f3b3..18665aeb4 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/config.json +++ b/compileruntime/worker_lib_standard/src/main/config.json @@ -1,60 +1,60 @@ -{ - "app": { - "bundleName": "com.example.workerxts", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.workerxts", - "name": ".MyApplication", - "mainAbility": "com.example.workerxts.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "name": "com.example.workerxts.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index", - "pages/second/second" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } +{ + "app": { + "bundleName": "com.example.workerxts", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.workerxts", + "name": ".MyApplication", + "mainAbility": "com.example.workerxts.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "name": "com.example.workerxts.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "formsEnabled": false, + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index", + "pages/second/second" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } } \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/app.js b/compileruntime/worker_lib_standard/src/main/js/default/app.js similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/app.js rename to compileruntime/worker_lib_standard/src/main/js/default/app.js diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/en-US.json b/compileruntime/worker_lib_standard/src/main/js/default/i18n/en-US.json similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/en-US.json rename to compileruntime/worker_lib_standard/src/main/js/default/i18n/en-US.json diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json b/compileruntime/worker_lib_standard/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json rename to compileruntime/worker_lib_standard/src/main/js/default/i18n/zh-CN.json diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.css b/compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.css similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.css rename to compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.css diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.hml b/compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.hml similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.hml rename to compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.hml diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.js b/compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.js similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.js rename to compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.js diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.css b/compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.css similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.css rename to compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.css diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.hml b/compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.hml similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.hml rename to compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.hml diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.js b/compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.js similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.js rename to compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.js diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker.js index 178918c03..461c65677 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker.js @@ -1,66 +1,66 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - function foo(x) {return x} - - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - console.info("worker:: new version") - - parentPort.onclose = function() { - console.info("worker::worker.js onclose"); - } - - parentPort.onmessage = function(e) { - var data = e.data; - console.info("worker:: worker thread worker data is " + data.data); - switch(data.type) { - case "normal": - console.info("worker:: worker thread receive data " + data.data); - parentPort.postMessage(data); - console.info("worker:: worker thread post back"); - break; - case "error": - throw new Error("123"); - break; - case "buffer": - console.info("worker:: worker.js receive buffer length is " + data.data.byteLength); - parentPort.postMessage(data, [data.data]); - console.info("worker:: worker.js post buffer length is " + data.data.byteLength); - break; - default: - console.info("worker:: worker.js receive unknow type"); - break - } - } - - // 反序列错误 - parentPort.onmessageerror = function() { - console.info("worker:: worker.js onmessageerror"); - } - - // js执行异常 - parentPort.onerror = function(data) { - console.info("worker:: worker.js onerror " + data.lineno + ", msg = " + data.message + ", filename = " + data.filename + ", colno = " + data.colno); - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + function foo(x) {return x} + + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + console.info("worker:: new version") + + parentPort.onclose = function() { + console.info("worker::worker.js onclose"); + } + + parentPort.onmessage = function(e) { + var data = e.data; + console.info("worker:: worker thread worker data is " + data.data); + switch(data.type) { + case "normal": + console.info("worker:: worker thread receive data " + data.data); + parentPort.postMessage(data); + console.info("worker:: worker thread post back"); + break; + case "error": + throw new Error("123"); + break; + case "buffer": + console.info("worker:: worker.js receive buffer length is " + data.data.byteLength); + parentPort.postMessage(data, [data.data]); + console.info("worker:: worker.js post buffer length is " + data.data.byteLength); + break; + default: + console.info("worker:: worker.js receive unknow type"); + break + } + } + + // 反序列错误 + parentPort.onmessageerror = function() { + console.info("worker:: worker.js onmessageerror"); + } + + // js执行异常 + parentPort.onerror = function(data) { + console.info("worker:: worker.js onerror " + data.lineno + ", msg = " + data.message + ", filename = " + data.filename + ", colno = " + data.colno); + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_002.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_002.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_002.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker_002.js index b4d4dac2e..5914eea6d 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_002.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_002.js @@ -1,32 +1,32 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - console.log("worker:: run script"); - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - parentPort.onmessage = function(e) { - console.log("worker:: worker receive data " + e.data); - var data = e.data + " worker"; - parentPort.postMessage(data) - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + console.log("worker:: run script"); + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + parentPort.onmessage = function(e) { + console.log("worker:: worker receive data " + e.data); + var data = e.data + " worker"; + parentPort.postMessage(data) + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_003.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_003.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_003.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker_003.js index 4bd01e96b..a680ac178 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_003.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_003.js @@ -1,30 +1,30 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - parentPort.onmessage = function(e) { - var data = e.data * 2 + 1 - parentPort.postMessage(data) - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + parentPort.onmessage = function(e) { + var data = e.data * 2 + 1 + parentPort.postMessage(data) + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_004.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_004.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_004.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker_004.js index de3fdc760..49e442384 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_004.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_004.js @@ -1,31 +1,31 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - parentPort.onmessage = function(e) { - var data = e.data; - data.message = "hello world " + "worker" - parentPort.postMessage(data) - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + parentPort.onmessage = function(e) { + var data = e.data; + data.message = "hello world " + "worker" + parentPort.postMessage(data) + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_005.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_005.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_005.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker_005.js index d5414270e..cc1cbaaad 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_005.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_005.js @@ -1,29 +1,29 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - parentPort.onmessage = function(e) { - parentPort.postMessage(name) - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + parentPort.onmessage = function(e) { + parentPort.postMessage(name) + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_006.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_006.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_006.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker_006.js index bc79a4796..6b9ce1e02 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_006.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_006.js @@ -1,29 +1,29 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - parentPort.onmessage = function(e) { - parentPort.postMessage("hello world") - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + parentPort.onmessage = function(e) { + parentPort.postMessage("hello world") + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_007.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_007.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_007.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker_007.js index f3163c5bd..9d5790347 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_007.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_007.js @@ -1,29 +1,29 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - parentPort.onmessage = function(e) { - throw new Error(123) - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + parentPort.onmessage = function(e) { + throw new Error(123) + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_008.js b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_008.js similarity index 97% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_008.js rename to compileruntime/worker_lib_standard/src/main/js/default/workers/worker_008.js index fa3ce5a35..02d4825b9 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_008.js +++ b/compileruntime/worker_lib_standard/src/main/js/default/workers/worker_008.js @@ -1,29 +1,29 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - /*!********************************************************************************************!*\ - !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! - \********************************************************************************************/ - var worker = globalThis.requireNapi('worker'); - - const parentPort = worker.parentPort; - - parentPort.onmessage = function(e) { - parentPort.close() - } - /******/ })() +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******/ (() => { // webpackBootstrap + var __webpack_exports__ = {}; + /*!********************************************************************************************!*\ + !*** d:\workspace\my_works\MyApplication\entry\src\main\ets\default\workers\WorkerDemo.js ***! + \********************************************************************************************/ + var worker = globalThis.requireNapi('worker'); + + const parentPort = worker.parentPort; + + parentPort.onmessage = function(e) { + parentPort.close() + } + /******/ })() ; \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js b/compileruntime/worker_lib_standard/src/main/js/test/ExampleJsunit.test.js similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js rename to compileruntime/worker_lib_standard/src/main/js/test/ExampleJsunit.test.js diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/test/List.test.js b/compileruntime/worker_lib_standard/src/main/js/test/List.test.js similarity index 93% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/test/List.test.js rename to compileruntime/worker_lib_standard/src/main/js/test/List.test.js index 2fbe075f9..f0714ab28 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/test/List.test.js +++ b/compileruntime/worker_lib_standard/src/main/js/test/List.test.js @@ -1,17 +1,17 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./ExampleJsunit.test.js') +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require('./ExampleJsunit.test.js') require("./Worker.test.js") \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/js/test/Worker.test.js b/compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js similarity index 96% rename from compileruntime/worker_lib_standard/project/entry/src/main/js/test/Worker.test.js rename to compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js index a878e9c51..0b5a96cd7 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/js/test/Worker.test.js +++ b/compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js @@ -1,546 +1,546 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// @ts-nocheck -import app from '@system.app' -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -//import worker from "@ohos.worker"; -var worker = globalThis.requireNapi('worker'); - -describe('workerTest', function () { - - afterAll(function () { - console.info('total case over') - }) - - function PromiseCase() { - let p = new Promise(function (resolve, reject) { - setTimeout(function () { - resolve() - }, 100); - }).then(undefined, (error) => { - }) - return p - } - - // check worker constructor is ok - it('worker_constructor_test_001', 0, function () { - var ss = new worker.Worker("workers/worker.js") - expect(ss != null).assertTrue() - }) - - it('worker_constructor_test_002', 0, function () { - var ss = new worker.Worker("workers/worker.js",{name:"second worker",shared:"False"}) - expect(ss != null).assertTrue() - }) - - it('worker_constructor_test_003', 0, function () { - var ss = new worker.Worker("workers/worker.js",{type:"classic",name:"second worker",shared:"false"}) - expect(ss != null).assertTrue() - }) - - it('worker_constructor_test_004', 0, function () { - var ss = new worker.Worker("workers/worker.js",{type:"classic",name:"third worker",shared:"true"}) - expect(ss != null).assertTrue() - }) - - // check postMessage is ok - // main post "hello world", will receive "hello world worker" - it('worker_postMessage_test_001', 0, async function (done) { - var ss = new worker.Worker("workers/worker_002.js"); - - var res = undefined - var flag = false - - ss.onmessage = function (e) { - res = e.data; - flag = true - } - - ss.postMessage("hello world") - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual("hello world worker") - done() - }) - - // check postMessage is ok - // main post 12 , will receive 12 * 2 + 1 - it('worker_postMessage_test_002', 0, async function (done) { - var ss = new worker.Worker("workers/worker_003.js"); - - var res = undefined - var flag = false - - ss.onmessage = function (e) { - res = e.data; - flag = true - } - - ss.postMessage(12) - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual(25) - done() - }) - - // check postMessage is ok - // main post {message:"hello world"} , will receive {message:"hello world worker"} - it('worker_postMessage_test_003', 0, async function (done) { - var ss = new worker.Worker("workers/worker_004.js"); - - var res = undefined - var flag = false - - ss.onmessage = function (e) { - res = e.data.message; - flag = true - } - - ss.postMessage({"message":"hello world"}) - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual("hello world worker") - done() - }) - - // check worker name is ok - it('worker_postMessage_test_004', 0, async function (done) { - var ss = new worker.Worker("workers/worker_005.js", {name: "zhangsan"}); - - var res = undefined - var flag = false - - ss.onmessage = function (e) { - res = e.data; - flag = true - } - - ss.postMessage("hello world") - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual("zhangsan") - done() - }) - - // check worker transfer buffer is ok - it('worker_postMessage_test_005', 0, function () { - var ss = new worker.Worker("workers/worker_006.js"); - - const buffer = new ArrayBuffer(8) - expect(buffer.byteLength).assertEqual(8) - ss.postMessage(buffer, [buffer]) - expect(buffer.byteLength).assertEqual(0) - }) - - // check worker handle error is ok - it('worker_postMessage_test_006', 0, async function (done) { - var ss = new worker.Worker("workers/worker_007.js"); - - var res = undefined - var flag = false - - ss.onerror = function (e) { - res = e.message; - flag = true - } - - ss.postMessage("hello world") - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual("Error: 123") - done() - }) - - // check worker terminate is ok - it('worker_terminate_test_001', 0, async function (done) { - var ss = new worker.Worker("workers/worker.js"); - var res = 0 - var flag = false - - ss.onexit = function () { - flag = true - res++; - } - ss.terminate() - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual(1) - done() - }) - - // check worker terminate is ok - it('worker_terminate_test_002', 0, async function (done) { - var ss = new worker.Worker("workers/worker.js"); - var res = 0 - var flag = false - - ss.onexit = function () { - flag = true - res++; - } - - // Repeated execution terminate - ss.terminate() - ss.terminate() - - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual(1) - done() - }) - - // check worker terminate is ok - it('worker_terminate_test_003', 0, async function (done) { - var ss = new worker.Worker("workers/worker.js"); - var res = 0 - var flag = false - - ss.onexit = function () { - flag = true - res++; - } - - ss.onmessage = function (e) { - res++; - } - - ss.terminate() - while (!flag) { - await PromiseCase() - } - expect(res).assertEqual(1) - - ss.postMessage("hello world") - await PromiseCase() - expect(res).assertEqual(1) - done() - }) - - // check worker on function is ok - it('worker_on_test_001', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.on("zhangsan", ()=>{ - times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - - expect(times).assertEqual(1) - }) - - // check worker on function is ok - it('worker_on_test_002', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.on("zhangsan", ()=>{ - times--; - }) - - ss.on("lisi", ()=>{ - times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "lisi"}) - - expect(times).assertEqual(0) - }) - - // check worker on function is ok - it('worker_on_test_003', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.on("zhangsan", ()=>{ - times++; - }) - - for (var i=0;i<10;i++) - { - ss.dispatchEvent({type: "zhangsan"}) - } - console.log("times " + times); - expect(times).assertEqual(10) - }) - - // check worker once function is ok - it('worker_once_test_001', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.once("zhangsan", ()=>{ - times++; - }) - ss.dispatchEvent({type: "zhangsan"}) - expect(times).assertEqual(1) - }) - - // check worker once function is ok - it('worker_once_test_002', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.once("zhangsan", ()=>{ - times++; - }) - - for (var i=0;i<10;i++) - { - ss.dispatchEvent({type: "zhangsan"}) - } - - expect(times).assertEqual(1) - }) - - it('worker_once_test_003', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.once("zhangsan", ()=>{ - times--; - }) - - ss.once("lisi", ()=>{ - times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "lisi"}) - - expect(times).assertEqual(0) - }) - - // check worker addEventListener function is ok - it('worker_addEventListener_test_001', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.addEventListener("zhangsan", ()=>{ - times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "zhangsan"}) - - expect(times).assertEqual(2) - }) - - // check worker addEventListener function is ok - it('worker_addEventListener_test_002', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.addEventListener("zhangsan", ()=>{ - times++; - }) - - ss.addEventListener("lisi", ()=>{ - times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "lisi"}) - - expect(times).assertEqual(2) - }) - - // check worker addEventListener function is ok - it('worker_addEventListener_test_003', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var times = 0; - ss.addEventListener("zhangsan", ()=>{ - times++; - }) - - for (var i=0;i<10;i++) - { - ss.dispatchEvent({type: "zhangsan"}) - } - - expect(times).assertEqual(10) - }) - - // check worker removeEventListener function is ok - it('worker_removeListener_test_001', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var zhangsan_times = 0; - ss.addEventListener("zhangsan", ()=>{ - zhangsan_times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - expect(zhangsan_times).assertEqual(1) - - ss.removeEventListener("zhangsan") - - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "zhangsan"}) - expect(zhangsan_times).assertEqual(1) - }) - - // check worker removeEventListener function is ok - it('worker_removeListener_test_002', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var zhangsan_times = 0; - ss.addEventListener("zhangsan", ()=>{ - zhangsan_times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "zhangsan"}) - expect(zhangsan_times).assertEqual(2) - - for (var i=0;i<3;i++) - { - ss.removeEventListener("zhangsan") - } - - ss.dispatchEvent({type: "zhangsan"}) - expect(zhangsan_times).assertEqual(2) - - }) - - // check worker removeAllListener function is ok - it('worker_removeListener_test_003', 0, function () { - var ss = new worker.Worker("workers/worker.js"); - - var zhangsan_times = 0; - ss.addEventListener("zhangsan", ()=>{ - zhangsan_times++; - }) - - var lisi_times = 0; - ss.addEventListener("lisi", ()=>{ - lisi_times++; - }) - - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "zhangsan"}) - expect(zhangsan_times).assertEqual(2) - - ss.dispatchEvent({type: "lisi"}) - ss.dispatchEvent({type: "lisi"}) - expect(lisi_times).assertEqual(2) - - ss.removeAllListener() - ss.dispatchEvent({type: "zhangsan"}) - ss.dispatchEvent({type: "zhangsan"}) - expect(zhangsan_times).assertEqual(2) - - ss.dispatchEvent({type: "lisi"}) - ss.dispatchEvent({type: "lisi"}) - expect(lisi_times).assertEqual(2) - }) - - // check parentPort.close is ok - it('worker_parentPortClose_test_001', 0, async function (done) { - var ss = new worker.Worker("workers/worker_008.js"); - var res = 0 - - ss.onmessage = function (e) { - res++; - } - - ss.postMessage("abc") - await PromiseCase() - expect(res).assertEqual(0) - done() - }) - - // check parentPort.close is ok - it('worker_parentPortClose_test_002', 0, async function (done) { - var ss1 = new worker.Worker("workers/worker_008.js"); - var ss2 = new worker.Worker("workers/worker_008.js"); - var res = 0 - var times = 0 - - ss1.onmessage = function (e) { - res++; - } - - ss1.postMessage("abc") - await PromiseCase() - expect(res).assertEqual(0) - - ss2.postMessage("hello world") - await PromiseCase() - expect(res).assertEqual(0) - - done() - }) - - // check parentPort.close is ok - it('worker_parentPortClose_test_003', 0, async function (done) { - var ss1 = new worker.Worker("workers/worker_008.js"); - var ss2 = new worker.Worker("workers/worker_008.js"); - var res = 0 - var times = 0 - - ss1.onmessage = function (e) { - res++; - } - - ss1.postMessage("abc") - await PromiseCase() - expect(res).assertEqual(0) - - ss2.addEventListener("zhangsan", ()=>{ - times++; - }) - - ss2.dispatchEvent({type: "zhangsan"}) - expect(times).assertEqual(1) - done() - }) - - // check parentPort.close is ok - it('worker_parentPortClose_test_004', 0, async function (done) { - var ss = new worker.Worker("workers/worker_008.js"); - var res = 0 - var flag = false; - - ss.onexit = function () { - flag = true - } - - ss.onmessage = function (e) { - res++; - } - - ss.postMessage("abc") - while (!flag) { - await PromiseCase() - } - - ss.postMessage("hello") - await PromiseCase() - expect(res).assertEqual(0) - done() - }) +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// @ts-nocheck +import app from '@system.app' +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' +//import worker from "@ohos.worker"; +var worker = globalThis.requireNapi('worker'); + +describe('workerTest', function () { + + afterAll(function () { + console.info('total case over') + }) + + function PromiseCase() { + let p = new Promise(function (resolve, reject) { + setTimeout(function () { + resolve() + }, 100); + }).then(undefined, (error) => { + }) + return p + } + + // check worker constructor is ok + it('worker_constructor_test_001', 0, function () { + var ss = new worker.Worker("workers/worker.js") + expect(ss != null).assertTrue() + }) + + it('worker_constructor_test_002', 0, function () { + var ss = new worker.Worker("workers/worker.js",{name:"second worker",shared:"False"}) + expect(ss != null).assertTrue() + }) + + it('worker_constructor_test_003', 0, function () { + var ss = new worker.Worker("workers/worker.js",{type:"classic",name:"second worker",shared:"false"}) + expect(ss != null).assertTrue() + }) + + it('worker_constructor_test_004', 0, function () { + var ss = new worker.Worker("workers/worker.js",{type:"classic",name:"third worker",shared:"true"}) + expect(ss != null).assertTrue() + }) + + // check postMessage is ok + // main post "hello world", will receive "hello world worker" + it('worker_postMessage_test_001', 0, async function (done) { + var ss = new worker.Worker("workers/worker_002.js"); + + var res = undefined + var flag = false + + ss.onmessage = function (e) { + res = e.data; + flag = true + } + + ss.postMessage("hello world") + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual("hello world worker") + done() + }) + + // check postMessage is ok + // main post 12 , will receive 12 * 2 + 1 + it('worker_postMessage_test_002', 0, async function (done) { + var ss = new worker.Worker("workers/worker_003.js"); + + var res = undefined + var flag = false + + ss.onmessage = function (e) { + res = e.data; + flag = true + } + + ss.postMessage(12) + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual(25) + done() + }) + + // check postMessage is ok + // main post {message:"hello world"} , will receive {message:"hello world worker"} + it('worker_postMessage_test_003', 0, async function (done) { + var ss = new worker.Worker("workers/worker_004.js"); + + var res = undefined + var flag = false + + ss.onmessage = function (e) { + res = e.data.message; + flag = true + } + + ss.postMessage({"message":"hello world"}) + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual("hello world worker") + done() + }) + + // check worker name is ok + it('worker_postMessage_test_004', 0, async function (done) { + var ss = new worker.Worker("workers/worker_005.js", {name: "zhangsan"}); + + var res = undefined + var flag = false + + ss.onmessage = function (e) { + res = e.data; + flag = true + } + + ss.postMessage("hello world") + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual("zhangsan") + done() + }) + + // check worker transfer buffer is ok + it('worker_postMessage_test_005', 0, function () { + var ss = new worker.Worker("workers/worker_006.js"); + + const buffer = new ArrayBuffer(8) + expect(buffer.byteLength).assertEqual(8) + ss.postMessage(buffer, [buffer]) + expect(buffer.byteLength).assertEqual(0) + }) + + // check worker handle error is ok + it('worker_postMessage_test_006', 0, async function (done) { + var ss = new worker.Worker("workers/worker_007.js"); + + var res = undefined + var flag = false + + ss.onerror = function (e) { + res = e.message; + flag = true + } + + ss.postMessage("hello world") + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual("Error: 123") + done() + }) + + // check worker terminate is ok + it('worker_terminate_test_001', 0, async function (done) { + var ss = new worker.Worker("workers/worker.js"); + var res = 0 + var flag = false + + ss.onexit = function () { + flag = true + res++; + } + ss.terminate() + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual(1) + done() + }) + + // check worker terminate is ok + it('worker_terminate_test_002', 0, async function (done) { + var ss = new worker.Worker("workers/worker.js"); + var res = 0 + var flag = false + + ss.onexit = function () { + flag = true + res++; + } + + // Repeated execution terminate + ss.terminate() + ss.terminate() + + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual(1) + done() + }) + + // check worker terminate is ok + it('worker_terminate_test_003', 0, async function (done) { + var ss = new worker.Worker("workers/worker.js"); + var res = 0 + var flag = false + + ss.onexit = function () { + flag = true + res++; + } + + ss.onmessage = function (e) { + res++; + } + + ss.terminate() + while (!flag) { + await PromiseCase() + } + expect(res).assertEqual(1) + + ss.postMessage("hello world") + await PromiseCase() + expect(res).assertEqual(1) + done() + }) + + // check worker on function is ok + it('worker_on_test_001', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.on("zhangsan", ()=>{ + times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + + expect(times).assertEqual(1) + }) + + // check worker on function is ok + it('worker_on_test_002', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.on("zhangsan", ()=>{ + times--; + }) + + ss.on("lisi", ()=>{ + times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "lisi"}) + + expect(times).assertEqual(0) + }) + + // check worker on function is ok + it('worker_on_test_003', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.on("zhangsan", ()=>{ + times++; + }) + + for (var i=0;i<10;i++) + { + ss.dispatchEvent({type: "zhangsan"}) + } + console.log("times " + times); + expect(times).assertEqual(10) + }) + + // check worker once function is ok + it('worker_once_test_001', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.once("zhangsan", ()=>{ + times++; + }) + ss.dispatchEvent({type: "zhangsan"}) + expect(times).assertEqual(1) + }) + + // check worker once function is ok + it('worker_once_test_002', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.once("zhangsan", ()=>{ + times++; + }) + + for (var i=0;i<10;i++) + { + ss.dispatchEvent({type: "zhangsan"}) + } + + expect(times).assertEqual(1) + }) + + it('worker_once_test_003', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.once("zhangsan", ()=>{ + times--; + }) + + ss.once("lisi", ()=>{ + times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "lisi"}) + + expect(times).assertEqual(0) + }) + + // check worker addEventListener function is ok + it('worker_addEventListener_test_001', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.addEventListener("zhangsan", ()=>{ + times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "zhangsan"}) + + expect(times).assertEqual(2) + }) + + // check worker addEventListener function is ok + it('worker_addEventListener_test_002', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.addEventListener("zhangsan", ()=>{ + times++; + }) + + ss.addEventListener("lisi", ()=>{ + times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "lisi"}) + + expect(times).assertEqual(2) + }) + + // check worker addEventListener function is ok + it('worker_addEventListener_test_003', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var times = 0; + ss.addEventListener("zhangsan", ()=>{ + times++; + }) + + for (var i=0;i<10;i++) + { + ss.dispatchEvent({type: "zhangsan"}) + } + + expect(times).assertEqual(10) + }) + + // check worker removeEventListener function is ok + it('worker_removeListener_test_001', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var zhangsan_times = 0; + ss.addEventListener("zhangsan", ()=>{ + zhangsan_times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + expect(zhangsan_times).assertEqual(1) + + ss.removeEventListener("zhangsan") + + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "zhangsan"}) + expect(zhangsan_times).assertEqual(1) + }) + + // check worker removeEventListener function is ok + it('worker_removeListener_test_002', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var zhangsan_times = 0; + ss.addEventListener("zhangsan", ()=>{ + zhangsan_times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "zhangsan"}) + expect(zhangsan_times).assertEqual(2) + + for (var i=0;i<3;i++) + { + ss.removeEventListener("zhangsan") + } + + ss.dispatchEvent({type: "zhangsan"}) + expect(zhangsan_times).assertEqual(2) + + }) + + // check worker removeAllListener function is ok + it('worker_removeListener_test_003', 0, function () { + var ss = new worker.Worker("workers/worker.js"); + + var zhangsan_times = 0; + ss.addEventListener("zhangsan", ()=>{ + zhangsan_times++; + }) + + var lisi_times = 0; + ss.addEventListener("lisi", ()=>{ + lisi_times++; + }) + + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "zhangsan"}) + expect(zhangsan_times).assertEqual(2) + + ss.dispatchEvent({type: "lisi"}) + ss.dispatchEvent({type: "lisi"}) + expect(lisi_times).assertEqual(2) + + ss.removeAllListener() + ss.dispatchEvent({type: "zhangsan"}) + ss.dispatchEvent({type: "zhangsan"}) + expect(zhangsan_times).assertEqual(2) + + ss.dispatchEvent({type: "lisi"}) + ss.dispatchEvent({type: "lisi"}) + expect(lisi_times).assertEqual(2) + }) + + // check parentPort.close is ok + it('worker_parentPortClose_test_001', 0, async function (done) { + var ss = new worker.Worker("workers/worker_008.js"); + var res = 0 + + ss.onmessage = function (e) { + res++; + } + + ss.postMessage("abc") + await PromiseCase() + expect(res).assertEqual(0) + done() + }) + + // check parentPort.close is ok + it('worker_parentPortClose_test_002', 0, async function (done) { + var ss1 = new worker.Worker("workers/worker_008.js"); + var ss2 = new worker.Worker("workers/worker_008.js"); + var res = 0 + var times = 0 + + ss1.onmessage = function (e) { + res++; + } + + ss1.postMessage("abc") + await PromiseCase() + expect(res).assertEqual(0) + + ss2.postMessage("hello world") + await PromiseCase() + expect(res).assertEqual(0) + + done() + }) + + // check parentPort.close is ok + it('worker_parentPortClose_test_003', 0, async function (done) { + var ss1 = new worker.Worker("workers/worker_008.js"); + var ss2 = new worker.Worker("workers/worker_008.js"); + var res = 0 + var times = 0 + + ss1.onmessage = function (e) { + res++; + } + + ss1.postMessage("abc") + await PromiseCase() + expect(res).assertEqual(0) + + ss2.addEventListener("zhangsan", ()=>{ + times++; + }) + + ss2.dispatchEvent({type: "zhangsan"}) + expect(times).assertEqual(1) + done() + }) + + // check parentPort.close is ok + it('worker_parentPortClose_test_004', 0, async function (done) { + var ss = new worker.Worker("workers/worker_008.js"); + var res = 0 + var flag = false; + + ss.onexit = function () { + flag = true + } + + ss.onmessage = function (e) { + res++; + } + + ss.postMessage("abc") + while (!flag) { + await PromiseCase() + } + + ss.postMessage("hello") + await PromiseCase() + expect(res).assertEqual(0) + done() + }) }) \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/resources/base/element/string.json b/compileruntime/worker_lib_standard/src/main/resources/base/element/string.json similarity index 94% rename from compileruntime/worker_lib_standard/project/entry/src/main/resources/base/element/string.json rename to compileruntime/worker_lib_standard/src/main/resources/base/element/string.json index c0dd3a09e..0bae6bd40 100644 --- a/compileruntime/worker_lib_standard/project/entry/src/main/resources/base/element/string.json +++ b/compileruntime/worker_lib_standard/src/main/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] } \ No newline at end of file diff --git a/compileruntime/worker_lib_standard/project/entry/src/main/resources/base/media/icon.png b/compileruntime/worker_lib_standard/src/main/resources/base/media/icon.png similarity index 100% rename from compileruntime/worker_lib_standard/project/entry/src/main/resources/base/media/icon.png rename to compileruntime/worker_lib_standard/src/main/resources/base/media/icon.png -- GitLab