1 /* 2 * Copyright (c) 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_SCROLL_BAR_H 17 #define UI_TEST_SCROLL_BAR_H 18 19 #include "components/text_adapter.h" 20 #include "components/ui_image_view.h" 21 #include "components/ui_list.h" 22 #include "components/ui_scroll_view.h" 23 #include "ui_test.h" 24 25 namespace OHOS { 26 class UITestScrollBar : public UITest { 27 public: UITestScrollBar()28 UITestScrollBar() {} ~UITestScrollBar()29 ~UITestScrollBar() {} 30 void SetUp() override; 31 void TearDown() override; 32 const UIView* GetTestView() override; 33 34 void UIKitScrollBarTESTScrollview001(); 35 void UIKitScrollBarTESTList001(); 36 37 private: 38 void SetAdapterData(); 39 UIViewGroup* container_ = nullptr; 40 UIScrollView* scrollView_ = nullptr; 41 UIList* list_ = nullptr; 42 UIImageView* foreImg1_ = nullptr; 43 UIImageView* foreImg2_ = nullptr; 44 List<const char*>* adapterData_ = nullptr; 45 TextAdapter* adapter_ = nullptr; 46 }; // namespace OHOS 47 } 48 #endif // UI_TEST_SCROLL_BAR_H 49