summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 01:28:49 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 01:28:49 +0000
commit0791d3a25978f15adfe3ddc073850f7ce2bd158e (patch)
tree857cf4f343edff2ea739571384246af4c7cbc4ae /chrome/browser/automation
parent26426a2af6a18a8e29bdf1eb09bee9f073304d1b (diff)
downloadchromium_src-0791d3a25978f15adfe3ddc073850f7ce2bd158e.zip
chromium_src-0791d3a25978f15adfe3ddc073850f7ce2bd158e.tar.gz
chromium_src-0791d3a25978f15adfe3ddc073850f7ce2bd158e.tar.bz2
Refactored code to allow associating workers with multiple renderers.
SharedWorkers now gracefully handle http auth requests after their initial window has closed. BUG=27660 TEST=WorkerHttpAuth,SharedWorkerHttpAuth uitests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=36888 Reverted and reopened due to valgrind failures. Review URL: http://codereview.chromium.org/509016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 03039b1..dfea17c 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -174,18 +174,16 @@ void NavigationNotificationObserver::Observe(
// occur while authentication is ongoing.
navigation_started_ = true;
} else if (type == NotificationType::AUTH_NEEDED) {
- if (navigation_started_) {
- // Remember the login handler that wants authentication.
- LoginHandler* handler =
- Details<LoginNotificationDetails>(details)->handler();
- automation_->AddLoginHandler(controller_, handler);
-
- // Respond that authentication is needed.
- navigation_started_ = false;
- ConditionMet(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED);
- } else {
- NOTREACHED();
- }
+ // Remember the login handler that wants authentication.
+ // We do this in all cases (not just when navigation_started_ == true) so
+ // tests can still wait for auth dialogs outside of navigation.
+ LoginHandler* handler =
+ Details<LoginNotificationDetails>(details)->handler();
+ automation_->AddLoginHandler(controller_, handler);
+
+ // Respond that authentication is needed.
+ navigation_started_ = false;
+ ConditionMet(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED);
} else {
NOTREACHED();
}