| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "content/browser/frame_host/frame_tree.h" | 7 #include "content/browser/frame_host/frame_tree.h" |
| 8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| 11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
| 12 #include "content/public/browser/notification_types.h" | 12 #include "content/public/browser/notification_types.h" |
| 13 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
| 14 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
| 15 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
| 16 #include "content/public/test/content_browser_test.h" |
| 17 #include "content/public/test/content_browser_test_utils.h" |
| 16 #include "content/public/test/test_utils.h" | 18 #include "content/public/test/test_utils.h" |
| 17 #include "content/shell/browser/shell.h" | 19 #include "content/shell/browser/shell.h" |
| 18 #include "content/test/content_browser_test.h" | |
| 19 #include "content/test/content_browser_test_utils.h" | |
| 20 #include "net/dns/mock_host_resolver.h" | 20 #include "net/dns/mock_host_resolver.h" |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 class SitePerProcessWebContentsObserver: public WebContentsObserver { | 25 class SitePerProcessWebContentsObserver: public WebContentsObserver { |
| 26 public: | 26 public: |
| 27 explicit SitePerProcessWebContentsObserver(WebContents* web_contents) | 27 explicit SitePerProcessWebContentsObserver(WebContents* web_contents) |
| 28 : WebContentsObserver(web_contents), | 28 : WebContentsObserver(web_contents), |
| 29 navigation_succeeded_(false) {} | 29 navigation_succeeded_(false) {} |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 "server-redirect?" + client_redirect_http_url.spec())); | 509 "server-redirect?" + client_redirect_http_url.spec())); |
| 510 EXPECT_TRUE(NavigateIframeToURL(shell(), server_redirect_http_url, "test")); | 510 EXPECT_TRUE(NavigateIframeToURL(shell(), server_redirect_http_url, "test")); |
| 511 | 511 |
| 512 // DidFailProvisionalLoad when navigating to client_redirect_http_url. | 512 // DidFailProvisionalLoad when navigating to client_redirect_http_url. |
| 513 EXPECT_EQ(observer.navigation_url(), client_redirect_http_url); | 513 EXPECT_EQ(observer.navigation_url(), client_redirect_http_url); |
| 514 EXPECT_FALSE(observer.navigation_succeeded()); | 514 EXPECT_FALSE(observer.navigation_succeeded()); |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 | 517 |
| 518 } // namespace content | 518 } // namespace content |
| OLD | NEW |