blob: eb5ceed3f0a56aa72aaa5a9e285aa427c33310fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_RESOURCE_MOCK_FONT_RESOURCE_CLIENT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_RESOURCE_MOCK_FONT_RESOURCE_CLIENT_H_
#include "third_party/blink/renderer/core/loader/resource/font_resource.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_client.h"
namespace blink {
class MockFontResourceClient final
: public GarbageCollectedFinalized<MockFontResourceClient>,
public FontResourceClient {
USING_GARBAGE_COLLECTED_MIXIN(MockFontResourceClient);
public:
MockFontResourceClient();
~MockFontResourceClient() override;
void FontLoadShortLimitExceeded(FontResource*) override;
void FontLoadLongLimitExceeded(FontResource*) override;
bool FontLoadShortLimitExceededCalled() const {
return font_load_short_limit_exceeded_called_;
}
bool FontLoadLongLimitExceededCalled() const {
return font_load_long_limit_exceeded_called_;
}
String DebugName() const override { return "MockFontResourceClient"; }
private:
bool font_load_short_limit_exceeded_called_;
bool font_load_long_limit_exceeded_called_;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_RESOURCE_MOCK_FONT_RESOURCE_CLIENT_H_
|