aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/tests/support/CSSTest/csstest-weights-400.ttf
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2018-02-12 12:18:53 +0100
committerJon Leighton <j@jonathanleighton.com>2018-02-22 16:36:09 +0100
commite4acb3f77f12e0d42fb8084dafbf5de59f7a1c1b (patch)
tree32b59e3a88fffc1226f6eae8e879a09fc0cf2317 /components/gfx/tests/support/CSSTest/csstest-weights-400.ttf
parentf22e5ef3bdef97daa7b38cf642f24766cab6c488 (diff)
downloadservo-e4acb3f77f12e0d42fb8084dafbf5de59f7a1c1b.tar.gz
servo-e4acb3f77f12e0d42fb8084dafbf5de59f7a1c1b.zip
Add test for FontContext/FontGroup functionality
Unfortunately, this required quite a bit of changes to the non-test code. That's because FontContext depends on a FontCacheThread, which in turn depends on a CoreResourceThread and therefore lots of other data structures. It seemed like it would be very difficult to instantiate a FontContext as it was, and even if we could it seems like overkill to have all these data structures present for a relatively focused test. Therefore, I created a FontSource trait which represents the interface which FontContext uses to talk to FontCacheThread. FontCacheThread then implements FontSource. Then, in the test, we can create a dummy implementation of FontSource rather than using FontCacheThread. This actually has the advantage that we can make our dummy implementation behave in certain specific way which are useful for testing, for example it can count the number of times find_font_template() is called, which helps us verify that caching/lazy-loading is working as intended.
Diffstat (limited to 'components/gfx/tests/support/CSSTest/csstest-weights-400.ttf')
-rw-r--r--components/gfx/tests/support/CSSTest/csstest-weights-400.ttfbin0 -> 8364 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/components/gfx/tests/support/CSSTest/csstest-weights-400.ttf b/components/gfx/tests/support/CSSTest/csstest-weights-400.ttf
new file mode 100644
index 00000000000..9938a378bd6
--- /dev/null
+++ b/components/gfx/tests/support/CSSTest/csstest-weights-400.ttf
Binary files differ