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

Side by Side Diff: LayoutTests/resources/ahem.js

Issue 1210353002: Remove temporary try-ahem tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/platform/win/fast/text/whitespace/004-try-ahem-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This file is included by tests using Ahem font to ensure that the font is 1 // This file is included by tests using Ahem font to ensure that the font is
2 // loaded before window.onload fires and the test finishes. 2 // loaded before window.onload fires and the test finishes.
3 // Note: this doesn't work if the test doesn't contain any visible element with 3 // Note: this doesn't work if the test doesn't contain any visible element with
4 // 'font-family: Ahem' style. 4 // 'font-family: Ahem' style.
5 (function() { 5 (function() {
6 var scripts = document.getElementsByTagName('script'); 6 var scripts = document.getElementsByTagName('script');
7 var scriptSrc = scripts[scripts.length - 1].src; 7 var scriptSrc = scripts[scripts.length - 1].src;
8 var relativePath = scriptSrc.substr(0, scriptSrc.lastIndexOf('/')); 8 var relativePath = scriptSrc.substr(0, scriptSrc.lastIndexOf('/'));
9 9
10 window.addEventListener('DOMContentLoaded', function() { 10 window.addEventListener('DOMContentLoaded', function() {
11 var style = document.createElement('style'); 11 var style = document.createElement('style');
12 style.appendChild(document.createTextNode( 12 style.appendChild(document.createTextNode(
13 '@font-face { font-family: myahem; src: url(' + relativePath + '/Ahem.ttf' )); 13 '@font-face { font-family: Ahem; src: url(' + relativePath + '/Ahem.ttf); }'));
14 document.head.appendChild(style); 14 document.head.appendChild(style);
15 // Force a layout to start loading the font. 15 // Force a layout to start loading the font.
16 document.documentElement.offsetTop; 16 document.documentElement.offsetTop;
17 }, true); 17 }, true);
18 }()); 18 }());
OLDNEW
« no previous file with comments | « LayoutTests/platform/win/fast/text/whitespace/004-try-ahem-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698