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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/fontfacesetloadevent-constructor.html

Issue 2579513005: Expose FontFaceSetLoadEvent and add a constructor for it (Closed)
Patch Set: Make fontfaces FrozenArray [SameObject] Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/css/fontfacesetloadevent-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/fontfacesetloadevent-constructor.html b/third_party/WebKit/LayoutTests/fast/css/fontfacesetloadevent-constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..92aa53c9a607b23c293baf084674aa8d67358c94
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/fontfacesetloadevent-constructor.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<title>FontFaceSetLoadEvent Constructor</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ test(function() {
+ var e = new FontFaceSetLoadEvent('type');
+ assert_array_equals(e.fontfaces, []);
+ assert_equals(e.fontfaces, e.fontfaces);
+ assert_not_equals(e.fontfaces, []);
foolip 2016/12/16 14:46:36 This assert looks a bit paranoid, it would be a th
lunalu1 2016/12/16 15:44:56 Done.
+ }, 'Test FontFaceSetLoadEvent constructor without FontFaceSetLoadEventInit dictionary');
+
+ test(function() {
+ var ff = [ new FontFace('family', 'src') ];
+ var e = new FontFaceSetLoadEvent('type', { fontfaces: ff });
+ assert_array_equals(e.fontfaces, ff);
+ assert_equals(e.fontfaces, e.fontfaces);
+ assert_not_equals(e.fontfaces, ff);
+ }, 'Test FontFaceSetLoadEvent constructor with FontFaceSetLoadEventInit dictionary');
+</script>

Powered by Google App Engine
This is Rietveld 408576698