OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/test/test_render_view_host.h" | |
6 | |
7 #include "chrome/browser/browser_thread.h" | |
8 #include "chrome/browser/chromeos/offline/offline_load_page.h" | 5 #include "chrome/browser/chromeos/offline/offline_load_page.h" |
9 #include "chrome/browser/tab_contents/navigation_entry.h" | |
10 #include "chrome/browser/tab_contents/test_tab_contents.h" | |
11 #include "chrome/common/render_messages.h" | 6 #include "chrome/common/render_messages.h" |
12 #include "chrome/common/render_messages_params.h" | 7 #include "chrome/common/render_messages_params.h" |
| 8 #include "content/browser/browser_thread.h" |
| 9 #include "content/browser/renderer_host/test_render_view_host.h" |
| 10 #include "content/browser/tab_contents/navigation_entry.h" |
| 11 #include "content/browser/tab_contents/test_tab_contents.h" |
13 | 12 |
14 static const char* kURL1 = "http://www.google.com/"; | 13 static const char* kURL1 = "http://www.google.com/"; |
15 static const char* kURL2 = "http://www.gmail.com/"; | 14 static const char* kURL2 = "http://www.gmail.com/"; |
16 | 15 |
17 namespace { | 16 namespace { |
18 | 17 |
19 // An OfflineLoadPage class that does not create windows. | 18 // An OfflineLoadPage class that does not create windows. |
20 class TestOfflineLoadPage : public chromeos::OfflineLoadPage { | 19 class TestOfflineLoadPage : public chromeos::OfflineLoadPage { |
21 public: | 20 public: |
22 TestOfflineLoadPage(TabContents* tab_contents, | 21 TestOfflineLoadPage(TabContents* tab_contents, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // The interstitial should be gone. | 133 // The interstitial should be gone. |
135 EXPECT_EQ(CANCEL, user_response()); | 134 EXPECT_EQ(CANCEL, user_response()); |
136 EXPECT_FALSE(GetOfflineLoadPage()); | 135 EXPECT_FALSE(GetOfflineLoadPage()); |
137 // We did not proceed, the pending entry should be gone. | 136 // We did not proceed, the pending entry should be gone. |
138 EXPECT_FALSE(controller().pending_entry()); | 137 EXPECT_FALSE(controller().pending_entry()); |
139 // the URL is set back to kURL1. | 138 // the URL is set back to kURL1. |
140 EXPECT_EQ(kURL1, contents()->GetURL().spec()); | 139 EXPECT_EQ(kURL1, contents()->GetURL().spec()); |
141 } | 140 } |
142 | 141 |
143 } // namespace chromeos | 142 } // namespace chromeos |
OLD | NEW |