OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/browser.h" | |
6 #include "chrome/test/base/in_process_browser_test.h" | |
7 #include "chrome/test/base/ui_test_utils.h" | |
8 #include "content/browser/net/url_request_abort_on_end_job.h" | |
9 #include "content/browser/tab_contents/tab_contents.h" | |
10 | |
11 typedef InProcessBrowserTest WebKitBrowserTest; | |
12 | |
13 const char kAsyncScriptThatAbortsOnEndPage[] = | |
14 "files/webkit/async_script_abort_on_end.html"; | |
15 | |
16 // This is a browser test because it is hard to reproduce reliably in a | |
17 // layout test without races. http://crbug.com/75604 deals with a request | |
18 // for an async script which gets data in the response and immediately | |
19 // after aborts. This test creates that condition, and it is passed | |
20 // if chrome does not crash. | |
21 | |
22 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, AbortOnEnd) { | |
23 ASSERT_TRUE(test_server()->Start()); | |
24 URLRequestAbortOnEndJob::AddUrlHandler(); | |
25 GURL url = test_server()->GetURL(kAsyncScriptThatAbortsOnEndPage); | |
26 | |
27 ui_test_utils::NavigateToURL(browser(), url); | |
28 | |
29 TabContents* tab_contents = browser()->GetSelectedTabContents(); | |
30 // If you are seeing this test fail, please strongly investigate the | |
31 // possibility that http://crbug.com/75604 and | |
32 // https://bugs.webkit.org/show_bug.cgi?id=71122 have reverted before | |
33 // marking this as flakey. | |
34 EXPECT_FALSE(tab_contents->is_crashed()); | |
35 } | |
36 | |
OLD | NEW |