Check that buffer exists before trying to get its duration.

Add a simple test for this as well.

BUG=

Review URL: https://codereview.chromium.org/50363005

git-svn-id: svn://svn.chromium.org/blink/trunk@161005 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed