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/public/test/browser_test_utils.h" |
7 #include "content/public/test/content_browser_test.h" | 8 #include "content/public/test/content_browser_test.h" |
8 #include "content/public/test/content_browser_test_utils.h" | 9 #include "content/public/test/content_browser_test_utils.h" |
9 #include "content/shell/browser/shell.h" | 10 #include "content/shell/browser/shell.h" |
10 #include "content/test/net/url_request_abort_on_end_job.h" | 11 #include "content/test/net/url_request_abort_on_end_job.h" |
11 #include "net/test/embedded_test_server/embedded_test_server.h" | 12 #include "net/test/embedded_test_server/embedded_test_server.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 typedef ContentBrowserTest WebKitBrowserTest; | 16 typedef ContentBrowserTest WebKitBrowserTest; |
16 | 17 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const char kPrerenderNoCrashPage[] = "/prerender/prerender-no-crash.html"; | 69 const char kPrerenderNoCrashPage[] = "/prerender/prerender-no-crash.html"; |
69 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) { | 70 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) { |
70 ASSERT_TRUE(embedded_test_server()->Start()); | 71 ASSERT_TRUE(embedded_test_server()->Start()); |
71 GURL url = embedded_test_server()->GetURL(kPrerenderNoCrashPage); | 72 GURL url = embedded_test_server()->GetURL(kPrerenderNoCrashPage); |
72 | 73 |
73 NavigateToURL(shell(), url); | 74 NavigateToURL(shell(), url); |
74 | 75 |
75 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); | 76 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); |
76 } | 77 } |
77 | 78 |
| 79 const char kTransformAnimationPage[] = "/transform-animation.html"; |
| 80 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, TransformAnimationMainThreadFrames) { |
| 81 ASSERT_TRUE(embedded_test_server()->Start()); |
| 82 URLRequestAbortOnEndJob::AddUrlHandler(); |
| 83 GURL url = embedded_test_server()->GetURL(kTransformAnimationPage); |
| 84 |
| 85 NavigateToURL(shell(), url); |
| 86 |
| 87 WebContents* web_contents = shell()->web_contents(); |
| 88 FrameWatcher frame_watcher(web_contents); |
| 89 frame_watcher.WaitFrames(3); |
| 90 ASSERT_FALSE(frame_watcher.LastMetadata().is_main_thread_frame); |
| 91 } |
| 92 |
78 } // namespace content | 93 } // namespace content |
OLD | NEW |