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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 #include "content/public/browser/web_contents.h" | 6 #include "content/public/browser/web_contents.h" |
7 #include "content/shell/shell.h" | 7 #include "content/shell/shell.h" |
8 #include "content/test/content_browser_test.h" | 8 #include "content/test/content_browser_test.h" |
9 #include "content/test/content_browser_test_utils.h" | 9 #include "content/test/content_browser_test_utils.h" |
10 #include "content/test/net/url_request_abort_on_end_job.h" | 10 #include "content/test/net/url_request_abort_on_end_job.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, XsltBadImport) { | 48 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, XsltBadImport) { |
49 ASSERT_TRUE(test_server()->Start()); | 49 ASSERT_TRUE(test_server()->Start()); |
50 URLRequestAbortOnEndJob::AddUrlHandler(); | 50 URLRequestAbortOnEndJob::AddUrlHandler(); |
51 GURL url = test_server()->GetURL(kXsltBadImportPage); | 51 GURL url = test_server()->GetURL(kXsltBadImportPage); |
52 | 52 |
53 NavigateToURL(shell(), url); | 53 NavigateToURL(shell(), url); |
54 | 54 |
55 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); | 55 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); |
56 } | 56 } |
57 | 57 |
| 58 // This is a browser test because DumpRenderTree has a PrerendererClient |
| 59 // implementation, and the purpose of this test is to ensure that content_shell |
| 60 // does not crash when prerender elements are encountered with no Prererering |
| 61 // implementation supplied to WebKit. |
| 62 |
| 63 // TODO(gavinp,jochen): This browser_test depends on there not being a |
| 64 // prerendering client and prerendering platform provided by the test_shell. |
| 65 // But both will exist when we use content_shell to run layout tests. We must |
| 66 // then add a mechanism to start content_shell without these, or else this |
| 67 // test is not very interesting. |
| 68 const char kPrerenderNoCrashPage[] = |
| 69 "files/prerender/prerender-no-crash.html"; |
| 70 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) { |
| 71 ASSERT_TRUE(test_server()->Start()); |
| 72 GURL url = test_server()->GetURL(kPrerenderNoCrashPage); |
| 73 |
| 74 NavigateToURL(shell(), url); |
| 75 |
| 76 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); |
| 77 } |
| 78 |
58 } // namespace content | 79 } // namespace content |
OLD | NEW |