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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/fontfaceset-cross-frame.html

Issue 1960013002: Use correct creation context during Iterable.forEach iteration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 7 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/Iterable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/Iterable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698