OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/dom_operation_notification_details.h" | 7 #include "chrome/browser/dom_operation_notification_details.h" |
8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
9 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" | 9 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" |
10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "content/public/browser/notification_details.h" | 24 #include "content/public/browser/notification_details.h" |
25 #include "content/public/browser/notification_source.h" | 25 #include "content/public/browser/notification_source.h" |
26 #include "content/public/browser/notification_source.h" | 26 #include "content/public/browser/notification_source.h" |
27 #include "content/public/common/bindings_policy.h" | 27 #include "content/public/common/bindings_policy.h" |
28 #include "content/public/common/content_constants.h" | 28 #include "content/public/common/content_constants.h" |
29 #include "content/test/test_browser_thread.h" | 29 #include "content/test/test_browser_thread.h" |
30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
31 #include "ui/base/message_box_flags.h" | 31 #include "ui/base/message_box_flags.h" |
32 #include "webkit/glue/webkit_glue.h" | 32 #include "webkit/glue/webkit_glue.h" |
33 | 33 |
| 34 using content::BrowserThread; |
34 using webkit_glue::PasswordForm; | 35 using webkit_glue::PasswordForm; |
35 | 36 |
36 class TestInterstitialPage : public ChromeInterstitialPage { | 37 class TestInterstitialPage : public ChromeInterstitialPage { |
37 public: | 38 public: |
38 enum InterstitialState { | 39 enum InterstitialState { |
39 UNDECIDED = 0, // No decision taken yet. | 40 UNDECIDED = 0, // No decision taken yet. |
40 OKED, // Proceed was called. | 41 OKED, // Proceed was called. |
41 CANCELED // DontProceed was called. | 42 CANCELED // DontProceed was called. |
42 }; | 43 }; |
43 | 44 |
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 | 1805 |
1805 // It should have a transient entry. | 1806 // It should have a transient entry. |
1806 EXPECT_TRUE(other_controller.GetTransientEntry()); | 1807 EXPECT_TRUE(other_controller.GetTransientEntry()); |
1807 | 1808 |
1808 // And the interstitial should be showing. | 1809 // And the interstitial should be showing. |
1809 EXPECT_TRUE(other_contents->showing_interstitial_page()); | 1810 EXPECT_TRUE(other_contents->showing_interstitial_page()); |
1810 | 1811 |
1811 // And the interstitial should do a reload on don't proceed. | 1812 // And the interstitial should do a reload on don't proceed. |
1812 EXPECT_TRUE(other_contents->interstitial_page()->reload_on_dont_proceed()); | 1813 EXPECT_TRUE(other_contents->interstitial_page()->reload_on_dont_proceed()); |
1813 } | 1814 } |
OLD | NEW |