• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 
16 #ifndef TEST_UNITTEST_CORE_EVENT_FOCUS_API_TEST_H
17 #define TEST_UNITTEST_CORE_EVENT_FOCUS_API_TEST_H
18 #include <cstddef>
19 #include <cstdint>
20 
21 #include "test/unittest/core/event/focus_core/focus_test_base.h"
22 #include "gtest/gtest.h"
23 #include "base/geometry/ng/offset_t.h"
24 #include "base/geometry/ng/size_t.h"
25 #include "base/memory/ace_type.h"
26 #include "base/memory/referenced.h"
27 #include "core/components/theme/app_theme.h"
28 #include "core/components_ng/base/frame_node.h"
29 #include "core/components_ng/event/focus_hub.h"
30 #include "core/components_ng/event/touch_event.h"
31 #include "core/components_ng/manager/focus/focus_view.h"
32 #include "core/components_ng/pattern/pattern.h"
33 #include "test/mock/core/common/mock_theme_manager.h"
34 #include "core/components_v2/inspector/inspector_constants.h"
35 #include "core/event/key_event.h"
36 #include "core/pipeline_ng/pipeline_context.h"
37 #include "test/mock/core/pipeline/mock_pipeline_context.h"
38 #include "core/components_ng/pattern/linear_layout/linear_layout_pattern.h"
39 #include "test/unittest/core/event/frame_node_on_tree.h"
40 
41 namespace OHOS::Ace::NG {
42 
43 class FocusApiTestNG : public FocusTestBaseNg, public testing::Test {
44 public:
45     static void SetUpTestSuite();
46     static void TearDownTestSuite();
47     testing::AssertionResult IsRequestImmediatelyByIdStateEqual(int32_t caseNum,
48         const std::vector<bool>& actualState, const std::vector<bool>& expectState);
49 };
50 } // namespace OHOS::Ace::NG
51 
52 #endif //TEST_UNITTEST_CORE_EVENT_FOCUS_HUB_TEST_NG_H