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