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/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 DISALLOW_COPY_AND_ASSIGN(CacheMaxAgeHandler); | 69 DISALLOW_COPY_AND_ASSIGN(CacheMaxAgeHandler); |
70 }; | 70 }; |
71 | 71 |
72 class CrashRecoveryBrowserTest : public InProcessBrowserTest { | 72 class CrashRecoveryBrowserTest : public InProcessBrowserTest { |
73 protected: | 73 protected: |
74 WebContents* GetActiveWebContents() { | 74 WebContents* GetActiveWebContents() { |
75 return browser()->tab_strip_model()->GetActiveWebContents(); | 75 return browser()->tab_strip_model()->GetActiveWebContents(); |
76 } | 76 } |
77 | 77 |
78 private: | 78 private: |
79 virtual void SetUpCommandLine(base::CommandLine* command_line) override { | 79 void SetUpCommandLine(base::CommandLine* command_line) override { |
80 command_line->AppendSwitch(switches::kDisableBreakpad); | 80 command_line->AppendSwitch(switches::kDisableBreakpad); |
81 } | 81 } |
82 }; | 82 }; |
83 | 83 |
84 // Test that reload works after a crash. | 84 // Test that reload works after a crash. |
85 // Disabled, http://crbug.com/29331 , http://crbug.com/69637 . | 85 // Disabled, http://crbug.com/29331 , http://crbug.com/69637 . |
86 IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, Reload) { | 86 IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, Reload) { |
87 // The title of the active tab should change each time this URL is loaded. | 87 // The title of the active tab should change each time this URL is loaded. |
88 GURL url( | 88 GURL url( |
89 "data:text/html,<script>document.title=new Date().valueOf()</script>"); | 89 "data:text/html,<script>document.title=new Date().valueOf()</script>"); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); | 168 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); |
169 | 169 |
170 chrome::Reload(browser(), CURRENT_TAB); | 170 chrome::Reload(browser(), CURRENT_TAB); |
171 content::WaitForLoadStop(GetActiveWebContents()); | 171 content::WaitForLoadStop(GetActiveWebContents()); |
172 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); | 172 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); |
173 } | 173 } |
174 | 174 |
175 } // namespace | 175 } // namespace |
176 | 176 |
177 #endif | 177 #endif |
OLD | NEW |