| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef LayoutTestHelper_h | 5 #ifndef LayoutTestHelper_h |
| 6 #define LayoutTestHelper_h | 6 #define LayoutTestHelper_h |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/frame/FrameHost.h" | 9 #include "core/frame/FrameHost.h" |
| 10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 document().view()->updateAllLifecyclePhases(); | 38 document().view()->updateAllLifecyclePhases(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // Returns the Document for the iframe. | 41 // Returns the Document for the iframe. |
| 42 Document& setupChildIframe(const AtomicString& iframeElementId, const String
& htmlContentOfIframe); | 42 Document& setupChildIframe(const AtomicString& iframeElementId, const String
& htmlContentOfIframe); |
| 43 | 43 |
| 44 // Both enables compositing and runs the document lifecycle. | 44 // Both enables compositing and runs the document lifecycle. |
| 45 void enableCompositing() | 45 void enableCompositing() |
| 46 { | 46 { |
| 47 m_pageHolder->page().settings().setAcceleratedCompositingEnabled(true); | 47 m_pageHolder->page().settings().setAcceleratedCompositingEnabled(true); |
| 48 document().view()->setParentVisible(true); |
| 49 document().view()->setSelfVisible(true); |
| 48 document().view()->updateAllLifecyclePhases(); | 50 document().view()->updateAllLifecyclePhases(); |
| 49 } | 51 } |
| 50 | 52 |
| 51 private: | 53 private: |
| 52 RefPtrWillBePersistent<LocalFrame> m_subframe; | 54 RefPtrWillBePersistent<LocalFrame> m_subframe; |
| 53 OwnPtrWillBePersistent<FrameLoaderClient> m_frameLoaderClient; | 55 OwnPtrWillBePersistent<FrameLoaderClient> m_frameLoaderClient; |
| 54 OwnPtr<DummyPageHolder> m_pageHolder; | 56 OwnPtr<DummyPageHolder> m_pageHolder; |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 class SingleChildFrameLoaderClient final : public EmptyFrameLoaderClient { | 59 class SingleChildFrameLoaderClient final : public EmptyFrameLoaderClient { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 94 |
| 93 private: | 95 private: |
| 94 explicit FrameLoaderClientWithParent(Frame* parent) : m_parent(parent) { } | 96 explicit FrameLoaderClientWithParent(Frame* parent) : m_parent(parent) { } |
| 95 | 97 |
| 96 RefPtrWillBeMember<Frame> m_parent; | 98 RefPtrWillBeMember<Frame> m_parent; |
| 97 }; | 99 }; |
| 98 | 100 |
| 99 } // namespace blink | 101 } // namespace blink |
| 100 | 102 |
| 101 #endif // LayoutTestHelper_h | 103 #endif // LayoutTestHelper_h |
| OLD | NEW |