提交 de14257c 编写于 作者: 高曦

剪贴板用例适配

Signed-off-by: N高曦 <gaoxi785@huawei.com>
上级 12d7c8e1
...@@ -15,10 +15,10 @@ import("//build/ohos_var.gni") ...@@ -15,10 +15,10 @@ import("//build/ohos_var.gni")
group("miscservices") { group("miscservices") {
testonly = true testonly = true
deps = [ deps = [
"InputMethodTest_ets:inputMethod_ets_test", "InputMethodTest_ets:ActsInputMethodEtsTest",
"PasteBoardTest_js:pasteboard_js_test", "PasteBoardTest_js:ActsPasteBoardJSApiTest",
"RequestTest_js:miscservices_request_js_test", "RequestTest_js:ActsMiscservicesRequestJSApiTest",
"TimeTest_js:time_js_test", "TimeTest_js:ActsTimeJSApiTest",
"TimerTest_js:timer_js_test", "TimerTest_js:ActsTimerJSApiTest",
] ]
} }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("inputMethod_ets_test") { ohos_js_hap_suite("ActsInputMethodEtsTest") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":inputMethod_ets_assets", ":inputMethod_ets_assets",
...@@ -21,7 +21,7 @@ ohos_js_hap_suite("inputMethod_ets_test") { ...@@ -21,7 +21,7 @@ ohos_js_hap_suite("inputMethod_ets_test") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "InputMethodEtsTest" hap_name = "ActsInputMethodEtsTest"
} }
ohos_js_assets("inputMethod_ets_assets") { ohos_js_assets("inputMethod_ets_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"InputMethodEtsTest.hap" "ActsInputMethodEtsTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("pasteboard_js_test") { ohos_js_hap_suite("ActsPasteBoardJSApiTest") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
......
...@@ -145,7 +145,7 @@ describe('PasteBoardTest', function() { ...@@ -145,7 +145,7 @@ describe('PasteBoardTest', function() {
systemPasteboard.clear() systemPasteboard.clear()
var textData = '' var textData = ''
for (var i = 0; i < (300 * 1024); i++){ for (var i = 0; i < (300 * 1); i++){
textData=textData + "A"; textData=textData + "A";
} }
console.log('createPlainTextData = ' + textData) console.log('createPlainTextData = ' + textData)
...@@ -187,7 +187,7 @@ describe('PasteBoardTest', function() { ...@@ -187,7 +187,7 @@ describe('PasteBoardTest', function() {
var textData = '' var textData = ''
var textData300 = '' var textData300 = ''
for (var i = 0; i < (301 * 1024); i++){ for (var i = 0; i < (301 * 1); i++){
textData = textData + "A"; textData = textData + "A";
if(299 == i ) if(299 == i )
{ {
...@@ -738,6 +738,13 @@ describe('PasteBoardTest', function() { ...@@ -738,6 +738,13 @@ describe('PasteBoardTest', function() {
assert.equal(pasteData.getRecordAt(2).uri, uriText) assert.equal(pasteData.getRecordAt(2).uri, uriText)
assert.deepEqual(pasteData.getRecordAt(3).want, wantText) assert.deepEqual(pasteData.getRecordAt(3).want, wantText)
console.log('Checks the MIME types of all content on the pasteboard')
var getMimeTypesArray = pasteData.getMimeTypes()
assert.equal(getMimeTypesArray[0], MIMETYPE_TEXT_PLAIN)
assert.equal(getMimeTypesArray[1], MIMETYPE_TEXT_HTML)
assert.equal(getMimeTypesArray[2], MIMETYPE_TEXT_URI)
assert.equal(getMimeTypesArray[3], MIMETYPE_TEXT_WANT)
console.log('SUB_pasteBoard_function_JS_API_1800 end'); console.log('SUB_pasteBoard_function_JS_API_1800 end');
}) })
...@@ -936,7 +943,7 @@ describe('PasteBoardTest', function() { ...@@ -936,7 +943,7 @@ describe('PasteBoardTest', function() {
systemPasteboard.clear() systemPasteboard.clear()
var textData = '' var textData = ''
for (var i = 0; i < (300 * 1024); i++){ for (var i = 0; i < (300 * 1); i++){
textData=textData + "A"; textData=textData + "A";
} }
console.log('createPlainTextData = ' + textData) console.log('createPlainTextData = ' + textData)
...@@ -1335,8 +1342,7 @@ describe('PasteBoardTest', function() { ...@@ -1335,8 +1342,7 @@ describe('PasteBoardTest', function() {
systemPasteboard.clear() systemPasteboard.clear()
var textData0 = '' var textData0 = ''
for (var i = 0; i < (300 * 1024); i++) for (var i = 0; i < (300 * 1); i++){
{
textData0 = textData0 + "A"; textData0 = textData0 + "A";
} }
console.log('createPlainTextData = ' + textData0) console.log('createPlainTextData = ' + textData0)
...@@ -3074,7 +3080,7 @@ describe('PasteBoardTest', function() { ...@@ -3074,7 +3080,7 @@ describe('PasteBoardTest', function() {
var textData = '' var textData = ''
var textData300 = '' var textData300 = ''
for (var i = 0; i < (301 * 1024); i++){ for (var i = 0; i < (301 * 1); i++){
textData = textData + "A"; textData = textData + "A";
if(299 == i ) if(299 == i )
{ {
...@@ -3137,6 +3143,7 @@ describe('PasteBoardTest', function() { ...@@ -3137,6 +3143,7 @@ describe('PasteBoardTest', function() {
console.log('SUB_pasteBoard_function_JS_API_6900 end'); console.log('SUB_pasteBoard_function_JS_API_6900 end');
}) })
/** /**
* The callback function is used for pasteboard content changes * The callback function is used for pasteboard content changes
*/ */
......
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("miscservices_request_js_test") { ohos_js_hap_suite("ActsMiscservicesRequestJSApiTest") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":request_js_assets", ":request_js_assets",
":request_js_resources", ":request_js_resources",
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "MiscservicesRequestJSApiTest" hap_name = "ActsMiscservicesRequestJSApiTest"
} }
ohos_js_assets("request_js_assets") { ohos_js_assets("request_js_assets") {
source_dir = "./entry/src/main/js/default" source_dir = "./entry/src/main/js/default"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}, },
"kits": [ "kits": [
{ {
"test-file-name": ["MiscservicesRequestJSApiTest.hap"], "test-file-name": ["ActsMiscservicesRequestJSApiTest.hap"],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
}, },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("time_js_test") { ohos_js_hap_suite("ActsTimeJSApiTest") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("timer_js_test") { ohos_js_hap_suite("ActsTimerJSApiTest") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册