Fix document.hasFocus() for layout test
Fix document.hasFocus() for layout test

We were not setting the focused frame to null when we blurred a window.
Therefore a document inside a frame inside a blurred window would think
it was focused since its frame was the focused frame.

This fixes the layout test for the test_shell but Chrome is still
having issues with the test since blurring is asynchronous in chrome.
Changing the layout test by adding timers makes the test pass in chrome
as well.

BUG=16018

TEST=Run LayoutTests/fast/dom/HTMLDocument/hasFocus.html

Review URL: http://codereview.chromium.org/182032

git-svn-id: http://src.chromium.org/svn/trunk/src@24947 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: f77fb49c8ed710476e46595fcb771d83fe65d90d
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser