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

Unified Diff: LayoutTests/fast/css/font-face-insertBefore.html

Issue 82583005: Use removeFontFace to avoid resetting fontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added 2 layout tests Created 7 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: LayoutTests/fast/css/font-face-insertBefore.html
diff --git a/LayoutTests/fast/css/font-face-insertBefore.html b/LayoutTests/fast/css/font-face-insertBefore.html
new file mode 100644
index 0000000000000000000000000000000000000000..3cbb1c13ee219f350bd220ced89132237f0785c0
--- /dev/null
+++ b/LayoutTests/fast/css/font-face-insertBefore.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<head>
+<script>
+function runTest() {
+ var newStyle = document.createElement('style');
+ newStyle.innerHTML = "@font-face { font-family: f1; font-weight: 100; src: local('Courier New'); }";
+ document.body.offsetLeft;
+ document.body.insertBefore(newStyle, document.getElementById('target'));
+ console.log(document.styleSheets[0].cssRules[0].style.src);
+ console.log(document.styleSheets[1].cssRules[0].style.src);
ojan 2014/01/03 01:20:44 Are these console.logs accidentally included in th
tasak 2014/01/07 08:42:12 Done.
+}
+</script>
+</head>
+<body onload="runTest()">
+<style id="target">
+@font-face {
+ font-family: f1;
+ font-weight: 100;
+ src: url(../../resources/Ahem.ttf);
+}
+</style>
+<span style="font-family: f1; font-weight: 100">A</span>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698