| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 #include "chrome/test/base/in_process_browser_test.h" | 6 #include "chrome/test/base/in_process_browser_test.h" |
| 7 #include "chrome/test/base/ui_test_utils.h" | 7 #include "chrome/test/base/ui_test_utils.h" |
| 8 #include "content/browser/net/url_request_abort_on_end_job.h" | 8 #include "content/browser/net/url_request_abort_on_end_job.h" |
| 9 #include "content/browser/tab_contents/tab_contents.h" | 9 #include "content/browser/tab_contents/tab_contents.h" |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // marking this as flakey. | 33 // marking this as flakey. |
| 34 EXPECT_FALSE(tab_contents->is_crashed()); | 34 EXPECT_FALSE(tab_contents->is_crashed()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 // This is a browser test because the DumpRenderTree framework holds | 37 // This is a browser test because the DumpRenderTree framework holds |
| 38 // onto a Document* reference that blocks this reproduction from | 38 // onto a Document* reference that blocks this reproduction from |
| 39 // destroying the Document, so it is not a use after free unless | 39 // destroying the Document, so it is not a use after free unless |
| 40 // you don't have DumpRenderTree loaded. | 40 // you don't have DumpRenderTree loaded. |
| 41 | 41 |
| 42 // http://crbug.com/104582 | 42 // http://crbug.com/104582 |
| 43 #if defined(OS_WIN) || defined(OS_CHROMEOS) | 43 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_LINUX) |
| 44 #define MAYBE_XsltBadImport DISABLED_XsltBadImport | 44 #define MAYBE_XsltBadImport DISABLED_XsltBadImport |
| 45 #else | 45 #else |
| 46 #define MAYBE_XsltBadImport XsltBadImport | 46 #define MAYBE_XsltBadImport XsltBadImport |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 // TODO(gavinp): remove this browser_test if we can get good LayoutTest | 49 // TODO(gavinp): remove this browser_test if we can get good LayoutTest |
| 50 // coverage of the same issue. | 50 // coverage of the same issue. |
| 51 const char kXsltBadImportPage[] = | 51 const char kXsltBadImportPage[] = |
| 52 "files/webkit/xslt-bad-import.html"; | 52 "files/webkit/xslt-bad-import.html"; |
| 53 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, MAYBE_XsltBadImport) { | 53 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, MAYBE_XsltBadImport) { |
| 54 ASSERT_TRUE(test_server()->Start()); | 54 ASSERT_TRUE(test_server()->Start()); |
| 55 URLRequestAbortOnEndJob::AddUrlHandler(); | 55 URLRequestAbortOnEndJob::AddUrlHandler(); |
| 56 GURL url = test_server()->GetURL(kXsltBadImportPage); | 56 GURL url = test_server()->GetURL(kXsltBadImportPage); |
| 57 | 57 |
| 58 ui_test_utils::NavigateToURL(browser(), url); | 58 ui_test_utils::NavigateToURL(browser(), url); |
| 59 | 59 |
| 60 TabContents* tab_contents = browser()->GetSelectedTabContents(); | 60 TabContents* tab_contents = browser()->GetSelectedTabContents(); |
| 61 EXPECT_FALSE(tab_contents->is_crashed()); | 61 EXPECT_FALSE(tab_contents->is_crashed()); |
| 62 } | 62 } |
| OLD | NEW |