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 "chrome/browser/chromeos/cros/cros_library.h" | 5 #include "chrome/browser/chromeos/cros/cros_library.h" |
6 #include "chrome/browser/chromeos/offline/offline_load_page.h" | 6 #include "chrome/browser/chromeos/offline/offline_load_page.h" |
7 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 7 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
8 #include "content/public/browser/interstitial_page.h" | 8 #include "content/public/browser/interstitial_page.h" |
9 #include "content/public/browser/navigation_controller.h" | 9 #include "content/public/browser/navigation_controller.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
11 #include "content/test/test_browser_thread.h" | 11 #include "content/public/test/test_browser_thread.h" |
12 #include "content/test/web_contents_tester.h" | 12 #include "content/test/web_contents_tester.h" |
13 | 13 |
14 using content::BrowserThread; | 14 using content::BrowserThread; |
15 using content::InterstitialPage; | 15 using content::InterstitialPage; |
16 using content::WebContents; | 16 using content::WebContents; |
17 using content::WebContentsTester; | 17 using content::WebContentsTester; |
18 | 18 |
19 static const char* kURL1 = "http://www.google.com/"; | 19 static const char* kURL1 = "http://www.google.com/"; |
20 static const char* kURL2 = "http://www.gmail.com/"; | 20 static const char* kURL2 = "http://www.gmail.com/"; |
21 | 21 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // The interstitial should be gone. | 152 // The interstitial should be gone. |
153 EXPECT_EQ(CANCEL, user_response()); | 153 EXPECT_EQ(CANCEL, user_response()); |
154 EXPECT_FALSE(GetOfflineLoadPage()); | 154 EXPECT_FALSE(GetOfflineLoadPage()); |
155 // We did not proceed, the pending entry should be gone. | 155 // We did not proceed, the pending entry should be gone. |
156 EXPECT_FALSE(controller().GetPendingEntry()); | 156 EXPECT_FALSE(controller().GetPendingEntry()); |
157 // the URL is set back to kURL1. | 157 // the URL is set back to kURL1. |
158 EXPECT_EQ(kURL1, contents()->GetURL().spec()); | 158 EXPECT_EQ(kURL1, contents()->GetURL().spec()); |
159 } | 159 } |
160 | 160 |
161 } // namespace chromeos | 161 } // namespace chromeos |
OLD | NEW |