| 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 "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/browser/renderer_host/offline_resource_handler.h" | 7 #include "chrome/browser/renderer_host/offline_resource_handler.h" |
| 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 9 #include "content/browser/tab_contents/navigation_entry.h" | 9 #include "content/browser/tab_contents/navigation_entry.h" |
| 10 #include "content/browser/tab_contents/test_tab_contents.h" | 10 #include "content/browser/tab_contents/test_tab_contents.h" |
| 11 #include "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
| 12 #include "content/test/test_browser_thread.h" | 12 #include "content/test/test_browser_thread.h" |
| 13 | 13 |
| 14 using content::BrowserThread; |
| 15 |
| 14 static const char* kURL1 = "http://www.google.com/"; | 16 static const char* kURL1 = "http://www.google.com/"; |
| 15 static const char* kURL2 = "http://www.gmail.com/"; | 17 static const char* kURL2 = "http://www.gmail.com/"; |
| 16 | 18 |
| 17 namespace chromeos { | 19 namespace chromeos { |
| 18 | 20 |
| 19 class OfflineLoadPageTest; | 21 class OfflineLoadPageTest; |
| 20 | 22 |
| 21 namespace { | 23 namespace { |
| 22 | 24 |
| 23 // An OfflineLoadPage class that does not create windows. | 25 // An OfflineLoadPage class that does not create windows. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // The interstitial should be gone. | 156 // The interstitial should be gone. |
| 155 EXPECT_EQ(CANCEL, user_response()); | 157 EXPECT_EQ(CANCEL, user_response()); |
| 156 EXPECT_FALSE(GetOfflineLoadPage()); | 158 EXPECT_FALSE(GetOfflineLoadPage()); |
| 157 // We did not proceed, the pending entry should be gone. | 159 // We did not proceed, the pending entry should be gone. |
| 158 EXPECT_FALSE(controller().pending_entry()); | 160 EXPECT_FALSE(controller().pending_entry()); |
| 159 // the URL is set back to kURL1. | 161 // the URL is set back to kURL1. |
| 160 EXPECT_EQ(kURL1, contents()->GetURL().spec()); | 162 EXPECT_EQ(kURL1, contents()->GetURL().spec()); |
| 161 } | 163 } |
| 162 | 164 |
| 163 } // namespace chromeos | 165 } // namespace chromeos |
| OLD | NEW |