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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 explicit RedirectObserver(content::WebContents* web_contents) | 624 explicit RedirectObserver(content::WebContents* web_contents) |
625 : WebContentsObserver(web_contents) { | 625 : WebContentsObserver(web_contents) { |
626 } | 626 } |
627 | 627 |
628 virtual void DidNavigateAnyFrame( | 628 virtual void DidNavigateAnyFrame( |
629 const content::LoadCommittedDetails& details, | 629 const content::LoadCommittedDetails& details, |
630 const content::FrameNavigateParams& params) OVERRIDE { | 630 const content::FrameNavigateParams& params) OVERRIDE { |
631 params_ = params; | 631 params_ = params; |
632 } | 632 } |
633 | 633 |
634 virtual void WebContentsDestroyed(WebContents* contents) OVERRIDE { | 634 virtual void WebContentsDestroyed() OVERRIDE { |
635 // Make sure we don't close the tab while the observer is in scope. | 635 // Make sure we don't close the tab while the observer is in scope. |
636 // See http://crbug.com/314036. | 636 // See http://crbug.com/314036. |
637 FAIL() << "WebContents closed during navigation (http://crbug.com/314036)."; | 637 FAIL() << "WebContents closed during navigation (http://crbug.com/314036)."; |
638 } | 638 } |
639 | 639 |
640 const content::FrameNavigateParams& params() const { | 640 const content::FrameNavigateParams& params() const { |
641 return params_; | 641 return params_; |
642 } | 642 } |
643 | 643 |
644 private: | 644 private: |
(...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2701 #endif | 2701 #endif |
2702 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2702 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
2703 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2703 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
2704 gfx::Size exp_final_size(initial_wcv_size); | 2704 gfx::Size exp_final_size(initial_wcv_size); |
2705 exp_final_size.Enlarge(wcv_resize_insets.width(), | 2705 exp_final_size.Enlarge(wcv_resize_insets.width(), |
2706 wcv_resize_insets.height() + height_inset); | 2706 wcv_resize_insets.height() + height_inset); |
2707 EXPECT_EQ(exp_final_size, | 2707 EXPECT_EQ(exp_final_size, |
2708 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2708 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
2709 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); | 2709 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); |
2710 } | 2710 } |
OLD | NEW |