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