OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/frame_host/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 6843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6854 EXPECT_TRUE( | 6854 EXPECT_TRUE( |
6855 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"))); | 6855 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"))); |
6856 EXPECT_EQ(2, controller.GetLastCommittedEntryIndex()); | 6856 EXPECT_EQ(2, controller.GetLastCommittedEntryIndex()); |
6857 | 6857 |
6858 TestNavigationObserver back_load_observer(shell()->web_contents()); | 6858 TestNavigationObserver back_load_observer(shell()->web_contents()); |
6859 controller.GoBack(); | 6859 controller.GoBack(); |
6860 back_load_observer.Wait(); | 6860 back_load_observer.Wait(); |
6861 | 6861 |
6862 // The expectation is that about:blank was loaded and the virtual URL is set | 6862 // The expectation is that about:blank was loaded and the virtual URL is set |
6863 // to the URL that was blocked. | 6863 // to the URL that was blocked. |
6864 // | |
6865 // TODO(nasko): Now that the error commits on the previous URL, the blocked | |
6866 // navigation logic is no longer needed. | |
6864 EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); | 6867 EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); |
6865 EXPECT_FALSE( | 6868 EXPECT_FALSE( |
6866 controller.GetLastCommittedEntry()->GetURL().SchemeIs(url::kDataScheme)); | 6869 controller.GetLastCommittedEntry()->GetURL().SchemeIs(url::kDataScheme)); |
6867 EXPECT_TRUE(controller.GetLastCommittedEntry()->GetVirtualURL().SchemeIs( | 6870 EXPECT_EQ(redirect_to_blank_url, |
nasko
2017/06/06 00:27:38
Let's rename this, redirect_to_unsafe_redirect is
davidben
2017/06/06 17:31:08
Done.
| |
6868 url::kDataScheme)); | 6871 controller.GetLastCommittedEntry()->GetVirtualURL()); |
6869 EXPECT_EQ(url::kAboutBlankURL, | 6872 EXPECT_EQ(url::kAboutBlankURL, |
6870 controller.GetLastCommittedEntry()->GetURL().spec()); | 6873 controller.GetLastCommittedEntry()->GetURL().spec()); |
6871 } | 6874 } |
6872 | 6875 |
6873 } // namespace content | 6876 } // namespace content |
OLD | NEW |