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 GRAPHIC_LITE_UI_TEST_DUMP_DOM_H
17 #define GRAPHIC_LITE_UI_TEST_DUMP_DOM_H
18 
19 #include "graphic_config.h"
20 
21 #if ENABLE_DEBUG
22 #include "components/ui_label_button.h"
23 #include "components/ui_scroll_view.h"
24 #include "layout/grid_layout.h"
25 #include "ui_test.h"
26 
27 namespace OHOS {
28 class UITestDumpDomTree : public UITest {
29 public:
UITestDumpDomTree()30     UITestDumpDomTree() {}
~UITestDumpDomTree()31     ~UITestDumpDomTree() {}
32     void SetUp() override;
33     void TearDown() override;
34     const UIView* GetTestView() override;
35     void CreateButtons(GridLayout* layout);
36 
37     void UIKitTestDumpDom001();
38     void UIKitTestDumpDom002();
39     void UIKitTestDumpDom003();
40     void UIKitTestDumpDom004();
41     void UIKitTestDumpDom005();
42     void UIKitTestDumpDom006();
43     UILabelButton* GetLabelButton(const char* buttonname);
44 
45 private:
46     void TearDown001();
47     void CreateLabelButtons001(GridLayout* layout);
48     void CreateButtons002(UIViewGroup* group3);
49     UIScrollView* container_ = nullptr;
50     UIView::OnClickListener* clickDumpDomListener1_ = nullptr;
51     UIView::OnClickListener* clickDumpDomListener2_ = nullptr;
52     UIView::OnClickListener* clickDumpDomListener3_ = nullptr;
53     UIView::OnClickListener* clickDumpDomListener4_ = nullptr;
54     UIView::OnClickListener* clickDumpDomListener5_ = nullptr;
55     UIView::OnClickListener* clickDumpDomListener6_ = nullptr;
56     UIView::OnClickListener* clickDumpDomListener7_ = nullptr;
57     UIView::OnClickListener* clickDumpDomListener8_ = nullptr;
58     UIView::OnClickListener* clickDumpDomListener9_ = nullptr;
59     UIView::OnClickListener* clickDumpDomListener10_ = nullptr;
60     UIView::OnClickListener* clickDumpDomListener11_ = nullptr;
61     UIView::OnClickListener* clickDumpDomListener12_ = nullptr;
62 };
63 }
64 #endif // ENABLE_DEBUG
65 #endif // GRAPHIC_LITE_UI_TEST_DUMP_DOM_H
66 
67