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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/prerender/prerender_manager.h" | 10 #include "chrome/browser/prerender/prerender_manager.h" |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 ASSERT_TRUE(handler); | 990 ASSERT_TRUE(handler); |
991 SetAuthFor(handler); | 991 SetAuthFor(handler); |
992 | 992 |
993 // Regular tab should be authenticated. | 993 // Regular tab should be authenticated. |
994 auth_supplied_waiter.Wait(); | 994 auth_supplied_waiter.Wait(); |
995 | 995 |
996 // There's not really a way to wait for the incognito window to "do | 996 // There's not really a way to wait for the incognito window to "do |
997 // nothing". Run anything pending in the message loop just to be sure. | 997 // nothing". Run anything pending in the message loop just to be sure. |
998 // (This shouldn't be necessary since notifications are synchronous, but | 998 // (This shouldn't be necessary since notifications are synchronous, but |
999 // maybe it will help avoid flake someday in the future..) | 999 // maybe it will help avoid flake someday in the future..) |
1000 ui_test_utils::RunAllPendingInMessageLoop(); | 1000 content::RunAllPendingInMessageLoop(); |
1001 } | 1001 } |
1002 | 1002 |
1003 EXPECT_EQ(1, observer.auth_needed_count_); | 1003 EXPECT_EQ(1, observer.auth_needed_count_); |
1004 EXPECT_EQ(1, observer.auth_supplied_count_); | 1004 EXPECT_EQ(1, observer.auth_supplied_count_); |
1005 EXPECT_EQ(0, observer.auth_cancelled_count_); | 1005 EXPECT_EQ(0, observer.auth_cancelled_count_); |
1006 EXPECT_EQ(1, observer_incognito.auth_needed_count_); | 1006 EXPECT_EQ(1, observer_incognito.auth_needed_count_); |
1007 EXPECT_EQ(0, observer_incognito.auth_supplied_count_); | 1007 EXPECT_EQ(0, observer_incognito.auth_supplied_count_); |
1008 EXPECT_EQ(0, observer_incognito.auth_cancelled_count_); | 1008 EXPECT_EQ(0, observer_incognito.auth_cancelled_count_); |
1009 EXPECT_TRUE(test_server()->Stop()); | 1009 EXPECT_TRUE(test_server()->Stop()); |
1010 } | 1010 } |
1011 | 1011 |
1012 } // namespace | 1012 } // namespace |
OLD | NEW |