| Index: chrome/test/ui/ppapi_uitest.cc
|
| ===================================================================
|
| --- chrome/test/ui/ppapi_uitest.cc (revision 68649)
|
| +++ chrome/test/ui/ppapi_uitest.cc (working copy)
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "base/file_util.h"
|
| #include "base/path_service.h"
|
| +#include "base/test/test_timeouts.h"
|
| #include "build/build_config.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/test/automation/tab_proxy.h"
|
| @@ -84,9 +85,26 @@
|
| scoped_refptr<TabProxy> tab(GetActiveTab());
|
| ASSERT_TRUE(tab.get());
|
| ASSERT_TRUE(tab->NavigateToURL(test_url));
|
| +
|
| + // First wait for the "starting" signal. This cookie is set at the start
|
| + // of every test. Waiting for this separately allows us to avoid a single
|
| + // long timeout. Instead, we can have two timeouts which allow startup +
|
| + // test execution time to take a while on a loaded computer, while also
|
| + // making sure we're making forward progress.
|
| + std::string startup_cookie =
|
| + WaitUntilCookieNonEmpty(tab.get(), test_url,
|
| + "STARTUP_COOKIE", action_max_timeout_ms());
|
| +
|
| + // If this fails, the plugin couldn't be loaded in the given amount of
|
| + // time. This may mean the plugin was not found or possibly the system
|
| + // can't load it due to missing symbols, etc.
|
| + ASSERT_STREQ("STARTED", startup_cookie.c_str())
|
| + << "Plugin couldn't be loaded. Make sure the PPAPI test plugin is "
|
| + << "built, in the right place, and doesn't have any missing symbols.";
|
| +
|
| std::string escaped_value =
|
| WaitUntilCookieNonEmpty(tab.get(), test_url,
|
| - "COMPLETION_COOKIE", action_max_timeout_ms());
|
| + "COMPLETION_COOKIE", TestTimeouts::large_test_timeout_ms());
|
| EXPECT_STREQ("PASS", escaped_value.c_str());
|
| }
|
| };
|
|
|