mirror of https://github.com/vitalif/phantomjs
Mac OS X: Add a manual test for the crash with TrueType fonts.
http://code.google.com/p/phantomjs/issues/detail?id=6901.9
parent
f52044cd31
commit
2a2b6e455c
|
@ -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;
|
||||
}
|
||||
|
|
@ -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>
|
File diff suppressed because it is too large
Load Diff
|
@ -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();
|
||||
});
|
||||
});
|
|
@ -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
|
Loading…
Reference in New Issue