1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef TEST_COMMON_H 16 #define TEST_COMMON_H 17 #include "location_button.h" 18 #include "paste_button.h" 19 #include "save_button.h" 20 21 namespace OHOS { 22 namespace Security { 23 namespace SecurityComponent { 24 class TestCommon { 25 public: 26 static constexpr float TEST_SIZE = 100.0; 27 static constexpr double TEST_COORDINATE = 100.0; 28 static constexpr double TEST_DIMENSION = 100.0; 29 static constexpr uint32_t TEST_COLOR = 0xffffffff; 30 static constexpr uint32_t TEST_COLOR_YELLOW = 0xffffff00; 31 static constexpr uint32_t TEST_COLOR_RED = 0xffff0000; 32 static constexpr uint32_t TEST_COLOR_BLUE = 0xff0000ff; 33 static constexpr uint32_t TEST_DIFF_COLOR = 0; 34 static constexpr uint64_t TIME_CONVERSION_UNIT = 1000; 35 static constexpr uint32_t HAP_TOKEN_ID = 537715419; 36 static constexpr uint32_t MAX_HMAC_SIZE = 64; 37 static constexpr size_t MAX_CALLER_SIZE = 10; 38 39 static void BuildLocationComponentInfo(nlohmann::json& jsonComponent); 40 static void BuildSaveComponentInfo(nlohmann::json& jsonComponent); 41 static void BuildPasteComponentInfo(nlohmann::json& jsonComponent); 42 }; 43 } // namespace SecurityComponent 44 } // namespace Security 45 } // namespace OHOS 46 #endif // TEST_COMMON_H 47