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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 ExecuteJavaScript(ASCIIToUTF16("onbeforeunload=null;")); | 598 ExecuteJavaScript(ASCIIToUTF16("onbeforeunload=null;")); |
599 } | 599 } |
600 | 600 |
601 class RedirectObserver : public content::WebContentsObserver { | 601 class RedirectObserver : public content::WebContentsObserver { |
602 public: | 602 public: |
603 explicit RedirectObserver(content::WebContents* web_contents) | 603 explicit RedirectObserver(content::WebContents* web_contents) |
604 : WebContentsObserver(web_contents) { | 604 : WebContentsObserver(web_contents) { |
605 } | 605 } |
606 | 606 |
607 virtual void DidNavigateAnyFrame( | 607 virtual void DidNavigateAnyFrame( |
| 608 content::RenderFrameHost* render_frame_host, |
608 const content::LoadCommittedDetails& details, | 609 const content::LoadCommittedDetails& details, |
609 const content::FrameNavigateParams& params) override { | 610 const content::FrameNavigateParams& params) override { |
610 params_ = params; | 611 params_ = params; |
611 } | 612 } |
612 | 613 |
613 virtual void WebContentsDestroyed() override { | 614 virtual void WebContentsDestroyed() override { |
614 // Make sure we don't close the tab while the observer is in scope. | 615 // Make sure we don't close the tab while the observer is in scope. |
615 // See http://crbug.com/314036. | 616 // See http://crbug.com/314036. |
616 FAIL() << "WebContents closed during navigation (http://crbug.com/314036)."; | 617 FAIL() << "WebContents closed during navigation (http://crbug.com/314036)."; |
617 } | 618 } |
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2645 #endif | 2646 #endif |
2646 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2647 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
2647 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2648 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
2648 gfx::Size exp_final_size(initial_wcv_size); | 2649 gfx::Size exp_final_size(initial_wcv_size); |
2649 exp_final_size.Enlarge(wcv_resize_insets.width(), | 2650 exp_final_size.Enlarge(wcv_resize_insets.width(), |
2650 wcv_resize_insets.height() + height_inset); | 2651 wcv_resize_insets.height() + height_inset); |
2651 EXPECT_EQ(exp_final_size, | 2652 EXPECT_EQ(exp_final_size, |
2652 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2653 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
2653 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); | 2654 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); |
2654 } | 2655 } |
OLD | NEW |