| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "content/public/common/renderer_preferences.h" | 42 #include "content/public/common/renderer_preferences.h" |
| 43 #include "content/public/common/url_constants.h" | 43 #include "content/public/common/url_constants.h" |
| 44 #include "content/public/test/browser_test_utils.h" | 44 #include "content/public/test/browser_test_utils.h" |
| 45 #include "content/public/test/content_browser_test.h" | 45 #include "content/public/test/content_browser_test.h" |
| 46 #include "content/public/test/content_browser_test_utils.h" | 46 #include "content/public/test/content_browser_test_utils.h" |
| 47 #include "content/public/test/test_navigation_observer.h" | 47 #include "content/public/test/test_navigation_observer.h" |
| 48 #include "content/public/test/test_utils.h" | 48 #include "content/public/test/test_utils.h" |
| 49 #include "content/shell/browser/shell.h" | 49 #include "content/shell/browser/shell.h" |
| 50 #include "content/shell/common/shell_switches.h" | 50 #include "content/shell/common/shell_switches.h" |
| 51 #include "content/test/content_browser_test_utils_internal.h" | 51 #include "content/test/content_browser_test_utils_internal.h" |
| 52 #include "content/test/test_frame_navigation_observer.h" | |
| 53 #include "net/dns/mock_host_resolver.h" | 52 #include "net/dns/mock_host_resolver.h" |
| 54 #include "net/test/embedded_test_server/embedded_test_server.h" | 53 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 55 #include "net/test/embedded_test_server/http_request.h" | 54 #include "net/test/embedded_test_server/http_request.h" |
| 56 #include "net/test/url_request/url_request_failed_job.h" | 55 #include "net/test/url_request/url_request_failed_job.h" |
| 57 #include "testing/gmock/include/gmock/gmock-matchers.h" | 56 #include "testing/gmock/include/gmock/gmock-matchers.h" |
| 58 | 57 |
| 59 namespace { | 58 namespace { |
| 60 | 59 |
| 61 static std::string kAddNamedFrameScript = | 60 static std::string kAddNamedFrameScript = |
| 62 "var f = document.createElement('iframe');" | 61 "var f = document.createElement('iframe');" |
| (...skipping 6966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7029 NavigationHandleCommitObserver handle_observer(shell()->web_contents(), | 7028 NavigationHandleCommitObserver handle_observer(shell()->web_contents(), |
| 7030 kFragmentURL); | 7029 kFragmentURL); |
| 7031 EXPECT_TRUE(NavigateToURL(shell(), kFragmentURL)); | 7030 EXPECT_TRUE(NavigateToURL(shell(), kFragmentURL)); |
| 7032 | 7031 |
| 7033 EXPECT_TRUE(handle_observer.has_committed()); | 7032 EXPECT_TRUE(handle_observer.has_committed()); |
| 7034 EXPECT_TRUE(handle_observer.was_same_page()); | 7033 EXPECT_TRUE(handle_observer.was_same_page()); |
| 7035 EXPECT_FALSE(handle_observer.was_renderer_initiated()); | 7034 EXPECT_FALSE(handle_observer.was_renderer_initiated()); |
| 7036 } | 7035 } |
| 7037 | 7036 |
| 7038 } // namespace content | 7037 } // namespace content |
| OLD | NEW |