Index: tools/telemetry/docs/telemetry.page.page_measurement.html |
diff --git a/tools/telemetry/docs/telemetry.page.page_measurement.html b/tools/telemetry/docs/telemetry.page.page_measurement.html |
index 8ca291a85bfd9316e5d744e30ac7fcfe96ff93ea..2260808e78aa62965e48dd885e047c31a141964e 100644 |
--- a/tools/telemetry/docs/telemetry.page.page_measurement.html |
+++ b/tools/telemetry/docs/telemetry.page.page_measurement.html |
@@ -19,14 +19,8 @@ |
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
-<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.page.block_page_measurement_results.html">telemetry.page.block_page_measurement_results</a><br> |
-<a href="telemetry.page.buildbot_page_measurement_results.html">telemetry.page.buildbot_page_measurement_results</a><br> |
-</td><td width="25%" valign=top><a href="telemetry.page.csv_page_measurement_results.html">telemetry.page.csv_page_measurement_results</a><br> |
-<a href="os.html">os</a><br> |
-</td><td width="25%" valign=top><a href="telemetry.page.page_measurement_results.html">telemetry.page.page_measurement_results</a><br> |
-<a href="telemetry.page.page_test.html">telemetry.page.page_test</a><br> |
-</td><td width="25%" valign=top><a href="sys.html">sys</a><br> |
-</td></tr></table></td></tr></table><p> |
+<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.page.page_test.html">telemetry.page.page_test</a><br> |
+</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> |
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
<tr bgcolor="#ee77aa"> |
<td colspan=3 valign=bottom> <br> |
@@ -40,7 +34,7 @@ |
<dt><font face="helvetica, arial"><a href="telemetry.page.page_measurement.html#MeasurementFailure">MeasurementFailure</a> |
</font></dt></dl> |
</dd> |
-<dt><font face="helvetica, arial"><a href="telemetry.page.page_test.html#PageTest">telemetry.page.page_test.PageTest</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
+<dt><font face="helvetica, arial"><a href="telemetry.page.page_test.html#PageTest">telemetry.page.page_test.PageTest</a>(<a href="telemetry.core.command_line.html#ArgumentHandlerMixIn">telemetry.core.command_line.ArgumentHandlerMixIn</a>) |
</font></dt><dd> |
<dl> |
<dt><font face="helvetica, arial"><a href="telemetry.page.page_measurement.html#PageMeasurement">PageMeasurement</a> |
@@ -133,7 +127,7 @@ example:<br> |
To add test-specific options:<br> |
<br> |
class BodyChildElementMeasurement(<a href="#PageMeasurement">PageMeasurement</a>):<br> |
- def <a href="#PageMeasurement-AddCommandLineOptions">AddCommandLineOptions</a>(parser):<br> |
+ def <a href="#PageMeasurement-AddCommandLineArgs">AddCommandLineArgs</a>(parser):<br> |
parser.add_option('--element', action='store', default='body')<br> |
<br> |
def <a href="#PageMeasurement-MeasurePage">MeasurePage</a>(self, page, tab, results):<br> |
@@ -144,12 +138,11 @@ To add test-specific options:<br> |
<td width="100%"><dl><dt>Method resolution order:</dt> |
<dd><a href="telemetry.page.page_measurement.html#PageMeasurement">PageMeasurement</a></dd> |
<dd><a href="telemetry.page.page_test.html#PageTest">telemetry.page.page_test.PageTest</a></dd> |
+<dd><a href="telemetry.core.command_line.html#ArgumentHandlerMixIn">telemetry.core.command_line.ArgumentHandlerMixIn</a></dd> |
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
</dl> |
<hr> |
Methods defined here:<br> |
-<dl><dt><a name="PageMeasurement-AddOutputOptions"><strong>AddOutputOptions</strong></a>(self, parser)</dt></dl> |
- |
<dl><dt><a name="PageMeasurement-MeasurePage"><strong>MeasurePage</strong></a>(self, page, tab, results)</dt><dd><tt>Override to actually measure the page's performance.<br> |
<br> |
page is a page_set.Page<br> |
@@ -170,14 +163,10 @@ Put together:<br> |
raise Exception('Oh, wow.')<br> |
results.Add('two_plus_two', 'count', res)</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-PrepareResults"><strong>PrepareResults</strong></a>(self, options)</dt></dl> |
- |
-<dl><dt><a name="PageMeasurement-__init__"><strong>__init__</strong></a>(self, action_name_to_run<font color="#909090">=''</font>, needs_browser_restart_after_each_run<font color="#909090">=False</font>, discard_first_result<font color="#909090">=False</font>, clear_cache_before_each_run<font color="#909090">=False</font>)</dt></dl> |
+<dl><dt><a name="PageMeasurement-__init__"><strong>__init__</strong></a>(self, action_name_to_run<font color="#909090">=''</font>, needs_browser_restart_after_each_page<font color="#909090">=False</font>, discard_first_result<font color="#909090">=False</font>, clear_cache_before_each_run<font color="#909090">=False</font>)</dt></dl> |
<hr> |
Data descriptors defined here:<br> |
-<dl><dt><strong>output_format_choices</strong></dt> |
-</dl> |
<dl><dt><strong>results_are_the_same_on_every_page</strong></dt> |
<dd><tt>By default, measurements are assumed to output the same values for every<br> |
page. This allows incremental output, for example in CSV. If, however, the<br> |
@@ -188,61 +177,135 @@ run.</tt></dd> |
</dl> |
<hr> |
Methods inherited from <a href="telemetry.page.page_test.html#PageTest">telemetry.page.page_test.PageTest</a>:<br> |
-<dl><dt><a name="PageMeasurement-AddCommandLineOptions"><strong>AddCommandLineOptions</strong></a>(self, parser)</dt><dd><tt>Override to expose command-line options for this test.<br> |
- <br> |
-The provided parser is an optparse.OptionParser instance and accepts all<br> |
-normal results. The parsed options are available in Run as<br> |
-self.<strong>options</strong>.</tt></dd></dl> |
- |
<dl><dt><a name="PageMeasurement-CanRunForPage"><strong>CanRunForPage</strong></a>(self, page)</dt><dd><tt>Override to customize if the test can be ran for the given page.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-CleanUpAfterPage"><strong>CleanUpAfterPage</strong></a>(self, page, tab)</dt><dd><tt>Called after the test run method was run, even if it failed.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-CreateExpectations"><strong>CreateExpectations</strong></a>(self, page_set)</dt><dd><tt>Override to make this test generate its own expectations instead of<br> |
+any that may have been defined in the page set.</tt></dd></dl> |
+ |
<dl><dt><a name="PageMeasurement-CreatePageSet"><strong>CreatePageSet</strong></a>(self, args, options)</dt><dd><tt>Override to make this test generate its own page set instead of<br> |
allowing arbitrary page sets entered from the command-line.</tt></dd></dl> |
<dl><dt><a name="PageMeasurement-CustomizeBrowserOptions"><strong>CustomizeBrowserOptions</strong></a>(self, options)</dt><dd><tt>Override to add test-specific options to the BrowserOptions object</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-CustomizeBrowserOptionsForPage"><strong>CustomizeBrowserOptionsForPage</strong></a>(self, page, options)</dt><dd><tt>Add options specific to the test and the given page.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-CustomizeBrowserOptionsForPageSet"><strong>CustomizeBrowserOptionsForPageSet</strong></a>(self, page_set, options)</dt><dd><tt>Set options required for this page set.<br> |
+ <br> |
+These options will be used every time the browser is started while running<br> |
+this page set. They may, however, be further modified by<br> |
+CustomizeBrowserOptionsForSinglePage or by the profiler.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-CustomizeBrowserOptionsForSinglePage"><strong>CustomizeBrowserOptionsForSinglePage</strong></a>(self, page, options)</dt><dd><tt>Set options specific to the test and the given page.<br> |
+ <br> |
+This will be called with the current page when the browser is (re)started.<br> |
+Changing options at this point only makes sense if the browser is being<br> |
+restarted for each page. Note that if page has a startup_url, the browser<br> |
+will always be restarted for each run.</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-DidNavigateToPage"><strong>DidNavigateToPage</strong></a>(self, page, tab)</dt><dd><tt>Override to do operations right after the page is navigated, but before<br> |
-any waiting for completion has occurred.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-DidNavigateToPage"><strong>DidNavigateToPage</strong></a>(self, page, tab)</dt><dd><tt>Override to do operations right after the page is navigated and after<br> |
+all waiting for completion has occurred.</tt></dd></dl> |
<dl><dt><a name="PageMeasurement-DidRunAction"><strong>DidRunAction</strong></a>(self, page, tab, action)</dt><dd><tt>Override to do operations after running the action on the page.</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-DidRunPageSet"><strong>DidRunPageSet</strong></a>(self, tab, results)</dt><dd><tt>Override to do operations after page set is completed, but before browser<br> |
-is torn down.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-DidRunActions"><strong>DidRunActions</strong></a>(self, page, tab)</dt><dd><tt>Override to do operations after running the actions on the page.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-DidRunPageRepeats"><strong>DidRunPageRepeats</strong></a>(self, page)</dt><dd><tt>Override to do operations after each page is iterated over.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-DidRunTest"><strong>DidRunTest</strong></a>(self, browser, results)</dt><dd><tt>Override to do operations after all page set(s) are completed.<br> |
+ <br> |
+This will occur before the browser is torn down.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-DidStartBrowser"><strong>DidStartBrowser</strong></a>(self, browser)</dt><dd><tt>Override to customize the browser right after it has launched.</tt></dd></dl> |
<dl><dt><a name="PageMeasurement-DidStartHTTPServer"><strong>DidStartHTTPServer</strong></a>(self, tab)</dt><dd><tt>Override to do operations after the HTTP server is started.</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-NeedsBrowserRestartAfterEachRun"><strong>NeedsBrowserRestartAfterEachRun</strong></a>(self, tab)</dt><dd><tt>Override to specify browser restart after each run.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-IsExiting"><strong>IsExiting</strong></a>(self)</dt></dl> |
+ |
+<dl><dt><a name="PageMeasurement-RequestExit"><strong>RequestExit</strong></a>(self)</dt></dl> |
+ |
+<dl><dt><a name="PageMeasurement-RestartBrowserBeforeEachPage"><strong>RestartBrowserBeforeEachPage</strong></a>(self)</dt><dd><tt>Should the browser be restarted for the page?<br> |
+ <br> |
+This returns true if the test needs to unconditionally restart the<br> |
+browser for each page. It may be called before the browser is started.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-Run"><strong>Run</strong></a>(self, page, tab, results)</dt></dl> |
-<dl><dt><a name="PageMeasurement-Run"><strong>Run</strong></a>(self, options, page, tab, results)</dt></dl> |
+<dl><dt><a name="PageMeasurement-RunNavigateSteps"><strong>RunNavigateSteps</strong></a>(self, page, tab)</dt><dd><tt>Navigates the tab to the page URL attribute.<br> |
+ <br> |
+Runs the 'navigate_steps' page attribute as a compound action.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-StopBrowserAfterPage"><strong>StopBrowserAfterPage</strong></a>(self, browser, page)</dt><dd><tt>Should the browser be stopped after the page is run?<br> |
+ <br> |
+This is called after a page is run to decide whether the browser needs to<br> |
+be stopped to clean up its state. If it is stopped, then it will be<br> |
+restarted to run the next page.<br> |
+ <br> |
+A test that overrides this can look at both the page and the browser to<br> |
+decide whether it needs to stop the browser.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-TabForPage"><strong>TabForPage</strong></a>(self, page, browser)</dt><dd><tt>Override to select a different tab for the page. For instance, to<br> |
+create a new tab for every page, return browser.tabs.New().</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-SetUpBrowser"><strong>SetUpBrowser</strong></a>(self, browser)</dt><dd><tt>Override to customize the browser right after it has launched.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-ValidatePageSet"><strong>ValidatePageSet</strong></a>(self, page_set)</dt><dd><tt>Override to examine the page set before the test run. Useful for<br> |
+example to validate that the pageset can be used with the test.</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-WillNavigateToPage"><strong>WillNavigateToPage</strong></a>(self, page, tab)</dt><dd><tt>Override to do operations before the page is navigated.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-WillNavigateToPage"><strong>WillNavigateToPage</strong></a>(self, page, tab)</dt><dd><tt>Override to do operations before the page is navigated, notably Telemetry<br> |
+will already have performed the following operations on the browser before<br> |
+calling this function:<br> |
+* Ensure only one tab is open.<br> |
+* Call WaitForDocumentReadyStateToComplete on the tab.</tt></dd></dl> |
<dl><dt><a name="PageMeasurement-WillRunAction"><strong>WillRunAction</strong></a>(self, page, tab, action)</dt><dd><tt>Override to do operations before running the action on the page.</tt></dd></dl> |
-<dl><dt><a name="PageMeasurement-WillRunPageSet"><strong>WillRunPageSet</strong></a>(self, tab)</dt><dd><tt>Override to do operations before the page set is navigated.</tt></dd></dl> |
+<dl><dt><a name="PageMeasurement-WillRunActions"><strong>WillRunActions</strong></a>(self, page, tab)</dt><dd><tt>Override to do operations before running the actions on the page.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-WillRunPageRepeats"><strong>WillRunPageRepeats</strong></a>(self, page)</dt><dd><tt>Override to do operations before each page is iterated over.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-WillRunTest"><strong>WillRunTest</strong></a>(self, options)</dt><dd><tt>Override to do operations before the page set(s) are navigated.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-WillStartBrowser"><strong>WillStartBrowser</strong></a>(self, browser)</dt><dd><tt>Override to manipulate the browser environment before it launches.</tt></dd></dl> |
<hr> |
Data descriptors inherited from <a href="telemetry.page.page_test.html#PageTest">telemetry.page.page_test.PageTest</a>:<br> |
-<dl><dt><strong>__dict__</strong></dt> |
-<dd><tt>dictionary for instance variables (if defined)</tt></dd> |
-</dl> |
-<dl><dt><strong>__weakref__</strong></dt> |
-<dd><tt>list of weak references to the object (if defined)</tt></dd> |
-</dl> |
<dl><dt><strong>action_name_to_run</strong></dt> |
</dl> |
+<dl><dt><strong>attempts</strong></dt> |
+<dd><tt>Maximum number of times test will be attempted.</tt></dd> |
+</dl> |
<dl><dt><strong>clear_cache_before_each_run</strong></dt> |
<dd><tt>When set to True, the browser's disk and memory cache will be cleared<br> |
before each run.</tt></dd> |
</dl> |
+<dl><dt><strong>close_tabs_before_run</strong></dt> |
+<dd><tt>When set to True, all tabs are closed before running the test for the<br> |
+first time.</tt></dd> |
+</dl> |
<dl><dt><strong>discard_first_result</strong></dt> |
<dd><tt>When set to True, the first run of the test is discarded. This is<br> |
useful for cases where it's desirable to have some test resource cached so<br> |
the first run of the test can warm things up.</tt></dd> |
</dl> |
+<dl><dt><strong>max_errors</strong></dt> |
+<dd><tt>Maximum number of errors allowed for the page set.</tt></dd> |
+</dl> |
+<dl><dt><strong>max_failures</strong></dt> |
+<dd><tt>Maximum number of failures allowed for the page set.</tt></dd> |
+</dl> |
+<hr> |
+Class methods inherited from <a href="telemetry.core.command_line.html#ArgumentHandlerMixIn">telemetry.core.command_line.ArgumentHandlerMixIn</a>:<br> |
+<dl><dt><a name="PageMeasurement-AddCommandLineArgs"><strong>AddCommandLineArgs</strong></a>(cls, parser)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Override to accept custom command-line arguments.</tt></dd></dl> |
+ |
+<dl><dt><a name="PageMeasurement-ProcessCommandLineArgs"><strong>ProcessCommandLineArgs</strong></a>(cls, parser, args)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Override to process command-line arguments.<br> |
+ <br> |
+We pass in parser so we can call parser.error().</tt></dd></dl> |
+ |
+<hr> |
+Data descriptors inherited from <a href="telemetry.core.command_line.html#ArgumentHandlerMixIn">telemetry.core.command_line.ArgumentHandlerMixIn</a>:<br> |
+<dl><dt><strong>__dict__</strong></dt> |
+<dd><tt>dictionary for instance variables (if defined)</tt></dd> |
+</dl> |
+<dl><dt><strong>__weakref__</strong></dt> |
+<dd><tt>list of weak references to the object (if defined)</tt></dd> |
+</dl> |
</td></tr></table></td></tr></table> |
</body></html> |