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

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

Issue 2796653003: Move ScriptState::forWorld/ScriptState::forMainWorld (Part 2) (Closed)
Patch Set: Rebase Created 3 years, 8 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 "bindings/core/v8/V8Binding.h"
8 #include "core/css/FontFaceDescriptors.h" 9 #include "core/css/FontFaceDescriptors.h"
9 #include "core/css/FontFaceSet.h" 10 #include "core/css/FontFaceSet.h"
10 #include "core/dom/DOMArrayBuffer.h" 11 #include "core/dom/DOMArrayBuffer.h"
11 #include "core/html/HTMLIFrameElement.h" 12 #include "core/html/HTMLIFrameElement.h"
12 #include "platform/loader/fetch/MemoryCache.h" 13 #include "platform/loader/fetch/MemoryCache.h"
13 #include "platform/scroll/ScrollbarTheme.h" 14 #include "platform/scroll/ScrollbarTheme.h"
14 #include "platform/testing/UnitTestHelpers.h" 15 #include "platform/testing/UnitTestHelpers.h"
15 16
16 namespace blink { 17 namespace blink {
17 18
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 void RenderingTest::loadAhem() { 79 void RenderingTest::loadAhem() {
79 RefPtr<SharedBuffer> sharedBuffer = 80 RefPtr<SharedBuffer> sharedBuffer =
80 testing::readFromFile(testing::webTestDataPath("Ahem.ttf")); 81 testing::readFromFile(testing::webTestDataPath("Ahem.ttf"));
81 StringOrArrayBufferOrArrayBufferView buffer = 82 StringOrArrayBufferOrArrayBufferView buffer =
82 StringOrArrayBufferOrArrayBufferView::fromArrayBuffer( 83 StringOrArrayBufferOrArrayBufferView::fromArrayBuffer(
83 DOMArrayBuffer::create(sharedBuffer->data(), sharedBuffer->size())); 84 DOMArrayBuffer::create(sharedBuffer->data(), sharedBuffer->size()));
84 FontFace* ahem = 85 FontFace* ahem =
85 FontFace::create(&document(), "Ahem", buffer, FontFaceDescriptors()); 86 FontFace::create(&document(), "Ahem", buffer, FontFaceDescriptors());
86 87
87 ScriptState* scriptState = ScriptState::forMainWorld(&m_pageHolder->frame()); 88 ScriptState* scriptState = toScriptStateForMainWorld(&m_pageHolder->frame());
88 DummyExceptionStateForTesting exceptionState; 89 DummyExceptionStateForTesting exceptionState;
89 FontFaceSet::from(document()) 90 FontFaceSet::from(document())
90 ->addForBinding(scriptState, ahem, exceptionState); 91 ->addForBinding(scriptState, ahem, exceptionState);
91 } 92 }
92 93
93 } // namespace blink 94 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp ('k') | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698