mozilla/pdf.js — pull request #4229 by Rob--W (2014-01-30 22:13:48+00:00)
Title: Get progress bar for PDF streams in Chromium by passing the expected content length to the page

An Opera user reported that nothing happened for 10 seconds, then all of a sudden a PDF appeared. With this PR, users will see a progress bar while the FTP/POST stream is coming in.

(this patch is only relevant for Chromium / Opera users)

To test in Chromium / Google Chrome:

1. `node make chromium`
2. `sed -i 's/"mime_/"key":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4zyYTii0VTKI7W2U6fDeAvs3YCVZeAt7C62IC64IDCMHvWy7SKMpOPjfg5v1PgYkFm+fGsCsVLN8NaF7fzYMVtjLc5bqhqPAi56Qidrqh1HxPAAYhwFQd5BVGhZmh1fySHXFPE8VI2tIHwRrASOtx67jbSEk4nBAcJz6n+eGq8QIDAQAB",\n"mime_/' build/chromium/manifest.json`
3. `chromium --user-data-dir=/tmp/tempdir --load-extension=build/chromium --no-first-run`
4. Google for "ftp pdf" and pick the first result (e.g. ftp://ftp.ipswitch.com/ipswitch/manuals/ftpserv.pdf).
5. Observe that a progress bar is displayed while loading.

To compare with the previous version, just `git checkout master`, repeat steps 1-4 and observe that no progress is shown.