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

Unified Diff: ppapi/tests/testing_instance.h

Issue 9646027: Switch PPAPITests to run in browser_tests instead of ui_tests. The former is sharded and so tests r… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix race condition where we might miss the first notification Created 8 years, 9 months 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 | « ppapi/tests/test_view.cc ('k') | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/testing_instance.h
===================================================================
--- ppapi/tests/testing_instance.h (revision 126008)
+++ ppapi/tests/testing_instance.h (working copy)
@@ -19,20 +19,19 @@
// How signaling works:
//
-// We want to signal to the Chrome UI test harness
+// We want to signal to the Chrome browser test harness
// (chrome/test/ui/ppapi_uitest.cc) that we're making progress and when we're
-// done. The easiest thing in the UI test infrastructure is to wait for a
-// cookie to become nonempty. We don't want to have a big wait for all tests in
-// a TestCase since they can take a while and it might timeout. So we set a
-// series of cookies with an incrementing number in the name.
+// done. This is done using the DOM controlller. The browser test waits for a
+// message from it. We don't want to have a big wait for all tests in a TestCase
+// since they can take a while and it might timeout. So we send it pings
+// between each test to tell it that we're still running tests and aren't stuck.
//
-// If the value of the cookie is "..." then that tells the test runner that
-// the test is progressing. It then waits for the next numbered cookie until
-// it either times out or the value is something other than "...". In this
-// case, the value will be either "PASS" or "FAIL [optional message]"
-// corresponding to the outcome of the entire test case. Timeout will be
-// treated just like a failure of the entire test case and the test will be
-// terminated.
+// If the value of the message is "..." then that tells the test runner that
+// the test is progressing. It then waits for the next message until it either
+// times out or the value is something other than "...". In this case, the value
+// will be either "PASS" or "FAIL [optional message]" corresponding to the
+// outcome of the entire test case. Timeout will be treated just like a failure
+// of the entire test case and the test will be terminated.
//
// In trusted builds, we use InstancePrivate and allow tests that use
// synchronous scripting. NaCl does not support synchronous scripting.
@@ -89,6 +88,8 @@
// Sets the given cookie in the current document.
void SetCookie(const std::string& name, const std::string& value);
+ void ReportProgress(const std::string& progress_value);
+
private:
void ExecuteTests(int32_t unused);
@@ -115,8 +116,6 @@
// Appends the given HTML string to the console in the document.
void LogHTML(const std::string& html);
- void ReportProgress(const std::string& progress_value);
-
pp::CompletionCallbackFactory<TestingInstance> callback_factory_;
// Owning pointer to the current test case. Valid after Init has been called.
@@ -126,10 +125,6 @@
// runs only tests whose name contains test_filter_ as a substring.
std::string test_filter_;
- // The current step we're on starting at 0. This is incremented every time we
- // report progress via a cookie. See comment above the class.
- int progress_cookie_number_;
-
// Set once the tests are run so we know not to re-run when the view is sized.
bool executed_tests_;
« no previous file with comments | « ppapi/tests/test_view.cc ('k') | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698