OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <body> |
| 5 <script> |
| 6 |
| 7 test(function () { |
| 8 var i = document.createElement("iframe"); |
| 9 |
| 10 document.body.appendChild(i); |
| 11 |
| 12 var d = i.contentDocument.open(); |
| 13 |
| 14 d.write("<style>@font-face { font-family: f1; src: url(); } @font-face { font-
family: f2; src: url(); }</style>"); |
| 15 d.close(); |
| 16 |
| 17 var frame_FontFace = i.contentWindow.FontFace; |
| 18 |
| 19 var c = 0; |
| 20 d.fonts.forEach(function (f) { |
| 21 assert_equals(f.constructor, frame_FontFace, "constructed in frame context")
; |
| 22 |
| 23 if (++c == 1) { |
| 24 // First iteration: navigate the frame to about:blank. The second |
| 25 // iteration's |f| should still be created with the prototype. |
| 26 |
| 27 var a = d.createElement("a"); |
| 28 a.href = "about:blank"; |
| 29 a.click(); |
| 30 } |
| 31 }); |
| 32 }, "objects created with correct creation context"); |
| 33 |
| 34 </script> |
| 35 </body> |
OLD | NEW |