Restore closed tabs into new windows when necessary, and track the windows they
came from so they're restored together (into the same new window) when
appropriate.

Fix safety check on tab index when restoring: make it check the correct
browser.

Change some ASSERTs to EXPECTs in the unit test for greater coverage.

BUG=5278
TEST=Open a window with two tabs, close both (closing the window), then
  restore both. Make sure both restored tabs are in the same window.  Open
  a window with multiple tabs, close a tab, then close the window using 
  its close box. Restore both and make sure the tab goes back into the window.
Review URL: http://codereview.chromium.org/92001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14234 0039d316-1c4b-4281-b951-d872f2087c98
7 files changed