Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp

Issue 2715173002: Final rename from FrameLoaderClient to LocalFrameClient: (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "bindings/core/v8/StringOrArrayBufferOrArrayBufferView.h" 7 #include "bindings/core/v8/StringOrArrayBufferOrArrayBufferView.h"
8 #include "core/css/FontFaceDescriptors.h" 8 #include "core/css/FontFaceDescriptors.h"
9 #include "core/css/FontFaceSet.h" 9 #include "core/css/FontFaceSet.h"
10 #include "core/dom/DOMArrayBuffer.h" 10 #include "core/dom/DOMArrayBuffer.h"
(...skipping 23 matching lines...) Expand all
34 void LocalFrameClientWithParent::detached(FrameDetachType) { 34 void LocalFrameClientWithParent::detached(FrameDetachType) {
35 static_cast<SingleChildLocalFrameClient*>(parent()->client()) 35 static_cast<SingleChildLocalFrameClient*>(parent()->client())
36 ->didDetachChild(); 36 ->didDetachChild();
37 } 37 }
38 38
39 ChromeClient& RenderingTest::chromeClient() const { 39 ChromeClient& RenderingTest::chromeClient() const {
40 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create())); 40 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create()));
41 return client; 41 return client;
42 } 42 }
43 43
44 RenderingTest::RenderingTest(FrameLoaderClient* frameLoaderClient) 44 RenderingTest::RenderingTest(LocalFrameClient* localFrameClient)
45 : m_frameLoaderClient(frameLoaderClient) {} 45 : m_localFrameClient(localFrameClient) {}
46 46
47 void RenderingTest::SetUp() { 47 void RenderingTest::SetUp() {
48 Page::PageClients pageClients; 48 Page::PageClients pageClients;
49 fillWithEmptyClients(pageClients); 49 fillWithEmptyClients(pageClients);
50 pageClients.chromeClient = &chromeClient(); 50 pageClients.chromeClient = &chromeClient();
51 m_pageHolder = DummyPageHolder::create( 51 m_pageHolder = DummyPageHolder::create(
52 IntSize(800, 600), &pageClients, m_frameLoaderClient, settingOverrider()); 52 IntSize(800, 600), &pageClients, m_localFrameClient, settingOverrider());
53 53
54 Settings::setMockScrollbarsEnabled(true); 54 Settings::setMockScrollbarsEnabled(true);
55 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(true); 55 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(true);
56 EXPECT_TRUE(ScrollbarTheme::theme().usesOverlayScrollbars()); 56 EXPECT_TRUE(ScrollbarTheme::theme().usesOverlayScrollbars());
57 57
58 // This ensures that the minimal DOM tree gets attached 58 // This ensures that the minimal DOM tree gets attached
59 // correctly for tests that don't call setBodyInnerHTML. 59 // correctly for tests that don't call setBodyInnerHTML.
60 document().view()->updateAllLifecyclePhases(); 60 document().view()->updateAllLifecyclePhases();
61 } 61 }
62 62
(...skipping 22 matching lines...) Expand all
85 FontFace* ahem = 85 FontFace* ahem =
86 FontFace::create(&document(), "Ahem", buffer, FontFaceDescriptors()); 86 FontFace::create(&document(), "Ahem", buffer, FontFaceDescriptors());
87 87
88 ScriptState* scriptState = ScriptState::forMainWorld(&m_pageHolder->frame()); 88 ScriptState* scriptState = ScriptState::forMainWorld(&m_pageHolder->frame());
89 DummyExceptionStateForTesting exceptionState; 89 DummyExceptionStateForTesting exceptionState;
90 FontFaceSet::from(document()) 90 FontFaceSet::from(document())
91 ->addForBinding(scriptState, ahem, exceptionState); 91 ->addForBinding(scriptState, ahem, exceptionState);
92 } 92 }
93 93
94 } // namespace blink 94 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698