Index: chrome/browser/automation/testing_automation_provider.cc |
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc |
index 34313445fe8243d641a4d29e0893e33722161b52..3b8881a8a33b51d15bd4e4693e016249e4c208b8 100644 |
--- a/chrome/browser/automation/testing_automation_provider.cc |
+++ b/chrome/browser/automation/testing_automation_provider.cc |
@@ -6088,8 +6088,7 @@ void TestingAutomationProvider::WaitUntilNavigationCompletes( |
new NavigationNotificationObserver(&web_contents->GetController(), this, |
reply_message, 1, true, true); |
if (!web_contents->IsLoading()) { |
- AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
- delete observer; |
+ observer->ConditionMet(AUTOMATION_MSG_NAVIGATION_SUCCESS); |
return; |
} |
} |