diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-12 13:52:31 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-12 13:52:31 +0000 |
commit | 5a29592d33d6e1520a6c63527a5c229c0e518078 (patch) | |
tree | 9e812b029004c6805799d958c36aa4e73208c399 /content/browser/gpu/gpu_functional_browsertest.cc | |
parent | 26dd01c633413eb3268b2f92d05c65c1a3c0969c (diff) | |
download | chromium_src-5a29592d33d6e1520a6c63527a5c229c0e518078.zip chromium_src-5a29592d33d6e1520a6c63527a5c229c0e518078.tar.gz chromium_src-5a29592d33d6e1520a6c63527a5c229c0e518078.tar.bz2 |
Wait for media file load before checking for GPU process in test.
The navigation completes before the video is loaded, so we have to use a javascript file to wait for a load event to be sure that the video is loaded and should have launched the GPU process. It also has to use a non-empty video, as an empty video never loads.
BUG=237208
Review URL: https://chromiumcodereview.appspot.com/16373015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gpu/gpu_functional_browsertest.cc')
-rw-r--r-- | content/browser/gpu/gpu_functional_browsertest.cc | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/content/browser/gpu/gpu_functional_browsertest.cc b/content/browser/gpu/gpu_functional_browsertest.cc index 6d31c2a..eb3f935 100644 --- a/content/browser/gpu/gpu_functional_browsertest.cc +++ b/content/browser/gpu/gpu_functional_browsertest.cc @@ -69,18 +69,18 @@ class GpuFunctionalTest : public ContentBrowserTest { } } - void VerifyGPUProcessOnPage(std::string filename, bool html) { + void VerifyGPUProcessOnPage(std::string filename, bool wait) { Shell::Initialize(); ASSERT_TRUE(test_server()->Start()); + DOMMessageQueue message_queue; - if (html) { - std::string url("files/gpu/"); - GURL full_url = test_server()->GetURL(url.append(filename)); - NavigateToURL(shell(), full_url); - } else { - NavigateToURL(shell(), - GetFileUrlWithQuery(gpu_test_dir_.AppendASCII(filename), - "")); + std::string url("files/gpu/"); + GURL full_url = test_server()->GetURL(url.append(filename)); + NavigateToURL(shell(), full_url); + + if (wait) { + std::string result_string; + ASSERT_TRUE(message_queue.WaitForMessage(&result_string)); } bool result = false; @@ -105,26 +105,22 @@ IN_PROC_BROWSER_TEST_F(GpuFunctionalTest, // Verify that gpu process is spawned in webgl example. IN_PROC_BROWSER_TEST_F(GpuFunctionalTest, MANUAL_TestWebGL) { - VerifyGPUProcessOnPage("functional_webgl.html", true); + VerifyGPUProcessOnPage("functional_webgl.html", false); } // Verify that gpu process is spawned when viewing a 2D canvas. IN_PROC_BROWSER_TEST_F(GpuFunctionalTest, MANUAL_Test2dCanvas) { - VerifyGPUProcessOnPage("functional_canvas_demo.html", true); + VerifyGPUProcessOnPage("functional_canvas_demo.html", false); } // Verify that gpu process is spawned when viewing a 3D CSS page. IN_PROC_BROWSER_TEST_F(GpuFunctionalTest, MANUAL_Test3dCss) { - VerifyGPUProcessOnPage("functional_3d_css.html", true); + VerifyGPUProcessOnPage("functional_3d_css.html", false); } -// TestGpuWithVideo is failing on all platforms -// http://crbug.com/237208 -#define MANUAL_TestGpuWithVideo DISABLED_MANUAL_TestGpuWithVideo - // Verify that gpu process is started when viewing video. IN_PROC_BROWSER_TEST_F(GpuFunctionalTest, MANUAL_TestGpuWithVideo) { - VerifyGPUProcessOnPage("functional_color2.ogv", false); + VerifyGPUProcessOnPage("functional_video.html", true); } } // namespace content |