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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 host_destroyed_observer.Wait(); | 778 host_destroyed_observer.Wait(); |
779 EXPECT_EQ(url, browser()->toolbar_model()->GetURL()); | 779 EXPECT_EQ(url, browser()->toolbar_model()->GetURL()); |
780 | 780 |
781 // Clear the beforeunload handler so the test can easily exit. | 781 // Clear the beforeunload handler so the test can easily exit. |
782 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame()-> | 782 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame()-> |
783 ExecuteJavaScript(ASCIIToUTF16("onbeforeunload=null;")); | 783 ExecuteJavaScript(ASCIIToUTF16("onbeforeunload=null;")); |
784 } | 784 } |
785 | 785 |
786 // Crashy on mac. http://crbug.com/38522 Crashy on win too (after 3 years). | 786 // Crashy on mac. http://crbug.com/38522 Crashy on win too (after 3 years). |
787 // Flaky timeouts on a MemorySanitizer bot. http://crbug.com/410891 | 787 // Flaky timeouts on a MemorySanitizer bot. http://crbug.com/410891 |
788 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(MEMORY_SANITIZER) | 788 #if defined(OS_MACOSX) || \ |
| 789 defined(OS_WIN) || \ |
| 790 defined(MEMORY_SANITIZER) || \ |
| 791 defined(ADDRESS_SANITIZER) |
789 #define MAYBE_SingleBeforeUnloadAfterWindowClose \ | 792 #define MAYBE_SingleBeforeUnloadAfterWindowClose \ |
790 DISABLED_SingleBeforeUnloadAfterWindowClose | 793 DISABLED_SingleBeforeUnloadAfterWindowClose |
791 #else | 794 #else |
792 #define MAYBE_SingleBeforeUnloadAfterWindowClose \ | 795 #define MAYBE_SingleBeforeUnloadAfterWindowClose \ |
793 SingleBeforeUnloadAfterWindowClose | 796 SingleBeforeUnloadAfterWindowClose |
794 #endif | 797 #endif |
795 | 798 |
796 // Test for crbug.com/11647. A page closed with window.close() should not have | 799 // Test for crbug.com/11647. A page closed with window.close() should not have |
797 // two beforeunload dialogs shown. | 800 // two beforeunload dialogs shown. |
798 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_SingleBeforeUnloadAfterWindowClose) { | 801 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_SingleBeforeUnloadAfterWindowClose) { |
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2721 #endif | 2724 #endif |
2722 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2725 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
2723 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2726 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
2724 gfx::Size exp_final_size(initial_wcv_size); | 2727 gfx::Size exp_final_size(initial_wcv_size); |
2725 exp_final_size.Enlarge(wcv_resize_insets.width(), | 2728 exp_final_size.Enlarge(wcv_resize_insets.width(), |
2726 wcv_resize_insets.height() + height_inset); | 2729 wcv_resize_insets.height() + height_inset); |
2727 EXPECT_EQ(exp_final_size, | 2730 EXPECT_EQ(exp_final_size, |
2728 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2731 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
2729 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); | 2732 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); |
2730 } | 2733 } |
OLD | NEW |