| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <list> | 6 #include <list> |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_NEEDED> | 197 typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_NEEDED> |
| 198 WindowedAuthNeededObserver; | 198 WindowedAuthNeededObserver; |
| 199 | 199 |
| 200 typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_CANCELLED> | 200 typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_CANCELLED> |
| 201 WindowedAuthCancelledObserver; | 201 WindowedAuthCancelledObserver; |
| 202 | 202 |
| 203 typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_SUPPLIED> | 203 typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_SUPPLIED> |
| 204 WindowedAuthSuppliedObserver; | 204 WindowedAuthSuppliedObserver; |
| 205 | 205 |
| 206 const char* kPrefetchAuthPage = "files/login/prefetch.html"; | 206 const char kPrefetchAuthPage[] = "files/login/prefetch.html"; |
| 207 | 207 |
| 208 const char* kMultiRealmTestPage = "files/login/multi_realm.html"; | 208 const char kMultiRealmTestPage[] = "files/login/multi_realm.html"; |
| 209 const int kMultiRealmTestRealmCount = 2; | 209 const int kMultiRealmTestRealmCount = 2; |
| 210 const int kMultiRealmTestResourceCount = 4; | |
| 211 | 210 |
| 212 const char* kSingleRealmTestPage = "files/login/single_realm.html"; | 211 const char kSingleRealmTestPage[] = "files/login/single_realm.html"; |
| 213 const int kSingleRealmTestResourceCount = 6; | |
| 214 | 212 |
| 215 const char* kAuthBasicPage = "auth-basic"; | 213 const char* kAuthBasicPage = "auth-basic"; |
| 216 const char* kAuthDigestPage = "auth-digest"; | 214 const char* kAuthDigestPage = "auth-digest"; |
| 217 | 215 |
| 218 string16 ExpectedTitleFromAuth(const string16& username, | 216 string16 ExpectedTitleFromAuth(const string16& username, |
| 219 const string16& password) { | 217 const string16& password) { |
| 220 // The TestServer sets the title to username/password on successful login. | 218 // The TestServer sets the title to username/password on successful login. |
| 221 return username + UTF8ToUTF16("/") + password; | 219 return username + UTF8ToUTF16("/") + password; |
| 222 } | 220 } |
| 223 | 221 |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 EXPECT_EQ(1, observer.auth_needed_count_); | 1065 EXPECT_EQ(1, observer.auth_needed_count_); |
| 1068 EXPECT_EQ(1, observer.auth_supplied_count_); | 1066 EXPECT_EQ(1, observer.auth_supplied_count_); |
| 1069 EXPECT_EQ(0, observer.auth_cancelled_count_); | 1067 EXPECT_EQ(0, observer.auth_cancelled_count_); |
| 1070 EXPECT_EQ(1, observer_incognito.auth_needed_count_); | 1068 EXPECT_EQ(1, observer_incognito.auth_needed_count_); |
| 1071 EXPECT_EQ(0, observer_incognito.auth_supplied_count_); | 1069 EXPECT_EQ(0, observer_incognito.auth_supplied_count_); |
| 1072 EXPECT_EQ(0, observer_incognito.auth_cancelled_count_); | 1070 EXPECT_EQ(0, observer_incognito.auth_cancelled_count_); |
| 1073 EXPECT_TRUE(test_server()->Stop()); | 1071 EXPECT_TRUE(test_server()->Stop()); |
| 1074 } | 1072 } |
| 1075 | 1073 |
| 1076 } // namespace | 1074 } // namespace |
| OLD | NEW |