Fix for the ChromeFrame unload event test failures seen on the builder. For some reason
the test shows up as succeeded even though it is failing.

The test fails when the automation client instance is reused, i.e the new page loads in
the same tab. We need to set the ready state of the active document instance to ready
when we reuse the automation client instance.

TBR=amit

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56963 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index 66c7fcc..7443943 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -83,6 +83,7 @@
     DCHECK(automation_client_.get() != NULL);
     automation_client_->Reinitialize(this, url_fetcher_.get());
     is_automation_client_reused_ = true;
+    OnAutomationServerReady();
   } else {
     // The FinalConstruct implementation in the ChromeFrameActivexBase class
     // i.e. Base creates an instance of the ChromeFrameAutomationClient class