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

Unified Diff: ppapi/tests/testing_instance.h

Issue 7677031: Try to reduce the flankness of the PPAPI UI tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
Index: ppapi/tests/testing_instance.h
===================================================================
--- ppapi/tests/testing_instance.h (revision 97356)
+++ ppapi/tests/testing_instance.h (working copy)
@@ -17,6 +17,20 @@
class TestCase;
+// How signaling works:
+//
+// We want to signal to the Chrome UI test hardness that we're making progress
polina 2011/08/22 23:53:58 a file path could be useful here
+// 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.
polina 2011/08/22 23:53:58 please add something like "per every test run with
+//
+// 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
polina 2011/08/22 23:53:58 TestCase is progressing
+// it either times out or the value is something other than "...". In this
polina 2011/08/22 23:53:58 Just to confirm, by sending more messages more oft
+// case, the value will be either "PASS" or "FAIL [optional message]".
polina 2011/08/22 23:53:58 please add something like "corresponding to the ou
+//
+//
// In trusted builds, we use InstancePrivate and allow tests that use
// synchronous scripting. NaCl does not support synchronous scripting.
class TestingInstance : public
@@ -81,6 +95,8 @@
// Appends the given HTML string to the console in the document.
void LogHTML(const std::string& html);
+ void ReportProgress(const std::string& progress_value);
+
// Sets the given cookie in the current document.
void SetCookie(const std::string& name, const std::string& value);
@@ -89,6 +105,10 @@
// Owning pointer to the current test case. Valid after Init has been called.
TestCase* current_case_;
+ // 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_number_;
polina 2011/08/22 23:53:58 progress_cookie_number_?
+
// Set once the tests are run so we know not to re-run when the view is sized.
bool executed_tests_;

Powered by Google App Engine
This is Rietveld 408576698