| Index: third_party/WebKit/LayoutTests/fast/css/fontfaceset-cross-frame.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/css/fontfaceset-cross-frame.html b/third_party/WebKit/LayoutTests/fast/css/fontfaceset-cross-frame.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..415df578a399613e1813db6c890218bfdb6bc49e
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/css/fontfaceset-cross-frame.html
|
| @@ -0,0 +1,35 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<body>
|
| +<script>
|
| +
|
| +test(function () {
|
| + var i = document.createElement("iframe");
|
| +
|
| + document.body.appendChild(i);
|
| +
|
| + var d = i.contentDocument.open();
|
| +
|
| + d.write("<style>@font-face { font-family: f1; src: url(); } @font-face { font-family: f2; src: url(); }</style>");
|
| + d.close();
|
| +
|
| + var frame_FontFace = i.contentWindow.FontFace;
|
| +
|
| + var c = 0;
|
| + d.fonts.forEach(function (f) {
|
| + assert_equals(f.constructor, frame_FontFace, "constructed in frame context");
|
| +
|
| + if (++c == 1) {
|
| + // First iteration: navigate the frame to about:blank. The second
|
| + // iteration's |f| should still be created with the prototype.
|
| +
|
| + var a = d.createElement("a");
|
| + a.href = "about:blank";
|
| + a.click();
|
| + }
|
| + });
|
| +}, "objects created with correct creation context");
|
| +
|
| +</script>
|
| +</body>
|
|
|