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 #include "core/layout/LayoutTestHelper.h" | 5 #include "core/layout/LayoutTestHelper.h" |
6 | 6 |
7 #include "core/frame/FrameHost.h" | 7 #include "core/frame/FrameHost.h" |
8 #include "core/html/HTMLIFrameElement.h" | 8 #include "core/html/HTMLIFrameElement.h" |
9 #include "platform/loader/fetch/MemoryCache.h" | 9 #include "platform/loader/fetch/MemoryCache.h" |
10 #include "platform/scroll/ScrollbarTheme.h" | 10 #include "platform/scroll/ScrollbarTheme.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 return m_child.get(); | 26 return m_child.get(); |
27 } | 27 } |
28 | 28 |
29 void FrameLoaderClientWithParent::detached(FrameDetachType) { | 29 void FrameLoaderClientWithParent::detached(FrameDetachType) { |
30 static_cast<SingleChildFrameLoaderClient*>(parent()->client()) | 30 static_cast<SingleChildFrameLoaderClient*>(parent()->client()) |
31 ->didDetachChild(); | 31 ->didDetachChild(); |
32 } | 32 } |
33 | 33 |
34 ChromeClient& RenderingTest::chromeClient() const { | 34 ChromeClient& RenderingTest::chromeClient() const { |
| 35 ALLOW_UNSAFE_SINGLETON() |
35 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create())); | 36 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create())); |
36 return client; | 37 return client; |
37 } | 38 } |
38 | 39 |
39 RenderingTest::RenderingTest(FrameLoaderClient* frameLoaderClient) | 40 RenderingTest::RenderingTest(FrameLoaderClient* frameLoaderClient) |
40 : m_frameLoaderClient(frameLoaderClient) {} | 41 : m_frameLoaderClient(frameLoaderClient) {} |
41 | 42 |
42 void RenderingTest::SetUp() { | 43 void RenderingTest::SetUp() { |
43 Page::PageClients pageClients; | 44 Page::PageClients pageClients; |
44 fillWithEmptyClients(pageClients); | 45 fillWithEmptyClients(pageClients); |
(...skipping 20 matching lines...) Expand all Loading... |
65 // Clear memory cache, otherwise we can leak pruned resources. | 66 // Clear memory cache, otherwise we can leak pruned resources. |
66 memoryCache()->evictResources(); | 67 memoryCache()->evictResources(); |
67 } | 68 } |
68 | 69 |
69 void RenderingTest::setChildFrameHTML(const String& html) { | 70 void RenderingTest::setChildFrameHTML(const String& html) { |
70 childDocument().setBaseURLOverride(KURL(ParsedURLString, "http://test.com")); | 71 childDocument().setBaseURLOverride(KURL(ParsedURLString, "http://test.com")); |
71 childDocument().body()->setInnerHTML(html, ASSERT_NO_EXCEPTION); | 72 childDocument().body()->setInnerHTML(html, ASSERT_NO_EXCEPTION); |
72 } | 73 } |
73 | 74 |
74 } // namespace blink | 75 } // namespace blink |
OLD | NEW |