1 /*
2  * Copyright (c) 2020-2021 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 UI_TEST_UI_LIST_VIEW_H
17 #define UI_TEST_UI_LIST_VIEW_H
18 
19 #include "components/ui_label.h"
20 #include "components/ui_scroll_view.h"
21 #include "ui_test.h"
22 
23 namespace OHOS {
24 class UITestListLayout : public UITest {
25 public:
UITestListLayout()26     UITestListLayout() {}
~UITestListLayout()27     ~UITestListLayout() {}
28     void SetUp() override;
29     void TearDown() override;
30     const UIView* GetTestView() override;
31 
32     void UIKitListVerticalAddTestAutoSize001();
33     void UIKitListVerticalRemoveTestAutoSize001();
34     void UIKitListVerticalRemoveTestAutoSize002();
35     void UIKitListHorAddTestAutoSize001();
36     void UIKitListHorRemoveTestAutoSize001();
37     void UIKitListHorRemoveTestAutoSize002();
38 
39 private:
40     void SetLastPos(UIView* view);
41     UIScrollView* container_ = nullptr;
42     int16_t lastX_ = 0;
43     int16_t lastY_ = 0;
44     UILabel* listDirect_ = nullptr;
45 };
46 } // namespace OHOS
47 #endif // UI_TEST_INPUT_EVENT_H
48