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 FOUNDATION_ACE_TEST_UNITTEST_CORE_ROSEN_ROSEN_RENDER_CONTEXT_TEST_H 17 #define FOUNDATION_ACE_TEST_UNITTEST_CORE_ROSEN_ROSEN_RENDER_CONTEXT_TEST_H 18 19 #include <memory> 20 21 #include "gtest/gtest.h" 22 23 #define private public 24 #define protected public 25 #include "test/mock/base/mock_pixel_map.h" 26 #include "test/mock/core/common/mock_container.h" 27 #include "test/mock/core/common/mock_theme_manager.h" 28 #include "test/mock/core/pipeline/mock_pipeline_context.h" 29 30 #include "base/geometry/dimension.h" 31 #include "core/components_ng/render/adapter/background_modifier.h" 32 #include "core/components_ng/render/adapter/component_snapshot.h" 33 #include "core/components_ng/render/adapter/focus_state_modifier.h" 34 #include "core/components_ng/render/adapter/rosen_render_context.h" 35 #include "core/components_ng/render/adapter/transition_modifier.h" 36 #include "core/components_ng/pattern/particle/particle_pattern.h" 37 #include "frameworks/core/components_ng/render/image_painter.h" 38 #undef private 39 #undef protected 40 41 namespace OHOS::Ace::NG { 42 namespace {} // namespace 43 using namespace testing; 44 using namespace testing::ext; 45 class RosenRenderContextTest : public testing::Test { 46 public: 47 void SetUp() override; 48 void TearDown() override; 49 RefPtr<RosenRenderContext> InitRosenRenderContext(const RefPtr<FrameNode>& frameNode); 50 RefPtr<RosenRenderContext> InitRosenRenderContext(const RefPtr<FrameNode>& frameNode, 51 const RenderContext::ContextType& type); 52 }; 53 } // namespace OHOS::Ace::NG 54 55 #endif // FOUNDATION_ACE_TEST_UNITTEST_CORE_ROSEN_ROSEN_RENDER_CONTEXT_TEST_H 56