Mac OS X: Add a manual test for the crash with TrueType fonts.

http://code.google.com/p/phantomjs/issues/detail?id=690
1.9
Ariya Hidayat 2012-12-29 21:25:56 -08:00
parent f52044cd31
commit 2a2b6e455c
5 changed files with 9496 additions and 0 deletions

View File

@ -0,0 +1,9 @@
@font-face {
font-family: 'WindsongRegular';
src: url("https://github.com/fukawi2/.fonts/raw/master/Windsong.ttf") format("truetype");
}
h1 {
font: 90px/98px "WindsongRegular", Arial, sans-serif;
}

View File

@ -0,0 +1,9 @@
<html>
<head>
<link href="font.css" rel="stylesheet" type="text/css">
<script src="jquery.js" type="text/javascript"></script>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>

9441
test/set/690-ttf-crash/jquery.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
var page = require('webpage').create();
var url = 'http://localhost:5000';
page.open(url, function (status) {
console.log('Page loaded once', status);
page.release();
page = require('webpage').create();
page.open(url, function (status) {
console.log('Page loaded twice', status);
phantom.exit();
});
});

View File

@ -0,0 +1,25 @@
#!/usr/bin/env ruby
# From http://chrismdp.com/2011/12/cache-busting-ruby-http-server/
require 'webrick'
class NonCachingFileHandler < WEBrick::HTTPServlet::FileHandler
def prevent_caching(res)
res['ETag'] = nil
res['Last-Modified'] = Time.now + 100**4
res['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'
res['Pragma'] = 'no-cache'
res['Expires'] = Time.now - 100**4
end
def do_GET(req, res)
super
prevent_caching(res)
end
end
server = WEBrick::HTTPServer.new :Port => 5000
server.mount '/', NonCachingFileHandler , Dir.pwd
trap('INT') { server.stop }
server.start