| Index: third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| index 06ccad5ce8ecced663480da4a992f7ba31e06e72..3ac6e59a1e366211664add55b3248f0d20209767 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| @@ -4,10 +4,15 @@
|
|
|
| #include "core/layout/LayoutTestHelper.h"
|
|
|
| +#include "bindings/core/v8/StringOrArrayBufferOrArrayBufferView.h"
|
| +#include "core/css/FontFaceDescriptors.h"
|
| +#include "core/css/FontFaceSet.h"
|
| +#include "core/dom/DOMArrayBuffer.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "core/html/HTMLIFrameElement.h"
|
| #include "platform/loader/fetch/MemoryCache.h"
|
| #include "platform/scroll/ScrollbarTheme.h"
|
| +#include "platform/testing/UnitTestHelpers.h"
|
|
|
| namespace blink {
|
|
|
| @@ -71,4 +76,19 @@ void RenderingTest::setChildFrameHTML(const String& html) {
|
| childDocument().body()->setInnerHTML(html, ASSERT_NO_EXCEPTION);
|
| }
|
|
|
| +void RenderingTest::loadAhem() {
|
| + RefPtr<SharedBuffer> sharedBuffer =
|
| + testing::readFromFile(testing::webTestDataPath("Ahem.ttf"));
|
| + StringOrArrayBufferOrArrayBufferView buffer =
|
| + StringOrArrayBufferOrArrayBufferView::fromArrayBuffer(
|
| + DOMArrayBuffer::create(sharedBuffer->data(), sharedBuffer->size()));
|
| + FontFace* ahem =
|
| + FontFace::create(&document(), "Ahem", buffer, FontFaceDescriptors());
|
| +
|
| + ScriptState* scriptState = ScriptState::forMainWorld(&m_pageHolder->frame());
|
| + DummyExceptionStateForTesting exceptionState;
|
| + FontFaceSet::from(document())
|
| + ->addForBinding(scriptState, ahem, exceptionState);
|
| +}
|
| +
|
| } // namespace blink
|
|
|