Chromium Code Reviews| Index: chrome/browser/prerender/prerender_browsertest.cc |
| =================================================================== |
| --- chrome/browser/prerender/prerender_browsertest.cc (revision 82104) |
| +++ chrome/browser/prerender/prerender_browsertest.cc (working copy) |
| @@ -2,6 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include <deque> |
| + |
| #include "base/command_line.h" |
| #include "base/path_service.h" |
| #include "base/string_util.h" |
| @@ -21,8 +23,6 @@ |
| #include "net/url_request/url_request_context_getter.h" |
| #include "ui/base/l10n/l10n_util.h" |
| -#include <deque> |
| - |
| // Prerender tests work as follows: |
| // |
| // A page with a prefetch link to the test page is loaded. Once prerendered, |
| @@ -649,6 +649,9 @@ |
| // Checks that prerenderers will terminate when a video tag is encountered. |
| IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHTML5Video) { |
| + // Disable composited video to avoid FINAL_STATUS_COMPOSITING. |
| + CommandLine::ForCurrentProcess()->AppendSwitch( |
| + switches::kDisableAcceleratedVideo); |
| PrerenderTestURL("files/prerender/prerender_html5_video.html", |
| FINAL_STATUS_HTML5_MEDIA, |
| 1); |
| @@ -657,9 +660,35 @@ |
| // Checks that prerenderers will terminate when a video tag is inserted via |
| // javascript. |
| IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHTML5VideoJs) { |
| + // Disable composited video to avoid FINAL_STATUS_COMPOSITING. |
| + CommandLine::ForCurrentProcess()->AppendSwitch( |
| + switches::kDisableAcceleratedVideo); |
| PrerenderTestURL("files/prerender/prerender_html5_video_script.html", |
| FINAL_STATUS_HTML5_MEDIA, |
| 1); |
| } |
| +// Checks that compositing cancels the prerender. |
| +// |
| +// This test is somewhat flaky on the Linux trybots, and always fails on the |
| +// Windows ones, despite passing locally on all 3 platforms without issue. |
| +// It has been suggested this is because some of the trybots are virtualized, |
| +// so lack hardware rendering support. |
| +// TODO(mmenke): Investigate this. |
|
cbentzel
2011/04/19 17:42:41
Add a bug for this. Feels pretty bad - even if you
mmenke
2011/04/19 20:00:01
Bug filed. I couldn't find a way to do so, but I'
|
| +#if defined(OS_MACOSX) |
| +IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderCompositing) { |
| + PrerenderTestURL("files/prerender/prerender_compositing.html", |
| + FINAL_STATUS_COMPOSITING, |
| + 1); |
| +} |
| +#endif // !defined(OS_MACOSX) |
| + |
| +// Checks that scripts can retrieve the correct window size while preredering. |
|
cbentzel
2011/04/19 17:42:41
Nit: s/preredering/prerendering
mmenke
2011/04/19 20:00:01
Done.
|
| +IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderWindowSize) { |
| + PrerenderTestURL("files/prerender/prerender_size.html", |
| + FINAL_STATUS_USED, |
| + 1); |
| + NavigateToDestURL(); |
| +} |
| + |
| } // namespace prerender |