Skip to content
Browse files

Initial commit

  • Loading branch information...
0 parents commit 8c2d166846ab15158723997453c9c69693290db8 @jarib committed
4 .gitignore
@@ -0,0 +1,4 @@
+pkg/*
+*.gem
+.bundle
+Gemfile.lock
1 .rspec
@@ -0,0 +1 @@
+--color
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in har.gemspec
+gemspec
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2010 Jari Bakken
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 README.mdown
@@ -0,0 +1,36 @@
+HAR
+===
+
+Ruby library to work with HTTP archives. Very young. Not very useful yet.
+
+Usage
+=====
+
+ HAR::Archive.from_string(json) #=> #<Har::Archive:0x5e7cac>
+ HAR::Archive.from_file(json) #=> #<Har::Archive:0x5e7cac>
+
+Links
+=====
+
+* http://code.google.com/p/harviewer/
+
+Todo
+====
+
+Validate against HAR schema instead of simply raising {Index,Key}Error.
+
+Note on Patches/Pull Requests
+=============================
+
+* Fork the project.
+* Make your feature addition or bug fix.
+* Add tests for it. This is important so I don't break it in a
+ future version unintentionally.
+* Commit, do not mess with rakefile, version, or history.
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
+* Send me a pull request. Bonus points for topic branches.
+
+Copyright
+=========
+
+Copyright (c) 2010 Jari Bakken. See LICENSE for details.
5 Rakefile
@@ -0,0 +1,5 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
+
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new
24 har.gemspec
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "har/version"
+
+Gem::Specification.new do |s|
+ s.name = "har"
+ s.version = HAR::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Jari Bakken"]
+ s.email = ["jari.bakken@gmail.com"]
+ s.homepage = ""
+ s.summary = %q{Ruby library to work with HTTP archives}
+ s.description = %q{Ruby library to work with HTTP archives}
+
+ s.rubyforge_project = "har"
+
+ s.add_dependency "json"
+ s.add_development_dependency "rspec", "~> 2.0"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+end
11 lib/har.rb
@@ -0,0 +1,11 @@
+module HAR
+ # Your code goes here...
+end
+
+require 'har/version'
+require 'har/entry'
+require 'har/page'
+require 'har/archive'
+
+require 'json'
+require 'time'
51 lib/har/archive.rb
@@ -0,0 +1,51 @@
+module HAR
+ class Archive
+ def self.from_string(str)
+ new JSON.parse(str)
+ end
+
+ def self.from_file(path)
+ from_string File.read(path)
+ end
+
+ def initialize(hash)
+ @data = hash.fetch 'log'
+ end
+
+ def pages
+ @data.fetch('pages').map do |page|
+ Page.new page, entries_for(page['id'])
+ end
+ end
+
+ def entries
+ raw_entries.map { |e| Entry.new(e) }
+ end
+
+ # create a new archive by merging this and another archive
+
+ def merge(other)
+ raise NotImplementedError
+ end
+
+ # destructively merge this with the given archive
+
+ def merge!(other)
+ raise NotImplementedError
+ end
+
+ private
+
+ def entries_for(page_id)
+ raw_entries.map { |e|
+ Entry.new(e) if e['pageref'] == page_id
+ }.compact
+ end
+
+ def raw_entries
+ @data.fetch('entries')
+ end
+
+ end # Archive
+end # HAR
+
76 lib/har/entry.rb
@@ -0,0 +1,76 @@
+module HAR
+ class Entry
+ class Entry
+ def initialize(data)
+ @data = data
+ end
+
+ def start_time
+ Time.parse @data.fetch('startedDateTime')
+ end
+
+ def time
+ @data.fetch 'time'
+ end
+
+ def method
+ request.fetch 'method'
+ end
+
+ def url
+ request.fetch 'url'
+ end
+
+ def request_headers_size
+ request.fetch 'headersSize'
+ end
+
+ def request_body_size
+ request.fetch 'bodySize'
+ end
+
+ def status
+ response.fetch 'status'
+ end
+
+ def status_text
+ response.fetch 'statusText'
+ end
+
+ def response_headers_size
+ response.fetch 'headersSize'
+ end
+
+ def response_body_size
+ response.fetch 'bodySize'
+ end
+
+ def mime_type
+ content.fetch 'mimeType'
+ end
+
+ def content_size
+ content.fetch 'size'
+ end
+
+ private
+
+ def request
+ @data.fetch 'request'
+ end
+
+ def response
+ @data.fetch 'response'
+ end
+
+ def timings
+ @data.fetch 'timings'
+ end
+
+ def content
+ response.fetch('content')
+ end
+ end
+
+ end # Entry
+end #
32 lib/har/page.rb
@@ -0,0 +1,32 @@
+module HAR
+ class Page
+ attr_reader :entries
+
+ def initialize(data, entries)
+ @data = data
+ @entries = entries
+ end
+
+ def start_time
+ Time.parse @data.fetch('startedDateTime')
+ end
+
+ def title
+ @data.fetch 'title'
+ end
+
+ def on_content_load
+ timings.fetch 'onContentLoad'
+ end
+
+ def on_load
+ timings.fetch 'onLoad'
+ end
+
+ private
+
+ def timings
+ @data.fetch('pageTimings')
+ end
+ end
+end
3 lib/har/version.rb
@@ -0,0 +1,3 @@
+module HAR
+ VERSION = "0.0.1"
+end
2,567 spec/fixtures/browser-blocking-time.har
2,567 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
612 spec/fixtures/google.com.har
@@ -0,0 +1,612 @@
+{
+ "log":{
+ "version":"1.1",
+ "creator":{
+ "name":"Firebug",
+ "version":"1.5X.0b8"
+ },
+ "browser":{
+ "name":"Firefox",
+ "version":"3.6b6pre"
+ },
+ "pages":[{
+ "startedDateTime":"2010-01-02T14:51:01.186+01:00",
+ "id":"page_62143",
+ "title":"Google",
+ "pageTimings":{
+ "onContentLoad":90,
+ "onLoad":245
+ }
+ }
+ ],
+ "entries":[{
+ "pageref":"page_62143",
+ "startedDateTime":"2010-01-02T14:51:01.186+01:00",
+ "time":63,
+ "request":{
+ "method":"GET",
+ "url":"http://www.google.cz/",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[{
+ "name":"PREF",
+ "value":"ID"
+ },
+ {
+ "name":"NID",
+ "value":"29"
+ }
+ ],
+ "headers":[{
+ "name":"Host",
+ "value":"www.google.cz"
+ },
+ {
+ "name":"User-Agent",
+ "value":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name":"Accept",
+ "value":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
+ },
+ {
+ "name":"Accept-Language",
+ "value":"en-us,en;q=0.5"
+ },
+ {
+ "name":"Accept-Encoding",
+ "value":"gzip,deflate"
+ },
+ {
+ "name":"Accept-Charset",
+ "value":"ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name":"Keep-Alive",
+ "value":"115"
+ },
+ {
+ "name":"Connection",
+ "value":"keep-alive"
+ },
+ {
+ "name":"Cookie",
+ "value":"PREF=ID=580ec4c5a3534337:U=37a8fcc41ff49f78:TM=1260796678:LM=1260796682:S=9BgbomVM6pcnfah0; NID=29=OHyg2zMZl4IpG8C4a-Z5itM3gCXOuBPogGpTPVFPNsdpmIHJWX78ymRL_gqptvhr_IQrP319GQ1fxlKUsqaIokpxasPIIDq5ijatDmYiyamnCfJz8rXyNvt5GPjCJp2I"
+ }
+ ],
+ "queryString":[],
+ "headersSize":632,
+ "bodySize":-1
+ },
+ "response":{
+ "status":200,
+ "statusText":"OK",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[],
+ "headers":[{
+ "name":"Date",
+ "value":"Sat, 02 Jan 2010 13:51:06 GMT"
+ },
+ {
+ "name":"Expires",
+ "value":"-1"
+ },
+ {
+ "name":"Cache-Control",
+ "value":"private, max-age=0"
+ },
+ {
+ "name":"Content-Type",
+ "value":"text/html; charset=UTF-8"
+ },
+ {
+ "name":"Content-Encoding",
+ "value":"gzip"
+ },
+ {
+ "name":"Server",
+ "value":"gws"
+ },
+ {
+ "name":"Content-Length",
+ "value":"3694"
+ },
+ {
+ "name":"X-XSS-Protection",
+ "value":"0"
+ }
+ ],
+ "content":{
+ "size":8564,
+ "mimeType":"text/html",
+ "text":"<!doctype html><html onmousemove=\"google&&google.fade&&google.fade()\"><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"><title>Google</title><script>window.google={kEI:\"Sk8_S5PhGNT4_AbC2-HhBQ\",kEXPI:\"17259,18167,23129\",kCSI:{e:\"17259,18167,23129\",ei:\"Sk8_S5PhGNT4_AbC2-HhBQ\"},kHL:\"cs\",time:function(){return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,g=e.lc,f=e.li;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;c=c||\"/gen_204?atyp=i&ct=\"+b+\"&cad=\"+d+\"&zx=\"+google.time();a.src=c;e.li=f+1},lc:[],li:0};\u000awindow.google.sn=\"webhp\";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{}catch(u){}window.google.jsrt_kill=1;\u000avar _gjwl=location;function _gjuc(){var e=_gjwl.href.indexOf(\"#\");if(e>=0){var a=_gjwl.href.substring(e);if(a.indexOf(\"&q=\")>0||a.indexOf(\"#q=\")>=0){a=a.substring(1);if(a.indexOf(\"#\")==-1){for(var c=0;c<a.length;){var d=c;if(a.charAt(d)==\"&\")++d;var b=a.indexOf(\"&\",d);if(b==-1)b=a.length;var f=a.substring(d,b);if(f.indexOf(\"fp=\")==0){a=a.substring(0,c)+a.substring(b,a.length);b=c}else if(f==\"cad=h\")return 0;c=b}_gjwl.href=\"/search?\"+a+\"&cad=h\";return 1}}}return 0}function _gjp(){!(window._gjwl.hash&&\u000awindow._gjuc())&&setTimeout(_gjp,500)};\u000awindow._gjp && _gjp()</script><style>td{line-height:.8em;}.gac_m td{line-height:17px;}form{margin-bottom:20px;}body,td,a,p,.h{font-family:arial,sans-serif}.h{color:#36c;font-size:20px}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{font:17px arial,sans-serif;margin-bottom:.2em;vertical-align:bottom;}input{font-family:inherit}.lsb,.gac_sb{font-size:15px;height:1.85em!important;margin:.2em;}#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:0;}#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{background:#fff;}#gbar{float:left;height:22px}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}#gbs,.gbm{background:#fff;left:0;position:absolute;text-align:left;visibility:hidden;z-index:1000}.gbm{border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;z-index:1001}#guser{padding-bottom:7px !important;text-align:right}#gbar,#guser{font-size:13px;padding-top:1px !important}.gb1,.gb3,.gb3i,.gb3f{zoom:1;margin-right:.5em}.gb2,.gb2i,.gb2f{display:block;padding:.2em .5em}a.gb1,a.gb2,a.gb3,a.gb4{color:#00c !important}.gb2,.gb2i,.gb2f,.gb3,.gb3i,.gb3f{text-decoration:none}a.gb2:hover{background:#36c;color:#fff !important}</style><noscript><style>#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:1;}</style></noscript><script>google.y={};google.x=function(e,g){google.y[e.id]=[e,g];return false};window.gbar={qs:function(){},tg:function(e){var o={id:'gbar'};for(i in e)o[i]=e[i];google.x(o,function(){gbar.tg(o)})}};</script></head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload=\"document.f.q.focus();if(document.images)new Image().src='/images/nav_logo7.png'\" topmargin=3 marginheight=3><textarea id=csi style=display:none></textarea><div id=ghead><div id=gbar><nobr><b class=gb1>Web</b> <a href=\"http://images.google.cz/imghp?hl=cs&tab=wi\" onclick=gbar.qs(this) class=gb1>Obrázky</a> <a href=\"http://video.google.cz/?hl=cs&tab=wv\" onclick=gbar.qs(this) class=gb1>Videa</a> <a href=\"http://maps.google.cz/maps?hl=cs&tab=wl\" onclick=gbar.qs(this) class=gb1>Mapy</a> <a href=\"http://news.google.cz/nwshp?hl=cs&tab=wn\" onclick=gbar.qs(this) class=gb1>Zprávy</a> <a href=\"http://translate.google.cz/?hl=cs&tab=wT\" onclick=gbar.qs(this) class=gb1>Překladač</a> <a href=\"http://mail.google.com/mail/?hl=cs&tab=wm\" class=gb1>Gmail</a> <a href=\"http://www.google.cz/intl/cs/options/\" onclick=\"this.blur();gbar.tg(event);return !1\" aria-haspopup=true class=gb3><u>další</u> <small>&#9660;</small></a><div class=gbm id=gbi><a href=\"http://blogsearch.google.cz/?hl=cs&tab=wb\" onclick=gbar.qs(this) class=gb2>Blogy</a> <a href=\"http://www.youtube.com/?hl=cs&tab=w1&gl=CZ\" onclick=gbar.qs(this) class=gb2>YouTube</a> <a href=\"http://www.google.com/calendar/render?hl=cs&tab=wc\" class=gb2>Kalendář</a> <a href=\"http://picasaweb.google.cz/home?hl=cs&tab=wq\" onclick=gbar.qs(this) class=gb2>Fotografie</a> <a href=\"http://docs.google.com/?hl=cs&tab=wo\" class=gb2>Dokumenty</a> <a href=\"http://www.google.cz/reader/view/?hl=cs&tab=wy\" class=gb2>Reader</a> <a href=\"http://sites.google.com/?hl=cs&tab=w3\" class=gb2>Weby</a> <a href=\"http://groups.google.cz/grphp?hl=cs&tab=wg\" onclick=gbar.qs(this) class=gb2>Skupiny</a> <div class=gb2><div class=gbd></div></div><a href=\"http://www.google.cz/intl/cs/options/\" class=gb2>dále také &raquo;</a> </div></nobr></div><div id=guser width=100%><nobr><a href=\"/url?sa=p&pref=ig&pval=3&q=http://www.google.cz/ig%3Fhl%3Dcs%26source%3Diglk&usg=AFQjCNEjIy3HcIoHHp-ysNPPMy6WitPxSg\" class=gb4>iGoogle</a> | <a href=\"/preferences?hl=cs\" class=gb4>Nastavení vyhledávání</a> | <a href=\"https://www.google.com/accounts/Login?hl=cs&continue=http://www.google.cz/\" class=gb4>Přihlásit se</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div> <center><br clear=all id=lgpd><div align=left style=\"background:url(/intl/en_com/images/logo_plain.png) no-repeat;height:110px;width:276px\" title=\"Google\" id=logo onload=\"window.lol&&lol()\"><div nowrap style=\"color:#666;font-size:16px;font-weight:bold;left:208px;position:relative;top:78px\">Česká republika</div></div><br><form action=\"/search\" name=f><table cellpadding=0 cellspacing=0><tr valign=top><td width=25%>&nbsp;</td><td align=center nowrap><input name=hl type=hidden value=cs><input name=source type=hidden value=hp><input autocomplete=\"off\" onblur=\"google&&google.fade&&google.fade()\" maxlength=2048 name=q size=55 class=lst title=\"Vyhledat Googlem\" value=\"\"><br><input name=btnG type=submit value=\"Vyhledat Googlem\" class=lsb><input name=btnI type=submit value=\"Zkusím štěstí\" class=lsb></td><td nowrap width=25% align=left id=sbl><font size=-2>&nbsp;&nbsp;<a href=/advanced_search?hl=cs>Rozšířené vyhledávání</a><br>&nbsp;&nbsp;<a href=/language_tools?hl=cs>Jazykové nástroje</a></font></td></tr><tr><td align=center colspan=3><font size=-1><span style=\"text-align:left\" class=fade><input id=all type=radio name=lr value=\"\" checked><label for=all> Prohledat Web </label> <input id=il type=radio name=lr value=\"lang_cs\"><label for=il> Stránky pouze česky </label> </span></font></td></tr></table></form><br><span id=footer><center id=fctr><br><font size=-1><a href=\"/intl/cs/ads/\">Inzerujte s Googlem</a> - <a href=\"/intl/cs/about.html\">Vše o Google</a> - <a href=\"http://www.google.com/ncr\">Google.com in English</a></font><p><font size=-2>&copy;2010 - <a href=\"/intl/cs/privacy.html\">Osobní údaje</a></font></p></center></span> <div id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first=[];if(google.y)google.y.first=[];google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement(\"script\");a.src=\"/extern_js/f/CgJjcxICY3orMAo4QUAdLCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswJTjJiAEsKzAmOAgsKzAnOAIsKzA8OAEsKzBFOAAs/n26cL0r9CnM.js\";(document.getElementById(\"xjsd\")||document.body).appendChild(a);if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(new Date).getTime();},0);\u000a;google.y.first.push(function(){google.ac.b=true;google.ac.i(document.f,document.f.q,'','');(function(){\u000avar a=window.google.f={};a.f=1;a.s=1;a.a=(new Date).getTime();function m(b,g,e,f){var d,c=[],i=[];for(var h=0,k;k=b[h++];){var l=document.getElementById(k);if(l)c.push(l)}for(var h=0,j;j=g[h++];){var o=n(j[0],j[1]);while(d=o.pop())c.push(d)}while(d=c.pop())i.push([d,\"opacity\",e,f,0,\"\"]);return i}function n(b,\u000ag){var e=[];for(var f=document.getElementsByTagName(b),d=0,c=f[d];c=f[d++];)if(c.className==g)e.push(c);return e}google.fade=function(b){b=b||window.event;var g=1;if(b&&b.type==\"mousemove\"){var e=b.clientX,f=b.clientY;g=a.x||a.y?Math.abs(a.x-e)+Math.abs(a.y-f):0;a.x=e;a.y=f}var d=(new Date).getTime(),c=d-a.a;if(google.fx&&g&&c>602)if(a.f){a.f=0;var i=[\"fctr\",\"ghead\",\u000a\"pmocntr\",\"sbl\",\"tba\",\"tbe\"],h=[[\"span\",\"fade\"],[\"div\",\"gbh\"]];google.fx.animate(602,m(i,h,0,1))}};\u000a})();\u000a});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}</script></div><script>(function(){\u000afunction a(){google.timers.load.t.ol=(new Date).getTime();google.report&&google.timers.load.t.xjs&&google.report(google.timers.load,google.kCSI)}if(window.addEventListener)window.addEventListener(\"load\",a,false);else if(window.attachEvent)window.attachEvent(\"onload\",a);google.timers.load.t.prt=(new Date).getTime();\u000a})();\u000a</script>"
+ },
+ "redirectURL":"",
+ "headersSize":224,
+ "bodySize":3694
+ },
+ "cache":{},
+ "timings":{
+ "dns":0,
+ "connect":0,
+ "blocked":0,
+ "send":0,
+ "wait":63,
+ "receive":0
+ }
+ },
+ {
+ "pageref":"page_62143",
+ "startedDateTime":"2010-01-02T14:51:01.280+01:00",
+ "time":62,
+ "request":{
+ "method":"GET",
+ "url":"http://www.google.cz/intl/en_com/images/logo_plain.png",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[{
+ "name":"PREF",
+ "value":"ID"
+ },
+ {
+ "name":"NID",
+ "value":"29"
+ }
+ ],
+ "headers":[{
+ "name":"Host",
+ "value":"www.google.cz"
+ },
+ {
+ "name":"User-Agent",
+ "value":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name":"Accept",
+ "value":"image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name":"Accept-Language",
+ "value":"en-us,en;q=0.5"
+ },
+ {
+ "name":"Accept-Encoding",
+ "value":"gzip,deflate"
+ },
+ {
+ "name":"Accept-Charset",
+ "value":"ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name":"Keep-Alive",
+ "value":"115"
+ },
+ {
+ "name":"Connection",
+ "value":"keep-alive"
+ },
+ {
+ "name":"Referer",
+ "value":"http://www.google.cz/"
+ },
+ {
+ "name":"Cookie",
+ "value":"PREF=ID=580ec4c5a3534337:U=37a8fcc41ff49f78:TM=1260796678:LM=1260796682:S=9BgbomVM6pcnfah0; NID=29=OHyg2zMZl4IpG8C4a-Z5itM3gCXOuBPogGpTPVFPNsdpmIHJWX78ymRL_gqptvhr_IQrP319GQ1fxlKUsqaIokpxasPIIDq5ijatDmYiyamnCfJz8rXyNvt5GPjCJp2I"
+ }
+ ],
+ "queryString":[],
+ "headersSize":667,
+ "bodySize":-1
+ },
+ "response":{
+ "status":200,
+ "statusText":"OK",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[],
+ "headers":[{
+ "name":"Content-Type",
+ "value":"image/png"
+ },
+ {
+ "name":"Last-Modified",
+ "value":"Mon, 17 Mar 2008 22:38:58 GMT"
+ },
+ {
+ "name":"Date",
+ "value":"Sat, 02 Jan 2010 13:51:05 GMT"
+ },
+ {
+ "name":"Expires",
+ "value":"Sun, 02 Jan 2011 13:51:05 GMT"
+ },
+ {
+ "name":"Server",
+ "value":"gws"
+ },
+ {
+ "name":"Content-Length",
+ "value":"7582"
+ },
+ {
+ "name":"Cache-Control",
+ "value":"public, max-age=31536000"
+ },
+ {
+ "name":"Age",
+ "value":"1"
+ },
+ {
+ "name":"X-XSS-Protection",
+ "value":"0"
+ }
+ ],
+ "content":{
+ "size":7582,
+ "mimeType":"image/png"
+ },
+ "redirectURL":"",
+ "headersSize":272,
+ "bodySize":7582
+ },
+ "cache":{},
+ "timings":{
+ "dns":0,
+ "connect":0,
+ "blocked":0,
+ "send":0,
+ "wait":31,
+ "receive":31
+ }
+ },
+ {
+ "pageref":"page_62143",
+ "startedDateTime":"2010-01-02T14:51:01.296+01:00",
+ "time":78,
+ "request":{
+ "method":"GET",
+ "url":"http://www.google.cz/extern_js/f/CgJjcxICY3orMAo4QUAdLCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswJTjJiAEsKzAmOAgsKzAnOAIsKzA8OAEsKzBFOAAs/n26cL0r9CnM.js",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[{
+ "name":"PREF",
+ "value":"ID"
+ },
+ {
+ "name":"NID",
+ "value":"29"
+ }
+ ],
+ "headers":[{
+ "name":"Host",
+ "value":"www.google.cz"
+ },
+ {
+ "name":"User-Agent",
+ "value":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name":"Accept",
+ "value":"*/*"
+ },
+ {
+ "name":"Accept-Language",
+ "value":"en-us,en;q=0.5"
+ },
+ {
+ "name":"Accept-Encoding",
+ "value":"gzip,deflate"
+ },
+ {
+ "name":"Accept-Charset",
+ "value":"ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name":"Keep-Alive",
+ "value":"115"
+ },
+ {
+ "name":"Connection",
+ "value":"keep-alive"
+ },
+ {
+ "name":"Referer",
+ "value":"http://www.google.cz/"
+ },
+ {
+ "name":"Cookie",
+ "value":"PREF=ID=580ec4c5a3534337:U=37a8fcc41ff49f78:TM=1260796678:LM=1260796682:S=9BgbomVM6pcnfah0; NID=29=OHyg2zMZl4IpG8C4a-Z5itM3gCXOuBPogGpTPVFPNsdpmIHJWX78ymRL_gqptvhr_IQrP319GQ1fxlKUsqaIokpxasPIIDq5ijatDmYiyamnCfJz8rXyNvt5GPjCJp2I"
+ }
+ ],
+ "queryString":[],
+ "headersSize":735,
+ "bodySize":-1
+ },
+ "response":{
+ "status":200,
+ "statusText":"OK",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[],
+ "headers":[{
+ "name":"Content-Type",
+ "value":"text/javascript; charset=UTF-8"
+ },
+ {
+ "name":"Expires",
+ "value":"Sat, 01 Jan 2011 00:00:00 GMT"
+ },
+ {
+ "name":"Last-Modified",
+ "value":"Sat, 03 Jan 2009 00:00:00 GMT"
+ },
+ {
+ "name":"Cache-Control",
+ "value":"private, x-gzip-ok=\"\""
+ },
+ {
+ "name":"Content-Encoding",
+ "value":"gzip"
+ },
+ {
+ "name":"Date",
+ "value":"Sat, 02 Jan 2010 13:51:06 GMT"
+ },
+ {
+ "name":"Server",
+ "value":"gws"
+ },
+ {
+ "name":"Content-Length",
+ "value":"8646"
+ },
+ {
+ "name":"X-XSS-Protection",
+ "value":"0"
+ }
+ ],
+ "content":{
+ "size":22832,
+ "mimeType":"text/javascript",
+ "text":"(function(){\u000aif(!google.nocsixjs&&google.timers&&google.timers.load.t)google.timers.load.t.xjses=(new Date).getTime();\u000a})();\u000a(function(){\u000agoogle.isOpera=false;google.isIE=false;google.isSafari=false;\u000agoogle.xhr=function(){var a=null;try{a=new XMLHttpRequest}catch(d){}return a};\u000agoogle.getComputedStyle=function(a,d,c){var b=c?\"\":0;var e=document.defaultView&&document.defaultView.getComputedStyle(a,\"\");b=e.getPropertyValue(d);b=c?b:parseInt(b,10);return b};google.getHeight=function(a){return google.getComputedStyle(a,\"height\")};google.getWidth=function(a){return google.getComputedStyle(a,\"width\")};google.getPageOffsetTop=function(a){return a.offsetTop+(a.offsetParent?google.getPageOffsetTop(a.offsetParent):0)};\u000agoogle.getPageOffsetLeft=function(a){return a.offsetLeft+(a.offsetParent?google.getPageOffsetLeft(a.offsetParent):0)};google.getPageOffsetStart=function(a){return google.getPageOffsetLeft(a)};google.getColor=function(a){return google.getComputedStyle(a,\"color\",true)};google.rhs=function(){};var f,h=location;\u000agoogle.nav=function(a,d){try{var c=location.protocol+\"//\"+location.host;if((new RegExp(\"^(\"+c+\")?/url\\\\?.*&rct=j(&|$)\")).test(a))if(d){google.r=1;d.location.replace(a)}else{if(!f){f=document.createElement(\"iframe\");f.style.display=\"none\";google.append(f)}google.r=1;f.src=a}else h.href=a}catch(b){h.href=a}};google.append=function(a){return(document.getElementById(\"xjsc\")||document.body).appendChild(a)};google.bind=function(a,d,c){a.addEventListener(d,c,false);};\u000a})();\u000a(function(){\u000avar c=window,f=Object,h=google,i=\"push\",j=\"length\",k=\"propertyIsEnumerable\",l=\"prototype\",m=\"call\";\u000afunction n(a){var b=typeof a;if(b==\"object\")if(a){if(a instanceof Array||!(a instanceof f)&&f[l].toString[m](a)==\"[object Array]\"||typeof a[j]==\"number\"&&typeof a.splice!=\"undefined\"&&typeof a[k]!=\"undefined\"&&!a[k](\"splice\"))return\"array\";if(!(a instanceof f)&&(f[l].toString[m](a)==\"[object Function]\"||typeof a[m]!=\"undefined\"&&typeof a[k]!=\"undefined\"&&!a[k](\"call\")))return\"function\"}else return\"null\";else if(b==\"function\"&&typeof a[m]==\"undefined\")return\"object\";return b}\u000afunction o(a){return(new p).serialize(a)}function p(){}p[l].serialize=function(a){var b=[];this.a(a,b);return b.join(\"\")};p[l].a=function(a,b){switch(typeof a){case \"string\":this.b(a,b);break;case \"number\":this.d(a,b);break;case \"boolean\":b[i](a);break;case \"undefined\":b[i](\"null\");break;case \"object\":if(a==null){b[i](\"null\");break}if(n(a)==\"array\"){this.c(a,b);break}this.e(a,b);break;case \"function\":break;default:throw Error(\"Unknown type: \"+typeof a);}};\u000avar q={'\"':'\\\\\"',\"\\\\\":\"\\\\\\\\\",\"/\":\"\\\\/\",\"\\u0008\":\"\\\\b\",\"\\u000c\":\"\\\\f\",\"\\n\":\"\\\\n\",\"\\r\":\"\\\\r\",\"\\t\":\"\\\\t\",\"\\u000b\":\"\\\\u000b\"},r=/\\uffff/.test(\"\\uffff\")?/[\\\\\\\"\\x00-\\x1f\\x7f-\\uffff]/g:/[\\\\\\\"\\x00-\\x1f\\x7f-\\xff]/g;p[l].b=function(a,b){b[i]('\"',a.replace(r,function(g){if(g in q)return q[g];var d=g.charCodeAt(0),e=\"\\\\u\";if(d<16)e+=\"000\";else if(d<256)e+=\"00\";else if(d<4096)e+=\"0\";return q[g]=e+d.toString(16)}),'\"')};p[l].d=function(a,b){b[i](isFinite(a)&&!isNaN(a)?a:\"null\")};\u000ap[l].c=function(a,b){var g=a[j];b[i](\"[\");for(var d=\"\",e=0;e<g;e++){b[i](d);this.a(a[e],b);d=\",\"}b[i](\"]\")};p[l].e=function(a,b){b[i](\"{\");var g=\"\";for(var d in a)if(a.hasOwnProperty(d)){var e=a[d];if(typeof e!=\"function\"){b[i](g);this.b(d,b);b[i](\":\");this.a(e,b);g=\",\"}}b[i](\"}\")};c.google.stringify=o;if(c.JSON&&c.JSON.stringify&&navigator.userAgent.indexOf(\"Chrome\")==-1)c.google.stringify=c.JSON.stringify;h.History={};var s=[],t=\"#\";h.History.client=function(a){s[i](a);return s[j]-1};var u,v;function w(){var a=u.value;v=a?eval(\"(\"+a+\")\"):{}}h.History.save=function(a,b){if(u){w();v[t]||(v[t]={});v[t][a]=b;u.value=h.stringify(v)}};function x(){v=null;(u=document.getElementById(\"hcache\"))&&c.setTimeout(function(){w();for(var a=0;a<s[j];++a)v&&v[t]&&v[t][a]&&s[a][m](null,v[t][a])},0)}x();h.rein[i](function(){t=h.pageState;x()});\u000a})();\u000a(function(){\u000avar a,b;google.rhs=function(){if(!google.drhs)if(document.getElementById(\"mbEnd\")&&(a||b)){var d=google.getHeight(document.getElementById(\"rhsline\")),c=a?google.getHeight(a):0;if(b)c+=google.getHeight(b)+18;document.getElementById(\"rhspad\").style.height=c>d?Math.min(9999,c-d)+\"px\":(google.isIE?\"\":0)}};function e(){a=document.getElementById(\"tads\");b=document.getElementById(\"3po\");google.rhs()}e();google.bind(window,\"resize\",google.rhs);google.rein.push(e);\u000a})();\u000a(function(){\u000avar f=0,g=[];google.fx={};google.fx.linear=function(a){return a};google.fx.easeOut=function(a){return 1-Math.pow(1-a,3)};google.fx.easeInAndOut=function easeInAndOut(a){return(3-2*a)*a*a};google.fx.animate=function(a,d,e){for(var c=0,b;b=d[c++];){b[5]=b[5]==null?\"px\":b[5];b[4]=b[4]||google.fx.linear;h(b[0],b[1],b[2]+b[5])}g.push({b:a,a:e,d:google.time(),c:d});f=f||window.setInterval(i,15)};function i(){for(var a=0,d;d=g[a++];)j(d)||g.splice(--a,1);if(!g.length){window.clearInterval(f);f=0}}function j(a){var d=\u000agoogle.time()-a.d;if(d>=a.b){for(var e=0,c;c=a.c[e++];)h(c[0],c[1],c[3]+c[5]);a.a&&a.a();return 0}else{for(var e=0,c;c=a.c[e++];){var b=c[2]+(c[3]-c[2])*c[4](d/a.b);if(c[5]==\"px\")b=Math.round(b);h(c[0],c[1],b+c[5])}return 1}}function h(a){for(var d=1;d<arguments.length;d+=2){var e=arguments[d],c=arguments[d+1],b=a.style;if(b&&e in b)b[e]=c;else if(e in a)a[e]=c;}return a}google.fx.wrap=function(a){var d=document.createElement(\"div\");a.parentNode.replaceChild(d,a);d.appendChild(a);return d};google.fx.unwrap=function(a){a.parentNode.parentNode.replaceChild(a,a.parentNode)};google.dstr.push(function(){window.clearInterval(f);f=0;g=[]});\u000a})();\u000a(function(){\u000avar c=false,e=null,g=true,aa=c,h,i,j,m=\"\",n=e;var o=e,p=e,q=-1,s,t,u,v,w,z,A,B=0,C=0,D=e,E=0;var F,G;var I;\u000avar ca=\"13px\",da=\"17px\";\u000afunction ea(){if(!w)return;fa();P();w.value=z.value=\"\";window.clearTimeout(n);m=A=\"\";n=o=p=e;q=-1;B=C=E=0;I=0;}\u000avar ga=\"clients1.google.cz\";\u000afunction ia(a,b,d,k,f){s=a;t=b;G=document.getElementsByTagName(\"body\")[0];i=j=h=t.value;if(!b.init){google.bind(s,\"submit\",ja);t.setAttribute(\"autocomplete\",\"off\");google.bind(t,\"blur\",P);t.onkeypress=R;google.bind(t,\"keyup\",S);w=ka(\"aq\",\"f\");z=ka(\"oq\",i);u=\u000adocument.createElement(\"table\");u.cellSpacing=u.cellPadding=\"0\";v=u.style;u.className=\"gac_m\";s.appendChild(u);b.init=g}P();U();if(!aa){la();aa=g}A=[\"/complete/search\",\"?hl=\",google.kHL,(d?\"&ds=\"+d:\"\"),(k?\"&pq=\"+encodeURIComponent(k):\"\")].join(\"\");i=j=h=t.value;I=ma(t);\u000aW();(new Image).src=\"http://\"+ga+\"/generate_204\";}\u000afunction la(){var a=[];function b(l,r){a.push(l,\"{\",r,\"}\")}var d=google.ac.b;b(\".gac_m\",\"cursor:default;border:1px solid #000;z-index:99;background:#fff;position:absolute;margin:0;font-size:\"+(d?\"17px\":ca));b(\".gac_m td\",\"line-height:\"+(d?\"22px\":da));b(\".gac_b\",\"background:#36c;color:#fff\");var k=\"padding-left:3px;white-space:nowrap;overflow:hidden;text-align:left;\";\u000ab(\".gac_c\",k);b(\".gac_d\",\"padding:0 3px;white-space:nowrap;overflow:hidden;text-align:right;color:green;font-size:0.77em\");b(\".gac_b td\",\"color:#fff\");b(\".gac_e\",\"padding:0 3px 2px;text-decoration:underline;text-align:right;color:#00c;font-size:0.77em;line-height:0.88em\");a=a.join(\"\");var f=document.createElement(\"style\");f.setAttribute(\"type\",\"text/css\");document.getElementsByTagName(\"head\")[0].appendChild(f);f.appendChild(document.createTextNode(a));}\u000afunction U(){if(u){v.left=na(t,\"offsetLeft\")+\"px\";v.top=na(t,\"offsetTop\")+t.offsetHeight-1+\"px\";v.width=t.offsetWidth+\"px\";}}function ka(a,b){var d=document.createElement(\"input\");d.type=\"hidden\";d.name=a;d.value=b;return s.appendChild(d)}\u000afunction R(a){var b=a.keyCode;if(b==27&&pa()){P();X(i);a.cancelBubble=g;return a.returnValue=c}if(b==38||b==40){C++;C%3==1&&V(b);return c}}function S(a){var b=a.keyCode;if(C==0)V(b);C=0;}\u000afunction V(a){if(t.value!=h){i=t.value;I=ma(t);z.value=i}a==40&&qa(q+1);a==38&&qa(q-1);U();if(m!=i&&!D)D=window.setTimeout(P,500);h=t.value;h==\"\"&&!n&&W()}function ra(){if(E)return;if(p)p.className=\"gac_a\";this.className=\"gac_b\";p=this;for(var a=0,b;b=o[a];a++)b==p&&(q=a)}\u000afunction qa(a){if(!m&&i){j=\"\";W();return}if(i!=m||!n)return;if(!o||o.length<=0)return;if(!pa()){Y();return}var b=o.length-1;if(p)p.className=\"gac_a\";if(a==b||a==-1){q=-1;X(i);t.focus();w.value=\"f\";return}else if(a>b)a=0;else if(a<-1)a=b-1;q=a;p=o.item(a);p.className=\"gac_b\";X(p.completeString);w.value=p.completeId}\u000afunction P(){if(D){window.clearTimeout(D);D=e}v&&(v.visibility=\"hidden\");}function Y(){v&&(v.visibility=\"visible\");U();E=1}function pa(){return!!v&&v.visibility==\"visible\"}\u000afunction fa(){if(u){u.innerHTML=\"\";}}\u000afunction sa(a){B>0&&B--;if(!u||a[0]!=i)return;if(D){window.clearTimeout(D);D=e}m=a[0];fa();var d=c;for(var k=0,f;k<a[1].length;k++)if(f=a[1][k]){d=g;var l=u.insertRow(-1);l.onclick=function(){X(this.completeString);ja();s.onsubmit&&s.onsubmit()==c||s.submit();};l.onmousedown=Z;l.onmouseover=ra;l.onmousemove=function(){if(E){E=0;ra.call(this)}};l.completeString=\u000af[0];l.completeId=f[2];l.className=\"gac_a\";var r=document.createElement(\"td\");$(r,f[0]);r.className=\"gac_c\";l.appendChild(r);var L=document.createElement(\"td\");$(L,f[1]);L.className=\"gac_d\";l.appendChild(L);}\u000aif(d){var y=u.insertRow(-1);y.onmousedown=Z;var x=document.createElement(\"td\");x.colSpan=2;y.className=\"gac_e\";y.appendChild(x);var T=document.createElement(\"span\");T.style.cursor=\"pointer\";x.appendChild(T);$(T,\"zavřít\");T.onclick=function(){P();m=\"\";window.clearTimeout(n);\u000an=e;w.value=\"x\"}}q=-1;o=u.rows;(o&&o.length>0?Y:P)()}function ja(){P();if(z.value!=t.value)w.value=o&&o.item(q)&&o.item(q).completeId;else{z.value=\"\";if(B>=10)w.value=\"o\"}}\u000afunction W(){if(j!=i&&i){B++;F&&G.removeChild(F);F=document.createElement(\"script\");F.src=[\"http://\",ga,A,\"&q=\",encodeURIComponent(i),\"&cp=\"+I].join(\"\");G.appendChild(F);t.focus()}j=i;var a=100;for(var b=1;b<=(B-2)/2;++b)a*=\u000a2;a+=50;n=window.setTimeout(W,a)}function X(a){if(t)t.value=h=a}function na(a,b){var d=0;while(a){d+=a[b];a=a.offsetParent}return d}function $(a,b){a.appendChild(document.createTextNode(b))}\u000afunction Z(a){a.stopPropagation();return c}\u000afunction ma(a){var b=0,d=0;if(va(a)){b=a.selectionStart;d=a.selectionEnd}return b&&d&&b==d?b:0}\u000afunction va(a){try{return typeof a.selectionStart==\"number\"}catch(b){return c}}window.google.ac={i:ia,h:sa,u:X};google.bind(window,\"resize\",U);google.dstr.push(ea);\u000a})();\u000a(function(){\u000awindow.ManyBox={};var e,g,h=1,j=google.History.client(i);function k(a){for(var b in e)if(e[b].c&&a(e[b]))return}function l(a,b,c,d,f){this.c=a;this.i=b;this.C=d;this.o=f;this.q=\"/mbd?\"+(b?\"docid=\"+b:\"\")+\"&resnum=\"+a.replace(/[^0-9]/,\"\")+\"&mbtype=\"+d+\"&usg=\"+c+\"&hl=\"+(google.kHL||\"\");this.e={};this.l=\"\";g[a]={r:0,F:this.e,i:this.i,f:0};this.n=0}l.prototype.append=function(a){this.l+=\"&\"+a.join(\"&\")};function m(a,b){return document.getElementById(\"mb\"+b+a.c)}function n(a,b){a.h.style.paddingTop=b+\"px\";\u000aa.h.style.display=a.h.innerHTML?\"\":\"none\";if(b>a.n)a.n=b}function q(a){if(!a.B){a.B=1;a.d=m(a,\"b\");a.j=0;a.a=m(a,\"l\");a.m=a.a.getElementsByTagName(\"DIV\")[0];a.p=a.a.getElementsByTagName(\"A\")[0];a.z=a.p.innerHTML;a.o=a.o||a.z;a.m.title=\"Pro další informace klikněte zde...\";a.a.G=function(b,c){var d=google.getPageOffsetStart(a.a),f=google.getPageOffsetTop(a.a);return b>d-5&&b<d+google.getWidth(a.a)+5&&c>f-5&&c<f+google.getHeight(a.a)+5};a.h=m(a,\"f\");n(a,0);a.a.onmousedown=r(a);a.a.onclick=s(a);a.a.go=function(){a.a.onmousedown();\u000aa.a.onclick()}}}function t(a){google.log(\"manybox\",[a.j?\"close\":\"open\",\"&id=\",a.c,\"&docid=\",a.i,\"&mbtype=\",a.C,a.l].join(\"\"))}function r(a){return function(){if(g[a.c].f){if(a.A++<3)t(a)}else if(a.e.k){t(a);g[a.c].f=(a.A=1)}else{var b=google.xhr();if(b){b.open(\"GET\",a.q+a.l+\"&zx=\"+google.time());a.t=0;b.onreadystatechange=function(){if(b.readyState==4){var c=0;if(b.status==200)try{eval(b.responseText);c=1}catch(d){}if(!c&&!a.D){g[a.c].f=0;a.D=1;a.q+=\"&cad=retry\";a.a.onmousedown()}else{a.u&&x(a);a.t=\u000a0}}};a.t=1;b.send(null)}g[a.c].f=(a.A=1)}}}function s(a){return function(){g[a.c].f||a.a.onmousedown();(a.u=a.t)||x(a)}}function y(a){if(!a.e.k){a.e.k=\"\\x3cfont color\\x3dred\\x3eChyba:\\x3c/font\\x3e Server nemohl dokončit váš požadavek. Vyčkejte 30 sekund a zkuste to znovu.\";a.H=a.a.onclick;a.a.onclick=function(){h=0;x(a);h=1;a.b.parentNode.removeChild(a.b);g[a.c].f=(a.e.k=(a.v=0));a.a.onclick=a.H}}if(!a.v){a.v=1;var b=document.getElementById(\"res\");a.I=b&&google.getPageOffsetStart(a.d)>google.getPageOffsetStart(b)+google.getWidth(b);a.b=document.createElement(\"div\");n(a,0);a.b.style.position=\"absolute\";\u000aa.b.style.paddingTop=(a.b.style.paddingBottom=\"6px\");a.b.style.display=\"none\";a.b.className=\"med\";var c=document.createElement(\"div\");a.b.appendChild(c);c.className=\"std\";c.innerHTML=a.e.k;a.h.parentNode.insertBefore(a.b,a.h)}}function i(a){h=0;ManyBox.init();k(function(b){if(b.i==a[b.c].i){b.e=a[b.c].F;if(a[b.c].r!=b.j)x(b)}else a[b.c].f=0});g=a;h=1;google.History.save(j,g)}ManyBox.create=function(a,\u000ab,c,d,f){return new l(a,b,c,d,f)};ManyBox.register=function(a,b,c,d,f){return e[a]=ManyBox.create(a,b,c,d,f)};google.bind(document,\"click\",function(a){a=a||window.event;var b=a.target||a.srcElement;while(b.parentNode){if(b.tagName==\"A\"||b.onclick)return;b=b.parentNode}k(function(c){if(c.a.G(a.clientX,a.clientY)){c.a.go();return 1}})});function z(){e={};g={};history.navigationMode=history.navigationMode&&\"fast\"}z();ManyBox.init=function(){k(q)};function A(a,b){a.b.style.clip=\"rect(0px,\"+(a.d.width||\u000a\"34em\")+\",\"+(b||1)+\"px,0px)\"}l.prototype.insert=function(a){this.e.k=a};function B(a){a.g=m(a,\"cb\");var b=a.g&&a.g.getAttribute(\"mbopen\");if(b){eval(b);a.onopen(a.g)}}function C(a){a.b.style.display=\"none\";a.m.style.backgroundPosition=\"-91px -74px\";a.p.innerHTML=a.z;a.j=(g[a.c].r=0);google.History.save(j,g)}function D(a,b,c,d,f){var u=c>0?150:75,v=google.time()-f,w=v<u&&h?v/u*c:(d>1?c-10:c),o=Math.max(a.s,b+w),p=o-a.s;A(a,p);a.d.style.height=o<0?0:(p?o+\"px\":\"\");n(a,Math.max(0,p-5));google.rhs();if(Math.abs(w)<\u000aMath.abs(c))window.setTimeout(function(){D(a,b,c,d-1,f)},30);else window.setTimeout(function(){c<0?C(a):B(a);if(!google.isIE&&a.I)a.b.style.width=\"100px\";a.b.style.position=(a.d.style.height=\"\");n(a,0);google.rhs();a.d.w=0},0)}function x(a){a.u=0;if(!a.d.w){a.d.w=1;var b;if(!a.j){a.s=google.getHeight(a.d);y(a);n(a,0);a.n=0;k(function(d){d.m.title=\"\"});a.m.style.backgroundPosition=\"-105px -74px\";a.p.innerHTML=a.o;A(a,1);a.b.style.position=\"absolute\";a.b.style.display=\"\";a.j=(g[a.c].r=1);google.History.save(j,\u000ag);b=a.b.offsetHeight}else{var c=a.g&&a.g.getAttribute(\"mbclose\");if(c){eval(c);a.onclose(a.g)}b=a.s-google.getHeight(a.d);a.h.style.display=\"none\";n(a,a.n);a.b.style.position=\"absolute\"}D(a,google.getHeight(a.d),b,google.isSafari?2:1,google.time())}}google.dstr&&google.dstr.push(z);\u000a})();\u000a(function(){\u000avar h=false,i=true,k,m;\u000afunction o(){k=document.createElement(\"style\");document.getElementsByTagName(\"head\")[0].appendChild(k);m=k.sheet;}\u000agoogle.addCSSRule=function(a,b){k||o();var e=a+\"{\"+b+\"}\";m.insertRule(e,m.cssRules.length);};google.acrs=function(a){for(var b=a.split(/{|}/),c=1;c<b.length;c+=2)google.addCSSRule(b[c-1],b[c])};google.Toolbelt={};\u000avar p=null,r=h,s=h,t=document.location.href.match(\"^.*?://[^/]*\")[0],u,v;function w(a,b){v=document.getElementById(\"tbd\");u=v.innerHTML=a;b||google.Toolbelt.toggle(null,null,i);google.j&&google.j.trap&&google.j.trap()}var y=google.History.client(function(a){w(a.content,a.open==google.Toolbelt.isToolbeltOpen())}),z=google.History.client(function(a){google.acrs(a)});google.Toolbelt.ascrs=function(a){google.acrs(a);google.History.save(z,a)};var A=[];google.rein.push(function(){A=[]});\u000agoogle.Toolbelt.registerToolbeltCallback=function(a){A.push(a)};function B(){for(var a=0,b;b=A[a++];)b()}google.rein.push(function(){A=[]});google.Toolbelt.listeners=function(){return A};var C=/([?&])tbo=([^&]*)(&|$)/;function D(a){var b=a.match(C);return b?b[2]:\"\"}function E(a){var b=D(a);return mbtb1.obd?b!=\"0\":b!=\"\"&&b!=\"0\"}google.Toolbelt.setCurrentTbo=function(a){return F(a,google.Toolbelt.isToolbeltOpen())};\u000afunction F(a,b){var c=mbtb1.obd&&!D(a)?\"\":\"1\",d=mbtb1.obd?\"0\":\"\",f=b?c:d;return a.replace(C,\"$1\").replace(/&$/,\"\")+(f?\"&tbo=\"+f:\"\")}\u000agoogle.Toolbelt.updateTbo=function(){var a=google.Toolbelt.isToolbeltOpen();if(!(a==E(google.base_href))){var b=document.getElementsByTagName(\"A\");google.base_href=F(google.base_href,a);for(var c=0,d;d=b[c++];)if(d.href.match(\"^(\"+t+\")?/(?!url|aclk|[^?]*$)\")&&d!=p&&!d.href.match(\"[?&]tbo=u(&|$)\")){d.href=F(d.href,a);}for(var c=0,e;e=document.forms[c++];)if(e.action.match(\"/search$\")){for(var g=\u000a0,q=0,j;j=e.elements[q++];)if(j.name==\"tbo\"){g=1;if(a)j.value=\"1\";else if(mbtb1.obd)j.value=\"0\";else j.parentNode.removeChild(j)}if(!g){var l=document.createElement(\"input\");l.type=\"hidden\";l.value=a?\"1\":\"0\";l.name=\"tbo\";e.appendChild(l)}}}};google.Toolbelt.isToolbeltOpen=function(){return/\\btbo\\b/.test(document.body.className)};\u000agoogle.Toolbelt.toggle=function(a,b,c){b=b||window.event;if(a)p=a;b&&b.stopPropagation();v=document.getElementById(\"tbd\");if(!v)return i;u=v.innerHTML;var d=v.getElementsByTagName(\"DIV\").length>0,f=google.Toolbelt.isToolbeltOpen(),e=c||!!document.getElementById(\"tbt5\")||mbtb1.na;if(f&&!s){H(h,e);google.log(\"toolbelt\",\"0&ei=\"+google.kEI);r=i}else if(d){H(i,\u000ae);r&&google.log(\"toolbelt\",\"1&ei=\"+google.kEI)}else{mbtb1.insert=w;var g=google.xhr();if(g){g.open(\"GET\",[google.pageState?google.pageState.replace(\"#\",\"/mbd?\"):google.base_href.replace(/^\\/search\\?/,\"/mbd?\"),\"&mbtype=29&resnum=1&tbo=1\",mbtb1.tbs?\"&tbs=\"+mbtb1.tbs:\"\",\"&docid=\",mbtb1.docid,\"&usg=\",mbtb1.usg,\"&zx=\",google.time()].join(\"\"),i);g.onreadystatechange=function(){if(g.readyState==4&&g.status==200)try{eval(g.responseText)}catch(q){window.location.replace(a.href)}};g.send(null);s=i;H(i,e)}return h}google.History.save(y,\u000a{content:u,open:s||!f});return s=h};function I(a){for(;a&&a.className!=\"tbt\";)a=a.parentNode;return a}google.Toolbelt.ctlClk=function(a,b){a=a||\"cdr_opt\";b=b||\"cdr_min\";var c=document.getElementById(a);if(c){c.className=\"tbots\";var d=I(c);if(d){for(var f=0,e;e=d.childNodes[f++];)if(e.className==\"tbos\")e.className=\"tbotu\";var g=document.getElementById(b);g&&g.focus()}}return h};google.Toolbelt.cdrClk=google.Toolbelt.ctlClk;\u000afunction J(a){return a.replace(/_/g,\"_1\").replace(/,/g,\"_2\").replace(/:/g,\"_3\")}google.Toolbelt.cdrSbt=function(){return K(\"ctbs\",{cdr_min:\"cd_min\",cdr_max:\"cd_max\"})};google.Toolbelt.clSbt=function(){return K(\"ltbs\",{l_in:\"cl_loc\"})};function K(a,b){var c=document.getElementById(a);if(c)for(var d in b){var f=J(document.getElementById(d).value),e=new RegExp(\"(\"+b[d]+\":)([^,]*)\");c.value=c.value.replace(e,\"$1\"+f)}return i}\u000agoogle.Toolbelt.tbosClk=function(a){var b=a||window.event,c=b.target||b.srcElement;if(c&&c.className==\"tbotu\"){c.className=\"tbos\";var d=I(c);if(d)for(var f=0,e;e=d.childNodes[f++];)if(e.className==\"tbots\")e.className=\"tbou\"}};var L=google.fx.easeOut,M=[[\"tads\",\"margin-left\",\"marginLeft\"],[\"res\",\"margin-left\",\"marginLeft\"],[\"tbd\",\"margin-left\",\"marginLeft\"],[\"mbEnd\",\"width\",\"width\"],[\"tbt3\",\"left\",\"left\"],[\"tbt8\",\"left\",\"left\"],[\"tbt5\",\"margin-left\",\"marginLeft\"]],N=h;\u000afunction O(a){for(var b=0,c=0,d;d=M[c++];){var f=document.getElementById(d[0]);f&&a(f,d,b++)}}function P(){var a=[];O(function(b,c){var d=c[1];a.push(d==\"width\"?b.offsetWidth:google.getComputedStyle(b,d))});return a}\u000afunction H(a,b){if(!N){var c=[],d=P(),f=google.getComputedStyle(v,\"left\",i),e=document.getElementById(\"cdr_min\"),g=document.getElementById(\"cdr_max\");if(e&&g){e.style.width=google.getComputedStyle(e,\"width\",i);g.style.width=google.getComputedStyle(g,\"width\",i)}document.body.className=document.body.className.replace(/\\btbo\\b/,\"\")+(a?\" tbo\":\"\");google.Toolbelt.updateTbo();B();if(!b){if(a){f=google.getComputedStyle(v,\"left\",i);if(e&&g){e.style.width=google.getComputedStyle(e,\"width\",i);g.style.width=\u000agoogle.getComputedStyle(g,\"width\",i)}}var q=P();O(function(l,x,G){c.push([l,x[2],d[G],q[G],L])});var j=google.fx.wrap(v);j.style.position=\"absolute\";j.style.overflow=\"hidden\";j.style.left=f;v.style.display=\"block\";v.style.position=\"static\";N=i;google.fx.animate(a?400:200,c,function(){O(function(l,x){l.style[x[2]]=\"\"});v.style.position=\"absolute\";v.style.display=\"\";google.fx.unwrap(v);if(e&&g){e.style.width=\"\";g.style.width=\"\"}N=h})}}};\u000a})();\u000aif(!window.gbar||!gbar.close){window.gbar={};(function(){var e=window.gbar,g,j;function k(a){var b=window.encodeURIComponent&&(document.forms[0].q||\"\").value;if(b)a.href=a.href.replace(/([?&])q=[^&]*|$/,function(h,d){return(d||\"&\")+\"q=\"+encodeURIComponent(b)})}e.qs=k;function m(a,b,h,d,f,l){var i=document.getElementById(a),c=i.style;if(i){c.left=d?\"auto\":b+\"px\";c.right=d?b+\"px\":\"auto\";c.top=h+\"px\";c.visibility=j?\"hidden\":\"visible\";if(f){c.width=f+\"px\";c.height=l+\"px\"}else{m(g,b,h,d,i.offsetWidth,i.offsetHeight);j=j?\"\":a}}}e.tg=function(a){a=a||window.event;var b=a.target||a.srcElement;a.cancelBubble=true;if(!g){a=document.createElement(Array.every||window.createPopup?\"iframe\":\"div\");a.frameBorder=\"0\";a.src=\"#\";g=b.parentNode.appendChild(a).id=\"gbs\";document.onclick=e.close;if(e.alld){e.alld(function(){n(b)});return}}n(b)};function n(a){var b=0,h,d=window.navExtra;if(a.className!=\"gb3\")a=a.parentNode;var f=a.getAttribute(\"aria-owns\")||\"gbi\",l=a.offsetWidth,i=a.offsetTop>20?46:24,c;do b+=a.offsetLeft||0;while(a=a.offsetParent);if(f==\"gbi\")for(a=document.getElementById(f);d&&(h=d.pop());)a.insertBefore(h,a.firstChild).className=\"gb2\";else c=b=(document.documentElement.clientWidth||document.body.clientWidth)-b-l;j!=f&&e.close();m(f,b,i,c)}e.close=function(){j&&m(j,0,0)}})();;};\u000aif(google.y.first){for(var a=0,b;b=google.y.first[a];++a)b();delete google.y.first}for(a in google.y)google.y[a][1]?google.y[a][1].apply(google.y[a][0]):google.y[a][0].go();google.y.x=google.x;google.x=function(d,c){c&&c.apply(d);return false};google.y.first=[];\u000a(function (){\u000avar a=\"google\";if(window[a]){window[a].a={};window[a].c=1;function o(d,f,e){var b=d.t[f],c=d.t.start;if(!b||!(c||e))return undefined;if(e!=undefined)c=e;return b>c?b-c:c-b}window[a].report=function(d,f,e){var b=\"\";if(window[a].pt){b+=\"&srt=\"+window[a].pt;delete window[a].pt}{var c=document.getElementById(\"csi\");if(c){var h;if(window[a]._bfr!=undefined)h=window[a]._bfr;else{h=c.value;window[a]._bfr=h;c.value=1}if(h)return\"\"}}if(d.b)b+=\"&\"+d.b;if(window.parent!=window)b+=\"&wif=1\";var i=d.t,p=i.start,k=[];for(var j in i){if(j==\u000a\"start\")continue;p&&k.push(j+\".\"+o(d,j))}delete i.start;if(f)for(var l in f)b+=\"&\"+l+\"=\"+f[l];var m=[e?e:\"/csi\",\"?v=3\",\"&s=\"+(window[a].sn||\"GWS\")+\"&action=\",d.name,\"\",\"\",b,\"&rt=\",k.join(\",\")].join(\"\");{var g=new Image,n=window[a].c++;window[a].a[n]=g;g.onload=(g.onerror=function(){delete window[a].a[n]});g.src=m;g=null}return m}};if(google.timers&&google.timers.load.t){if(!google.nocsixjs)google.timers.load.t.xjsee=google.time();window.setTimeout(function(){if(google.timers.load.t){google.timers.load.t.xjs=google.time();google.timers.load.t.ol&&google.report(google.timers.load,google.kCSI)}},0)};\u000a})();\u000a"
+ },
+ "redirectURL":"",
+ "headersSize":306,
+ "bodySize":8646
+ },
+ "cache":{},
+ "timings":{
+ "dns":0,
+ "connect":0,
+ "blocked":0,
+ "send":0,
+ "wait":62,
+ "receive":16
+ }
+ },
+ {
+ "pageref":"page_62143",
+ "startedDateTime":"2010-01-02T14:51:01.389+01:00",
+ "time":47,
+ "request":{
+ "method":"GET",
+ "url":"http://clients1.google.cz/generate_204",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[{
+ "name":"PREF",
+ "value":"ID"
+ },
+ {
+ "name":"NID",
+ "value":"29"
+ }
+ ],
+ "headers":[{
+ "name":"Host",
+ "value":"clients1.google.cz"
+ },
+ {
+ "name":"User-Agent",
+ "value":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name":"Accept",
+ "value":"image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name":"Accept-Language",
+ "value":"en-us,en;q=0.5"
+ },
+ {
+ "name":"Accept-Encoding",
+ "value":"gzip,deflate"
+ },
+ {
+ "name":"Accept-Charset",
+ "value":"ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name":"Keep-Alive",
+ "value":"115"
+ },
+ {
+ "name":"Connection",
+ "value":"keep-alive"
+ },
+ {
+ "name":"Referer",
+ "value":"http://www.google.cz/"
+ },
+ {
+ "name":"Cookie",
+ "value":"PREF=ID=580ec4c5a3534337:U=37a8fcc41ff49f78:TM=1260796678:LM=1260796682:S=9BgbomVM6pcnfah0; NID=29=OHyg2zMZl4IpG8C4a-Z5itM3gCXOuBPogGpTPVFPNsdpmIHJWX78ymRL_gqptvhr_IQrP319GQ1fxlKUsqaIokpxasPIIDq5ijatDmYiyamnCfJz8rXyNvt5GPjCJp2I"
+ }
+ ],
+ "queryString":[],
+ "headersSize":651,
+ "bodySize":-1
+ },
+ "response":{
+ "status":204,
+ "statusText":"No Content",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[],
+ "headers":[{
+ "name":"Content-Length",
+ "value":"0"
+ },
+ {
+ "name":"Content-Type",
+ "value":"text/html"
+ },
+ {
+ "name":"Date",
+ "value":"Sat, 02 Jan 2010 13:51:06 GMT"
+ },
+ {
+ "name":"Server",
+ "value":"GFE/2.0"
+ },
+ {
+ "name":"X-XSS-Protection",
+ "value":"0"
+ }
+ ],
+ "content":{
+ "size":0,
+ "mimeType":"text/html"
+ },
+ "redirectURL":"",
+ "headersSize":146,
+ "bodySize":0
+ },
+ "cache":{},
+ "timings":{
+ "dns":0,
+ "connect":0,
+ "blocked":0,
+ "send":0,
+ "wait":47,
+ "receive":0
+ }
+ },
+ {
+ "pageref":"page_62143",
+ "startedDateTime":"2010-01-02T14:51:01.452+01:00",
+ "time":31,
+ "request":{
+ "method":"GET",
+ "url":"http://www.google.cz/images/nav_logo7.png",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[{
+ "name":"PREF",
+ "value":"ID"
+ },
+ {
+ "name":"NID",
+ "value":"29"
+ }
+ ],
+ "headers":[{
+ "name":"Host",
+ "value":"www.google.cz"
+ },
+ {
+ "name":"User-Agent",
+ "value":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name":"Accept",
+ "value":"image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name":"Accept-Language",
+ "value":"en-us,en;q=0.5"
+ },
+ {
+ "name":"Accept-Encoding",
+ "value":"gzip,deflate"
+ },
+ {
+ "name":"Accept-Charset",
+ "value":"ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name":"Keep-Alive",
+ "value":"115"
+ },
+ {
+ "name":"Connection",
+ "value":"keep-alive"
+ },
+ {
+ "name":"Referer",
+ "value":"http://www.google.cz/"
+ },
+ {
+ "name":"Cookie",
+ "value":"PREF=ID=580ec4c5a3534337:U=37a8fcc41ff49f78:TM=1260796678:LM=1260796682:S=9BgbomVM6pcnfah0; NID=29=OHyg2zMZl4IpG8C4a-Z5itM3gCXOuBPogGpTPVFPNsdpmIHJWX78ymRL_gqptvhr_IQrP319GQ1fxlKUsqaIokpxasPIIDq5ijatDmYiyamnCfJz8rXyNvt5GPjCJp2I"
+ }
+ ],
+ "queryString":[],
+ "headersSize":654,
+ "bodySize":-1
+ },
+ "response":{
+ "status":200,
+ "statusText":"OK",
+ "httpVersion":"HTTP/1.1",
+ "cookies":[],
+ "headers":[{
+ "name":"Content-Type",
+ "value":"image/png"
+ },
+ {
+ "name":"Last-Modified",
+ "value":"Thu, 23 Jul 2009 17:45:03 GMT"
+ },
+ {
+ "name":"Date",
+ "value":"Sat, 02 Jan 2010 13:05:54 GMT"
+ },
+ {
+ "name":"Expires",
+ "value":"Sun, 02 Jan 2011 13:05:54 GMT"
+ },
+ {
+ "name":"Server",
+ "value":"gws"
+ },
+ {
+ "name":"Content-Length",
+ "value":"5401"
+ },
+ {
+ "name":"Cache-Control",
+ "value":"public, max-age=31536000"
+ },
+ {
+ "name":"Age",
+ "value":"2712"
+ },
+ {
+ "name":"X-XSS-Protection",
+ "value":"0"
+ }
+ ],
+ "content":{
+ "size":5401,
+ "mimeType":"image/png"
+ },
+ "redirectURL":"",
+ "headersSize":275,
+ "bodySize":5401
+ },
+ "cache":{},
+ "timings":{
+ "dns":0,
+ "connect":0,
+ "blocked":0,
+ "send":0,
+ "wait":31,
+ "receive":0
+ }
+ }
+ ]
+ }
+}
1,066 spec/fixtures/inline-scripts-block.har
@@ -0,0 +1,1066 @@
+{
+ "log": {
+ "version": "1.1",
+ "creator": {
+ "name": "Firebug",
+ "version": "1.5X.0b8"
+ },
+ "browser": {
+ "name": "Firefox",
+ "version": "3.6b6pre"
+ },
+ "comment": "Inline scripts block the page load.",
+ "pages": [
+ {
+ "startedDateTime": "2010-01-02T15:38:46.686+01:00",
+ "id": "page_21396",
+ "title": "Cuzillion",
+ "pageTimings": {
+ "onContentLoad": 5605,
+ "onLoad": 6964
+ },
+ "comment": "See the gap between the third and fourth request (click this bar to expand the page log and see all requests). This is caused by execution of an inline script."
+ },
+ {
+ "startedDateTime": "2010-01-02T16:12:32.738+01:00",
+ "id": "page_20633",
+ "title": "Cuzillion",
+ "pageTimings": {
+ "onContentLoad": 5564,
+ "onLoad": 5572
+ },
+ "comment": "The script is moved to the bottom of the page in this case."
+ }
+ ],
+ "entries": [
+ {
+ "pageref": "page_21396",
+ "startedDateTime": "2010-01-02T15:38:46.686+01:00",
+ "time": 525,
+ "request": {
+ "method": "GET",
+ "url": "http://stevesouders.com/cuzillion/?ex=10100&title=Inline+Scripts+Block",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "stevesouders.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ }
+ ],
+ "queryString": [
+ {
+ "name": "ex",
+ "value": "10100"
+ },
+ {
+ "name": "title",
+ "value": "Inline Scripts Block"
+ }
+ ],
+ "headersSize": 444,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 200,
+ "statusText": "OK",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 14:38:52 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "X-Powered-By",
+ "value": "PHP/5.2.3"
+ },
+ {
+ "name": "Vary",
+ "value": "Accept-Encoding"
+ },
+ {
+ "name": "Content-Encoding",
+ "value": "gzip"
+ },
+ {
+ "name": "Content-Length",
+ "value": "2725"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=100"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Content-Type",
+ "value": "text/html"
+ }
+ ],
+ "content": {
+ "size": 8836,
+ "mimeType": "text/html",
+ "text": "\n<script>\nvar gTop = Number(new Date());\nvar gScriptMsg = \"\";\nfunction cuz_addHandler(elem, sType, fn, capture) {\n capture = (capture) ? true : false;\n if (elem.addEventListener) {\n elem.addEventListener(sType, fn, capture);\n }\n else if (elem.attachEvent) {\n elem.attachEvent(\"on\" + sType, fn);\n }\n else {\n // Netscape 4\n if ( elem[\"on\" + sType] ) {\n // Do nothing - we don't want to overwrite an existing handler.\n }\n else {\n elem[\"on\" + sType] = fn;\n }\n }\n}\nfunction doOnload() {\n\tvar end = Number(new Date());\n document.getElementById('loadtime').innerHTML = 'page load time: ' + (end - gTop) + ' ms';\n\tif ( gScriptMsg && document.getElementById('loadedscripts') ) {\n\t\tdocument.getElementById('loadedscripts').innerHTML += gScriptMsg;\n\t}\n}\ncuz_addHandler(window, 'load', doOnload);\nvar gbEnabled = false;\nfunction enableEdit() {\n\tif ( gbEnabled ) return;\n\tgbEnabled = true;\n\taddStylesheet('cuzillion.1.1.css');\n\taddScript('cuzillion.1.5.js');\n}\nfunction addStylesheet(url) {\n\tvar stylesheet = document.createElement('link');\n\tstylesheet.rel = 'stylesheet';\n\tstylesheet.type = 'text/css';\n\tstylesheet.href = url;\n\tdocument.getElementsByTagName('head')[0].appendChild(stylesheet);\n}\nfunction addScript(url) {\n\tvar script = document.createElement('script');\n\tscript.src = url;\n\tdocument.getElementsByTagName('head')[0].appendChild(script);\n}\nfunction scriptSleepOnload(sUrl) {\n\tvar now = Number(new Date());\n\tvar msg = \"<nobr>\" + (now - gTop) + \"ms: \\\"\" + sUrl + \"\\\" done</nobr>\\n\";\n\tif ( document.getElementById('loadedscripts') ) {\n\t\tdocument.getElementById('loadedscripts').innerHTML += msg;\n\t}\n\telse {\n\t\tgScriptMsg += msg;\n\t}\n}\nfunction reloadPage(url) {\n\tdocument.body.innerHTML = '';\n\tdocument.location = url;\n}\nfunction cleanText(sText) {\n return sText.replace(/<.*?>/g, '');\n}\n</script>\n<html>\n<head>\n<title>Cuzillion</title>\n<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">\n<!--\nCopyright 2008 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n</head>\n\n<body style='margin: 0px; padding: 0px; font-family: \"Trebuchet MS\", \"Bitstream Vera Serif\", Utopia, \"Times New Roman\", times, serif;'>\n\n<div style=\"background: #333; color: white; padding: 8px;\">\n <div style=\"float:right; margin-top: 2px;\">\n <a href=\"help.php#examples\" style=\"color: white; font-size: 0.9em; text-decoration: none;\">Examples</a>&nbsp;|&nbsp;<a href=\"help.php\" style=\"color: white; font-size: 0.9em; text-decoration: none;\">Help</a><br><a href=\"http://stevesouders.com/\" style=\"color: white; font-size: 0.9em; text-decoration: none;\">stevesouders.com</a>\n </div>\n <font style=\"font-size: 2em; font-weight: bold; margin-right: 10px;\"><a href=\".\" style=\"color:white; text-decoration: none;\"><img border=0 src=\"logo-32x32.gif\">&nbsp;Cuzillion</a></font><i>'cuz there are a zillion pages to check</i>\n</div>\n\n<div id=content style=\"margin: 8px;\">\n\n<div><div style='font-weight: bold; font-size: 1.3em;'><a href='http://stevesouders.com/?ex=10100&title='>Inline Scripts Block</a></div>\n<div id=description style='font-size: 0.9em;'><div style='margin: 0 0 4px 20px; font-size: 0.9em;'><i>posted by <a href='http://stevesouders.com/'>Steve Souders</a>,&nbsp;March 24, 2009 11:41 PM</i></div>Inline scripts block downloads and rendering, just like external scripts. Any resources below an inline script don't get downloaded until the inline script finishes executing. Nothing in the page is rendered until the inline script is done executing. When you click Reload, notice that the page is white for five seconds.</div>\n</div><hr style='width: 100%; margin: 20px 0 20px 0;'>\n<!-- begin resources for inbody -->\n<!-- image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags -->\n<img src='http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=1&t=1262443132'>\n\n<!-- inline script block<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> with a 5 second execute time using HTML tags -->\n<script> var injs_now = Number(new Date()); while( injs_now + (5*1000) > Number(new Date()) ) { var tmp = injs_now; } if ( 'function' == typeof(scriptSleepOnload) ) scriptSleepOnload('inline script');</script>\n\n<!-- image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags -->\n<img src='http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=3&t=1262443132'>\n\n<!-- end resources for inbody -->\n\n<div id=floattray style=\"float: left; width: 170px; margin-right: 30px;\">\n <div id=step1text style=\"text-align: left; margin: 0 0 4px 4px; height: 50px; padding-top: 12px;\"></div>\n <div id=comptray>\n &nbsp;\n </div>\n</div>\n\n<div id=pageavatar style=\"float: left; width: 310px; margin-right: 30px;\">\n <div id=step2text style=\"text-align: left; margin: 0 0 4px 4px; height: 50px; padding-top: 12px;\"></div>\n <div style=\"background: #CCC; border: 1px solid black; \">\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;HTML&gt;</code>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;HEAD&gt;</code>\n <div class=\"drop\" style=\"border: 1px solid #EEE; background: #EEE; padding: 12px 0 12px 0; width: 300px; margin: 0 0 0 4px;\">\n\t <ul style=\"margin: 0; padding: 0;\" id=inhead></ul>\n\t <div id=inheadTarget></div>\n\t</div>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;/HEAD&gt;</code>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;BODY&gt;</code>\n <div class=\"drop\" style=\"border: 1px solid #EEE; background: #EEE; padding: 12px 0 12px 0; width: 300px; margin: 0 0 0 4px;\">\n\t <ul style=\"margin: 0; padding: 0;\" id=inbody><li onclick='enableEdit()' id='acomp1' class='sortitem image' style='cursor: move; list-style: none; border-width: 2px; border-style: solid; border-color: #555; margin: 4px;'><div id=acomp1Div class='component image' style='padding: 2px; font-family: Arial; text-align: center; display: block; text-decoration: none; color: white; background: #000080; text-align: left;'><span>image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags</span></div>\n<li onclick='enableEdit()' id='acomp2' class='sortitem injs' style='cursor: move; list-style: none; border-width: 2px; border-style: solid; border-color: #555; margin: 4px;'><div id=acomp2Div class='component injs' style='padding: 2px; font-family: Arial; text-align: center; display: block; text-decoration: none; color: white; background: #080; text-align: left;'><span>inline script block<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> with a 5 second execute time using HTML tags</span></div>\n<li onclick='enableEdit()' id='acomp3' class='sortitem image' style='cursor: move; list-style: none; border-width: 2px; border-style: solid; border-color: #555; margin: 4px;'><div id=acomp3Div class='component image' style='padding: 2px; font-family: Arial; text-align: center; display: block; text-decoration: none; color: white; background: #000080; text-align: left;'><span>image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags</span></div>\n</ul>\n\t <div id=inbodyTarget></div>\n\t</div>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;/BODY&gt;</code>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;/HTML&gt;</code>\n </div>\n <div id=loadtime style=\"text-align: left; margin-top: 10px;\"></div>\n <div id=loadedscripts style=\"text-align: left; margin-top: 10px; width: 300px; font-size: 0.9em;\"></div>\n</div> <!-- end pageavatar -->\n\n<div style=\"position: absolute; left: 560px;\">\n <div id=step3text style=\"text-align: left; margin: 0 0 4px 4px; height: 50px; padding-top: 12px;\"></div>\n <div id=pagesubmit style=\"text-align: left;\">\n<nobr>\n<input type=button value=\"Edit\" onclick=\"enableEdit()\">&nbsp;&nbsp;\n<input type=button value=\"Reload\" onclick=\"reloadPage('/cuzillion/?ex=10100&title=Inline+Scripts+Block&t=1262443132')\">&nbsp;&nbsp;\n<input type=button value=\"Clear\" onclick=\"document.location='.'\">&nbsp;&nbsp;\n</nobr>\n </div>\n</div>\n\n<div style=\"clear: both;\">\n</div>\n\n</div> <!-- content -->\n\n\n\n</body>\n\n</html>\n"
+ },
+ "redirectURL": "",
+ "headersSize": 247,
+ "bodySize": 2725
+ },
+ "cache": {
+ },
+ "timings": {
+ "dns": 2,
+ "connect": 183,
+ "blocked": 0,
+ "send": 0,
+ "wait": 340,
+ "receive": 0
+ }
+ },
+ {
+ "pageref": "page_21396",
+ "startedDateTime": "2010-01-02T15:38:47.238+01:00",
+ "time": 193,
+ "request": {
+ "method": "GET",
+ "url": "http://stevesouders.com/cuzillion/logo-32x32.gif",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "stevesouders.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "name": "Referer",
+ "value": "http://stevesouders.com/cuzillion/?ex=10100&title=Inline+Scripts+Block"
+ }
+ ],
+ "queryString": [
+ ],
+ "headersSize": 473,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 200,
+ "statusText": "OK",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 14:38:52 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "Last-Modified",
+ "value": "Mon, 16 Nov 2009 20:19:20 GMT"
+ },
+ {
+ "name": "Accept-Ranges",
+ "value": "bytes"
+ },
+ {
+ "name": "Content-Length",
+ "value": "1057"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "max-age=315360000"
+ },
+ {
+ "name": "Expires",
+ "value": "Tue, 31 Dec 2019 14:38:52 GMT"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=99"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Content-Type",
+ "value": "image/gif"
+ }
+ ],
+ "content": {
+ "size": 1057,
+ "mimeType": "image/gif"
+ },
+ "redirectURL": "",
+ "headersSize": 316,
+ "bodySize": 1057
+ },
+ "cache": {
+ },
+ "timings": {
+ "dns": 0,
+ "connect": 0,
+ "blocked": 0,
+ "send": 0,
+ "wait": 190,
+ "receive": 3
+ }
+ },
+ {
+ "pageref": "page_21396",
+ "startedDateTime": "2010-01-02T15:38:47.238+01:00",
+ "time": 1430,
+ "request": {
+ "method": "GET",
+ "url": "http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=1&t=1262443132",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "1.cuzillion.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "name": "Referer",
+ "value": "http://stevesouders.com/cuzillion/?ex=10100&title=Inline+Scripts+Block"
+ }
+ ],
+ "queryString": [
+ {
+ "name": "n",
+ "value": "1"
+ },
+ {
+ "name": "sleep",
+ "value": "1"
+ },
+ {
+ "name": "t",
+ "value": "1262443132"
+ },
+ {
+ "name": "type",
+ "value": "gif"
+ }
+ ],
+ "headersSize": 498,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 200,
+ "statusText": "OK",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 14:38:52 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "Expires",
+ "value": "Mon, 01 Feb 2010 14:38:53 GMT"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "public, max-age=2592000"
+ },
+ {
+ "name": "Last-Modified",
+ "value": "Sun, 15 Jan 2006 12:00:00 GMT"
+ },
+ {
+ "name": "Content-Length",
+ "value": "1076"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=100"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Content-Type",
+ "value": "image/gif"
+ }
+ ],
+ "content": {
+ "size": 1076,
+ "mimeType": "image/gif"
+ },
+ "redirectURL": "",
+ "headersSize": 301,
+ "bodySize": 1076
+ },
+ "cache": {
+ },
+ "timings": {
+ "dns": 0,
+ "connect": 193,
+ "blocked": 0,
+ "send": 0,
+ "wait": 1237,
+ "receive": 0
+ }
+ },
+ {
+ "pageref": "page_21396",
+ "startedDateTime": "2010-01-02T15:38:52.243+01:00",
+ "time": 1400,
+ "request": {
+ "method": "GET",
+ "url": "http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=3&t=1262443132",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "1.cuzillion.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "name": "Referer",
+ "value": "http://stevesouders.com/cuzillion/?ex=10100&title=Inline+Scripts+Block"
+ }
+ ],
+ "queryString": [
+ {
+ "name": "n",
+ "value": "3"
+ },
+ {
+ "name": "sleep",
+ "value": "1"
+ },
+ {
+ "name": "t",
+ "value": "1262443132"
+ },
+ {
+ "name": "type",
+ "value": "gif"
+ }
+ ],
+ "headersSize": 498,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 200,
+ "statusText": "OK",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 14:38:57 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "Expires",
+ "value": "Mon, 01 Feb 2010 14:38:58 GMT"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "public, max-age=2592000"
+ },
+ {
+ "name": "Last-Modified",
+ "value": "Sun, 15 Jan 2006 12:00:00 GMT"
+ },
+ {
+ "name": "Content-Length",
+ "value": "1525"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=100"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Content-Type",
+ "value": "image/gif"
+ }
+ ],
+ "content": {
+ "size": 1525,
+ "mimeType": "image/gif"
+ },
+ "redirectURL": "",
+ "headersSize": 301,
+ "bodySize": 1525
+ },
+ "cache": {
+ },
+ "timings": {
+ "dns": 0,
+ "connect": 185,
+ "blocked": 0,
+ "send": 0,
+ "wait": 1215,
+ "receive": 0
+ }
+ },
+ {
+ "pageref": "page_20633",
+ "startedDateTime": "2010-01-02T16:12:32.738+01:00",
+ "time": 450,
+ "request": {
+ "method": "GET",
+ "url": "http://stevesouders.com/cuzillion/?c0=bi1hfff1_0_f&c1=bi1hfff1_0_f&c2=bb0hfff0_5_f&t=1262445132270",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "stevesouders.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "name": "Referer",
+ "value": "http://stevesouders.com/cuzillion/?ex=10100&title=Inline+Scripts+Block"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "max-age=0"
+ }
+ ],
+ "queryString": [
+ {
+ "name": "c0",
+ "value": "bi1hfff1_0_f"
+ },
+ {
+ "name": "c1",
+ "value": "bi1hfff1_0_f"
+ },
+ {
+ "name": "c2",
+ "value": "bb0hfff0_5_f"
+ },
+ {
+ "name": "t",
+ "value": "1262445132270"
+ }
+ ],
+ "headersSize": 579,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 200,
+ "statusText": "OK",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 15:12:38 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "X-Powered-By",
+ "value": "PHP/5.2.3"
+ },
+ {
+ "name": "Vary",
+ "value": "Accept-Encoding"
+ },
+ {
+ "name": "Content-Encoding",
+ "value": "gzip"
+ },
+ {
+ "name": "Content-Length",
+ "value": "2456"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=100"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Content-Type",
+ "value": "text/html"
+ }
+ ],
+ "content": {
+ "size": 8125,
+ "mimeType": "text/html",
+ "text": "\n<script>\nvar gTop = Number(new Date());\nvar gScriptMsg = \"\";\nfunction cuz_addHandler(elem, sType, fn, capture) {\n capture = (capture) ? true : false;\n if (elem.addEventListener) {\n elem.addEventListener(sType, fn, capture);\n }\n else if (elem.attachEvent) {\n elem.attachEvent(\"on\" + sType, fn);\n }\n else {\n // Netscape 4\n if ( elem[\"on\" + sType] ) {\n // Do nothing - we don't want to overwrite an existing handler.\n }\n else {\n elem[\"on\" + sType] = fn;\n }\n }\n}\nfunction doOnload() {\n\tvar end = Number(new Date());\n document.getElementById('loadtime').innerHTML = 'page load time: ' + (end - gTop) + ' ms';\n\tif ( gScriptMsg && document.getElementById('loadedscripts') ) {\n\t\tdocument.getElementById('loadedscripts').innerHTML += gScriptMsg;\n\t}\n}\ncuz_addHandler(window, 'load', doOnload);\nvar gbEnabled = false;\nfunction enableEdit() {\n\tif ( gbEnabled ) return;\n\tgbEnabled = true;\n\taddStylesheet('cuzillion.1.1.css');\n\taddScript('cuzillion.1.5.js');\n}\nfunction addStylesheet(url) {\n\tvar stylesheet = document.createElement('link');\n\tstylesheet.rel = 'stylesheet';\n\tstylesheet.type = 'text/css';\n\tstylesheet.href = url;\n\tdocument.getElementsByTagName('head')[0].appendChild(stylesheet);\n}\nfunction addScript(url) {\n\tvar script = document.createElement('script');\n\tscript.src = url;\n\tdocument.getElementsByTagName('head')[0].appendChild(script);\n}\nfunction scriptSleepOnload(sUrl) {\n\tvar now = Number(new Date());\n\tvar msg = \"<nobr>\" + (now - gTop) + \"ms: \\\"\" + sUrl + \"\\\" done</nobr>\\n\";\n\tif ( document.getElementById('loadedscripts') ) {\n\t\tdocument.getElementById('loadedscripts').innerHTML += msg;\n\t}\n\telse {\n\t\tgScriptMsg += msg;\n\t}\n}\nfunction reloadPage(url) {\n\tdocument.body.innerHTML = '';\n\tdocument.location = url;\n}\nfunction cleanText(sText) {\n return sText.replace(/<.*?>/g, '');\n}\n</script>\n<html>\n<head>\n<title>Cuzillion</title>\n<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">\n<!--\nCopyright 2008 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n</head>\n\n<body style='margin: 0px; padding: 0px; font-family: \"Trebuchet MS\", \"Bitstream Vera Serif\", Utopia, \"Times New Roman\", times, serif;'>\n\n<div style=\"background: #333; color: white; padding: 8px;\">\n <div style=\"float:right; margin-top: 2px;\">\n <a href=\"help.php#examples\" style=\"color: white; font-size: 0.9em; text-decoration: none;\">Examples</a>&nbsp;|&nbsp;<a href=\"help.php\" style=\"color: white; font-size: 0.9em; text-decoration: none;\">Help</a><br><a href=\"http://stevesouders.com/\" style=\"color: white; font-size: 0.9em; text-decoration: none;\">stevesouders.com</a>\n </div>\n <font style=\"font-size: 2em; font-weight: bold; margin-right: 10px;\"><a href=\".\" style=\"color:white; text-decoration: none;\"><img border=0 src=\"logo-32x32.gif\">&nbsp;Cuzillion</a></font><i>'cuz there are a zillion pages to check</i>\n</div>\n\n<div id=content style=\"margin: 8px;\">\n\n\n<!-- begin resources for inbody -->\n<!-- image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags -->\n<img src='http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=1&t=1262445158'>\n\n<!-- image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags -->\n<img src='http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=2&t=1262445158'>\n\n<!-- inline script block<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> with a 5 second execute time using HTML tags -->\n<script> var injs_now = Number(new Date()); while( injs_now + (5*1000) > Number(new Date()) ) { var tmp = injs_now; } if ( 'function' == typeof(scriptSleepOnload) ) scriptSleepOnload('inline script');</script>\n\n<!-- end resources for inbody -->\n\n<div id=floattray style=\"float: left; width: 170px; margin-right: 30px;\">\n <div id=step1text style=\"text-align: left; margin: 0 0 4px 4px; height: 50px; padding-top: 12px;\"></div>\n <div id=comptray>\n &nbsp;\n </div>\n</div>\n\n<div id=pageavatar style=\"float: left; width: 310px; margin-right: 30px;\">\n <div id=step2text style=\"text-align: left; margin: 0 0 4px 4px; height: 50px; padding-top: 12px;\"></div>\n <div style=\"background: #CCC; border: 1px solid black; \">\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;HTML&gt;</code>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;HEAD&gt;</code>\n <div class=\"drop\" style=\"border: 1px solid #EEE; background: #EEE; padding: 12px 0 12px 0; width: 300px; margin: 0 0 0 4px;\">\n\t <ul style=\"margin: 0; padding: 0;\" id=inhead></ul>\n\t <div id=inheadTarget></div>\n\t</div>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;/HEAD&gt;</code>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;BODY&gt;</code>\n <div class=\"drop\" style=\"border: 1px solid #EEE; background: #EEE; padding: 12px 0 12px 0; width: 300px; margin: 0 0 0 4px;\">\n\t <ul style=\"margin: 0; padding: 0;\" id=inbody><li onclick='enableEdit()' id='acomp1' class='sortitem image' style='cursor: move; list-style: none; border-width: 2px; border-style: solid; border-color: #555; margin: 4px;'><div id=acomp1Div class='component image' style='padding: 2px; font-family: Arial; text-align: center; display: block; text-decoration: none; color: white; background: #000080; text-align: left;'><span>image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags</span></div>\n<li onclick='enableEdit()' id='acomp2' class='sortitem image' style='cursor: move; list-style: none; border-width: 2px; border-style: solid; border-color: #555; margin: 4px;'><div id=acomp2Div class='component image' style='padding: 2px; font-family: Arial; text-align: center; display: block; text-decoration: none; color: white; background: #000080; text-align: left;'><span>image<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> on domain1 with a 1 second delay using HTML tags</span></div>\n<li onclick='enableEdit()' id='acomp3' class='sortitem injs' style='cursor: move; list-style: none; border-width: 2px; border-style: solid; border-color: #555; margin: 4px;'><div id=acomp3Div class='component injs' style='padding: 2px; font-family: Arial; text-align: center; display: block; text-decoration: none; color: white; background: #080; text-align: left;'><span>inline script block<p style='margin: 0 4px 4px 12px; font-size: 0.8em;'> with a 5 second execute time using HTML tags</span></div>\n</ul>\n\t <div id=inbodyTarget></div>\n\t</div>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;/BODY&gt;</code>\n <code style=\"font-size: 1.2em; font-weight: bold; color: #666666; display: block;\">&lt;/HTML&gt;</code>\n </div>\n <div id=loadtime style=\"text-align: left; margin-top: 10px;\"></div>\n <div id=loadedscripts style=\"text-align: left; margin-top: 10px; width: 300px; font-size: 0.9em;\"></div>\n</div> <!-- end pageavatar -->\n\n<div style=\"position: absolute; left: 560px;\">\n <div id=step3text style=\"text-align: left; margin: 0 0 4px 4px; height: 50px; padding-top: 12px;\"></div>\n <div id=pagesubmit style=\"text-align: left;\">\n<nobr>\n<input type=button value=\"Edit\" onclick=\"enableEdit()\">&nbsp;&nbsp;\n<input type=button value=\"Reload\" onclick=\"reloadPage('/cuzillion/?c0=bi1hfff1_0_f&c1=bi1hfff1_0_f&c2=bb0hfff0_5_f&t=1262445158')\">&nbsp;&nbsp;\n<input type=button value=\"Clear\" onclick=\"document.location='.'\">&nbsp;&nbsp;\n</nobr>\n </div>\n</div>\n\n<div style=\"clear: both;\">\n</div>\n\n</div> <!-- content -->\n\n\n\n</body>\n\n</html>\n"
+ },
+ "redirectURL": "",
+ "headersSize": 247,
+ "bodySize": 2456
+ },
+ "cache": {
+ },
+ "timings": {
+ "dns": 0,
+ "connect": 185,
+ "blocked": 0,
+ "send": 0,
+ "wait": 265,
+ "receive": 0
+ }
+ },
+ {
+ "pageref": "page_20633",
+ "startedDateTime": "2010-01-02T16:12:33.211+01:00",
+ "time": 195,
+ "request": {
+ "method": "GET",
+ "url": "http://stevesouders.com/cuzillion/logo-32x32.gif",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "stevesouders.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "name": "Referer",
+ "value": "http://stevesouders.com/cuzillion/?c0=bi1hfff1_0_f&c1=bi1hfff1_0_f&c2=bb0hfff0_5_f&t=1262445132270"
+ },
+ {
+ "name": "If-Modified-Since",
+ "value": "Mon, 16 Nov 2009 20:19:20 GMT"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "max-age=0"
+ }
+ ],
+ "queryString": [
+ ],
+ "headersSize": 577,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 304,
+ "statusText": "Not Modified",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 15:12:38 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=99"
+ },
+ {
+ "name": "Etag",
+ "value": "\"231b822-421-b97e8200\""
+ },
+ {
+ "name": "Expires",
+ "value": "Tue, 31 Dec 2019 15:12:38 GMT"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "max-age=315360000"
+ }
+ ],
+ "content": {
+ "size": 1057,
+ "mimeType": "image/gif"
+ },
+ "redirectURL": "",
+ "headersSize": 241,
+ "bodySize": 1057
+ },
+ "cache": {
+ "afterRequest": {
+ "expires": "2019-12-31T15:12:33.000Z",
+ "lastAccess": "2010-01-02T15:12:38.000Z",
+ "eTag": "",
+ "hitCount": 4
+ }
+ },
+ "timings": {
+ "dns": 0,
+ "connect": 0,
+ "blocked": 0,
+ "send": 0,
+ "wait": 195,
+ "receive": 0
+ }
+ },
+ {
+ "pageref": "page_20633",
+ "startedDateTime": "2010-01-02T16:12:33.213+01:00",
+ "time": 1403,
+ "request": {
+ "method": "GET",
+ "url": "http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=1&t=1262445158",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "1.cuzillion.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "name": "Referer",
+ "value": "http://stevesouders.com/cuzillion/?c0=bi1hfff1_0_f&c1=bi1hfff1_0_f&c2=bb0hfff0_5_f&t=1262445132270"
+ }
+ ],
+ "queryString": [
+ {
+ "name": "n",
+ "value": "1"
+ },
+ {
+ "name": "sleep",
+ "value": "1"
+ },
+ {
+ "name": "t",
+ "value": "1262445158"
+ },
+ {
+ "name": "type",
+ "value": "gif"
+ }
+ ],
+ "headersSize": 526,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 200,
+ "statusText": "OK",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 15:12:38 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "Expires",
+ "value": "Mon, 01 Feb 2010 15:12:39 GMT"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "public, max-age=2592000"
+ },
+ {
+ "name": "Last-Modified",
+ "value": "Sun, 15 Jan 2006 12:00:00 GMT"
+ },
+ {
+ "name": "Content-Length",
+ "value": "1076"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=100"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Content-Type",
+ "value": "image/gif"
+ }
+ ],
+ "content": {
+ "size": 1076,
+ "mimeType": "image/gif"
+ },
+ "redirectURL": "",
+ "headersSize": 301,
+ "bodySize": 1076
+ },
+ "cache": {
+ },
+ "timings": {
+ "dns": 0,
+ "connect": 190,
+ "blocked": 0,
+ "send": 0,
+ "wait": 1213,
+ "receive": 0
+ }
+ },
+ {
+ "pageref": "page_20633",
+ "startedDateTime": "2010-01-02T16:12:33.213+01:00",
+ "time": 1448,
+ "request": {
+ "method": "GET",
+ "url": "http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=1&n=2&t=1262445158",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Host",
+ "value": "1.cuzillion.com"
+ },
+ {
+ "name": "User-Agent",
+ "value": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b6pre) Gecko/20091230 Namoroka/3.6b6pre (.NET CLR 3.5.30729)"
+ },
+ {
+ "name": "Accept",
+ "value": "image/png,image/*;q=0.8,*/*;q=0.5"
+ },
+ {
+ "name": "Accept-Language",
+ "value": "en-us,en;q=0.5"
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip,deflate"
+ },
+ {
+ "name": "Accept-Charset",
+ "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "115"
+ },
+ {
+ "name": "Connection",
+ "value": "keep-alive"
+ },
+ {
+ "name": "Referer",
+ "value": "http://stevesouders.com/cuzillion/?c0=bi1hfff1_0_f&c1=bi1hfff1_0_f&c2=bb0hfff0_5_f&t=1262445132270"
+ }
+ ],
+ "queryString": [
+ {
+ "name": "n",
+ "value": "2"
+ },
+ {
+ "name": "sleep",
+ "value": "1"
+ },
+ {
+ "name": "t",
+ "value": "1262445158"
+ },
+ {
+ "name": "type",
+ "value": "gif"
+ }
+ ],
+ "headersSize": 526,
+ "bodySize": -1
+ },
+ "response": {
+ "status": 200,
+ "statusText": "OK",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [
+ ],
+ "headers": [
+ {
+ "name": "Date",
+ "value": "Sat, 02 Jan 2010 15:12:38 GMT"
+ },
+ {
+ "name": "Server",
+ "value": "Apache"
+ },
+ {
+ "name": "Expires",
+ "value": "Mon, 01 Feb 2010 15:12:39 GMT"
+ },
+ {
+ "name": "Cache-Control",
+ "value": "public, max-age=2592000"
+ },
+ {
+ "name": "Last-Modified",
+ "value": "Sun, 15 Jan 2006 12:00:00 GMT"
+ },
+ {
+ "name": "Keep-Alive",
+ "value": "timeout=2, max=100"
+ },
+ {
+ "name": "Connection",
+ "value": "Keep-Alive"
+ },
+ {
+ "name": "Transfer-Encoding",
+ "value": "chunked"
+ },
+ {
+ "name": "Content-Type",
+ "value": "image/gif"
+ }
+ ],
+ "content": {
+ "size": 1525,
+ "mimeType": "image/gif"
+ },
+ "redirectURL": "",
+ "headersSize": 307,
+ "bodySize": 1525
+ },
+ "cache": {
+ },
+ "timings": {
+ "dns": 0,
+ "connect": 190,
+ "blocked": 0,
+ "send": 0,
+ "wait": 1258,
+ "receive": 0
+ }
+ }
+ ]
+ }
+}
5,323 spec/fixtures/softwareishard.com.har
5,323 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
30 spec/har/archive_spec.rb
@@ -0,0 +1,30 @@
+require File.expand_path("../../spec_helper", __FILE__)
+
+module HAR
+ describe Archive do
+
+ context "creating archives" do
+ it "can be created from a String" do
+ Archive.from_string('{"log": {}}').should be_kind_of(Archive)
+ end
+
+ it "can be created from a file" do
+ Archive.from_file(fixture_path("browser-blocking-time.har")).should be_kind_of(Archive)
+ end
+ end
+
+ context "fetching data" do
+ let(:archive) { Archive.from_file fixture_path("browser-blocking-time.har") }
+
+ it "has a list of pages" do
+ ps = archive.pages
+
+ ps.should be_kind_of(Array)
+ ps.size.should == 2
+
+ ps.first.should be_kind_of(Page)
+ end
+ end
+
+ end # Archive
+end # HAR
14 spec/spec_helper.rb
@@ -0,0 +1,14 @@
+$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+require "har"
+
+module HAR
+ module SpecHelper
+ def fixture_path(name)
+ File.join(File.expand_path("../fixtures", __FILE__), name)
+ end
+ end
+end
+
+RSpec.configure do |c|
+ c.include HAR::SpecHelper
+end

0 comments on commit 8c2d166

Please sign in to comment.
Something went wrong with that request. Please try again.