Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: chrome/test/ui/ppapi_uitest.cc

Issue 5743002: Add a separate cookie for the start of a PPAPI test to help reduce test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
};
« no previous file with comments | « no previous file | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698