Index: tools/telemetry/docs/telemetry.html |
diff --git a/tools/telemetry/docs/telemetry.html b/tools/telemetry/docs/telemetry.html |
index 5b75b23a945949ea92e62138464739fd47be6e05..42cc1119f6f45e8dc9e082b443a331d068d30457 100644 |
--- a/tools/telemetry/docs/telemetry.html |
+++ b/tools/telemetry/docs/telemetry.html |
@@ -18,11 +18,16 @@ |
<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.core.html"><strong>core</strong> (package)</a><br> |
-<a href="telemetry.page.html"><strong>page</strong> (package)</a><br> |
-</td><td width="25%" valign=top><a href="telemetry.test.html">test</a><br> |
+<a href="telemetry.decorators.html">decorators</a><br> |
+<a href="telemetry.exception_formatter.html">exception_formatter</a><br> |
+</td><td width="25%" valign=top><a href="telemetry.page.html"><strong>page</strong> (package)</a><br> |
+<a href="telemetry.test.html">test</a><br> |
<a href="telemetry.test_runner.html">test_runner</a><br> |
</td><td width="25%" valign=top><a href="telemetry.unittest.html"><strong>unittest</strong> (package)</a><br> |
-</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> |
+<a href="telemetry.util.html"><strong>util</strong> (package)</a><br> |
+<a href="telemetry.value.html"><strong>value</strong> (package)</a><br> |
+</td><td width="25%" valign=top><a href="telemetry.web_components.html"><strong>web_components</strong> (package)</a><br> |
+</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> |
@@ -39,7 +44,7 @@ |
<dt><font face="helvetica, arial"><a href="optparse.html#Values">optparse.Values</a> |
</font></dt><dd> |
<dl> |
-<dt><font face="helvetica, arial"><a href="telemetry.core.browser_options.html#BrowserOptions">telemetry.core.browser_options.BrowserOptions</a> |
+<dt><font face="helvetica, arial"><a href="telemetry.core.browser_options.html#BrowserFinderOptions">telemetry.core.browser_options.BrowserFinderOptions</a> |
</font></dt></dl> |
</dd> |
<dt><font face="helvetica, arial"><a href="telemetry.core.web_contents.html#WebContents">telemetry.core.web_contents.WebContents</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
@@ -48,7 +53,7 @@ |
<dt><font face="helvetica, arial"><a href="telemetry.core.tab.html#Tab">telemetry.core.tab.Tab</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">telemetry.page.page_measurement.PageMeasurement</a> |
@@ -79,20 +84,31 @@ the browser. Or better yet:<br> |
<dl><dt><a name="Browser-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> |
-<dl><dt><a name="Browser-GetTraceResultAndReset"><strong>GetTraceResultAndReset</strong></a>(self)</dt><dd><tt>Returns the result of the trace, as TraceResult <a href="__builtin__.html#object">object</a>.</tt></dd></dl> |
+<dl><dt><a name="Browser-GetSystemInfo"><strong>GetSystemInfo</strong></a>(self)</dt><dd><tt>Returns low-level information about the system, if available.<br> |
+ <br> |
+See the documentation of the SystemInfo class for more details.</tt></dd></dl> |
<dl><dt><a name="Browser-SetHTTPServerDirectories"><strong>SetHTTPServerDirectories</strong></a>(self, paths)</dt><dd><tt>Returns True if the HTTP server was started, False otherwise.</tt></dd></dl> |
<dl><dt><a name="Browser-SetReplayArchivePath"><strong>SetReplayArchivePath</strong></a>(self, archive_path, append_to_existing_wpr<font color="#909090">=False</font>, make_javascript_deterministic<font color="#909090">=True</font>)</dt></dl> |
-<dl><dt><a name="Browser-StartProfiling"><strong>StartProfiling</strong></a>(self, options, base_output_file)</dt><dd><tt>Starts profiling using |options|.profiler_tool. Results are saved to<br> |
+<dl><dt><a name="Browser-Start"><strong>Start</strong></a>(self)</dt></dl> |
+ |
+<dl><dt><a name="Browser-StartLocalServer"><strong>StartLocalServer</strong></a>(self, server)</dt><dd><tt>Starts a LocalServer and associates it with this browser.<br> |
+ <br> |
+It will be closed when the browser closes.</tt></dd></dl> |
+ |
+<dl><dt><a name="Browser-StartProfiling"><strong>StartProfiling</strong></a>(self, profiler_name, base_output_file)</dt><dd><tt>Starts profiling using |profiler_name|. Results are saved to<br> |
|base_output_file|.<process_name>.</tt></dd></dl> |
<dl><dt><a name="Browser-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>, timeout<font color="#909090">=10</font>)</dt></dl> |
-<dl><dt><a name="Browser-StopProfiling"><strong>StopProfiling</strong></a>(self)</dt><dd><tt>Stops all active profilers and saves their results.</tt></dd></dl> |
+<dl><dt><a name="Browser-StopProfiling"><strong>StopProfiling</strong></a>(self)</dt><dd><tt>Stops all active profilers and saves their results.<br> |
+ <br> |
+Returns:<br> |
+ A list of filenames produced by the profiler.</tt></dd></dl> |
-<dl><dt><a name="Browser-StopTracing"><strong>StopTracing</strong></a>(self)</dt></dl> |
+<dl><dt><a name="Browser-StopTracing"><strong>StopTracing</strong></a>(self)</dt><dd><tt>Stops tracing and returns the result as TimelineData <a href="__builtin__.html#object">object</a>.</tt></dd></dl> |
<dl><dt><a name="Browser-__enter__"><strong>__enter__</strong></a>(self)</dt></dl> |
@@ -112,8 +128,26 @@ Data descriptors defined here:<br> |
</dl> |
<dl><dt><strong>browser_type</strong></dt> |
</dl> |
+<dl><dt><strong>cpu_stats</strong></dt> |
+<dd><tt>Returns a dict of cpu statistics for the system.<br> |
+{ 'Browser': {<br> |
+ 'CpuProcessTime': S,<br> |
+ 'TotalTime': T<br> |
+ },<br> |
+ 'Gpu': {<br> |
+ 'CpuProcessTime': S,<br> |
+ 'TotalTime': T<br> |
+ },<br> |
+ 'Renderer': {<br> |
+ 'CpuProcessTime': S,<br> |
+ 'TotalTime': T<br> |
+ }<br> |
+}<br> |
+Any of the above keys may be missing on a per-platform basis.</tt></dd> |
+</dl> |
<dl><dt><strong>extensions</strong></dt> |
-<dd><tt>Returns the extension dictionary if it exists.</tt></dd> |
+</dl> |
+<dl><dt><strong>foreground_tab</strong></dt> |
</dl> |
<dl><dt><strong>http_server</strong></dt> |
</dl> |
@@ -142,33 +176,39 @@ Data descriptors defined here:<br> |
<dl><dt><strong>is_content_shell</strong></dt> |
<dd><tt>Returns whether this browser is a content shell, only.</tt></dd> |
</dl> |
+<dl><dt><strong>is_tracing_running</strong></dt> |
+</dl> |
+<dl><dt><strong>local_servers</strong></dt> |
+<dd><tt>Returns the currently running local servers.</tt></dd> |
+</dl> |
<dl><dt><strong>memory_stats</strong></dt> |
<dd><tt>Returns a dict of memory statistics for the browser:<br> |
{ 'Browser': {<br> |
- 'VM': S,<br> |
- 'VMPeak': T,<br> |
- 'WorkingSetSize': U,<br> |
- 'WorkingSetSizePeak': V,<br> |
- 'ProportionalSetSize': W,<br> |
- 'PrivateDirty': X<br> |
+ 'VM': R,<br> |
+ 'VMPeak': S,<br> |
+ 'WorkingSetSize': T,<br> |
+ 'WorkingSetSizePeak': U,<br> |
+ 'ProportionalSetSize': V,<br> |
+ 'PrivateDirty': W<br> |
},<br> |
'Gpu': {<br> |
- 'VM': S,<br> |
- 'VMPeak': T,<br> |
- 'WorkingSetSize': U,<br> |
- 'WorkingSetSizePeak': V,<br> |
- 'ProportionalSetSize': W,<br> |
- 'PrivateDirty': X<br> |
+ 'VM': R,<br> |
+ 'VMPeak': S,<br> |
+ 'WorkingSetSize': T,<br> |
+ 'WorkingSetSizePeak': U,<br> |
+ 'ProportionalSetSize': V,<br> |
+ 'PrivateDirty': W<br> |
},<br> |
'Renderer': {<br> |
- 'VM': S,<br> |
- 'VMPeak': T,<br> |
- 'WorkingSetSize': U,<br> |
- 'WorkingSetSizePeak': V,<br> |
- 'ProportionalSetSize': W,<br> |
- 'PrivateDirty': X<br> |
+ 'VM': R,<br> |
+ 'VMPeak': S,<br> |
+ 'WorkingSetSize': T,<br> |
+ 'WorkingSetSizePeak': U,<br> |
+ 'ProportionalSetSize': V,<br> |
+ 'PrivateDirty': W<br> |
},<br> |
- 'SystemCommitCharge': Y,<br> |
+ 'SystemCommitCharge': X,<br> |
+ 'SystemTotalPhysicalMemory': Y,<br> |
'ProcessCount': Z,<br> |
}<br> |
Any of the above keys may be missing on a per-platform basis.</tt></dd> |
@@ -177,43 +217,49 @@ Any of the above keys may be missing on& |
</dl> |
<dl><dt><strong>supports_extensions</strong></dt> |
</dl> |
+<dl><dt><strong>supports_system_info</strong></dt> |
+</dl> |
<dl><dt><strong>supports_tab_control</strong></dt> |
</dl> |
<dl><dt><strong>supports_tracing</strong></dt> |
</dl> |
+<dl><dt><strong>synthetic_gesture_source_type</strong></dt> |
+</dl> |
<dl><dt><strong>tabs</strong></dt> |
</dl> |
</td></tr></table> <p> |
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
<tr bgcolor="#ffc8d8"> |
<td colspan=3 valign=bottom> <br> |
-<font color="#000000" face="helvetica, arial"><a name="BrowserOptions">class <strong>BrowserOptions</strong></a>(<a href="optparse.html#Values">optparse.Values</a>)</font></td></tr> |
+<font color="#000000" face="helvetica, arial"><a name="BrowserFinderOptions">class <strong>BrowserFinderOptions</strong></a>(<a href="optparse.html#Values">optparse.Values</a>)</font></td></tr> |
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
-<td colspan=2><tt>Options to be used for discovering and launching a browser.<br> </tt></td></tr> |
+<td colspan=2><tt>Options to be used for discovering a browser.<br> </tt></td></tr> |
<tr><td> </td> |
<td width="100%">Methods defined here:<br> |
-<dl><dt><a name="BrowserOptions-AppendExtraBrowserArg"><strong>AppendExtraBrowserArg</strong></a>(self, arg)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-AppendExtraBrowserArgs"><strong>AppendExtraBrowserArgs</strong></a>(self, args)</dt></dl> |
+ |
+<dl><dt><a name="BrowserFinderOptions-Copy"><strong>Copy</strong></a>(self)</dt></dl> |
-<dl><dt><a name="BrowserOptions-Copy"><strong>Copy</strong></a>(self)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-CreateParser"><strong>CreateParser</strong></a>(self, *args, **kwargs)</dt></dl> |
-<dl><dt><a name="BrowserOptions-CreateParser"><strong>CreateParser</strong></a>(self, *args, **kwargs)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-MergeDefaultValues"><strong>MergeDefaultValues</strong></a>(self, defaults)</dt></dl> |
-<dl><dt><a name="BrowserOptions-__init__"><strong>__init__</strong></a>(self, browser_type<font color="#909090">=None</font>)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-__init__"><strong>__init__</strong></a>(self, browser_type<font color="#909090">=None</font>)</dt></dl> |
<hr> |
Methods inherited from <a href="optparse.html#Values">optparse.Values</a>:<br> |
-<dl><dt><a name="BrowserOptions-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt></dl> |
-<dl><dt><a name="BrowserOptions-__repr__"><strong>__repr__</strong></a> = _repr(self)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-__repr__"><strong>__repr__</strong></a> = _repr(self)</dt></dl> |
-<dl><dt><a name="BrowserOptions-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
-<dl><dt><a name="BrowserOptions-ensure_value"><strong>ensure_value</strong></a>(self, attr, value)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-ensure_value"><strong>ensure_value</strong></a>(self, attr, value)</dt></dl> |
-<dl><dt><a name="BrowserOptions-read_file"><strong>read_file</strong></a>(self, filename, mode<font color="#909090">='careful'</font>)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-read_file"><strong>read_file</strong></a>(self, filename, mode<font color="#909090">='careful'</font>)</dt></dl> |
-<dl><dt><a name="BrowserOptions-read_module"><strong>read_module</strong></a>(self, modname, mode<font color="#909090">='careful'</font>)</dt></dl> |
+<dl><dt><a name="BrowserFinderOptions-read_module"><strong>read_module</strong></a>(self, modname, mode<font color="#909090">='careful'</font>)</dt></dl> |
</td></tr></table> <p> |
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
@@ -239,7 +285,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> |
@@ -250,12 +296,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> |
@@ -276,14 +321,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> |
@@ -294,62 +335,136 @@ 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 <a href="#BrowserOptions">BrowserOptions</a> <a href="__builtin__.html#object">object</a></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 <a href="__builtin__.html#object">object</a></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-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-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 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-Run"><strong>Run</strong></a>(self, options, page, tab, results)</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-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-Run"><strong>Run</strong></a>(self, page, tab, results)</dt></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-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-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, 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> <p> |
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
<tr bgcolor="#ffc8d8"> |
@@ -384,12 +499,24 @@ and the page's documentVisibilityState becoming 'visibl |
delay until the actual tab is visible to the user. None of these delays<br> |
are included in this call.</tt></dd></dl> |
-<dl><dt><a name="Tab-ClearCache"><strong>ClearCache</strong></a>(self)</dt><dd><tt>Clears the browser's HTTP disk cache and the tab's HTTP memory cache.</tt></dd></dl> |
+<dl><dt><a name="Tab-ClearCache"><strong>ClearCache</strong></a>(self, force)</dt><dd><tt>Clears the browser's networking related disk, memory and other caches.<br> |
+ <br> |
+Args:<br> |
+ force: Iff true, navigates to about:blank which destroys the previous<br> |
+ renderer, ensuring that even "live" resources in the memory cache are<br> |
+ cleared.</tt></dd></dl> |
+ |
+<dl><dt><a name="Tab-ClearHighlight"><strong>ClearHighlight</strong></a>(self, color)</dt><dd><tt>Clears a highlight of the given bitmap.RgbaColor.</tt></dd></dl> |
<dl><dt><a name="Tab-CollectGarbage"><strong>CollectGarbage</strong></a>(self)</dt></dl> |
<dl><dt><a name="Tab-GetCookieByName"><strong>GetCookieByName</strong></a>(self, name, timeout<font color="#909090">=60</font>)</dt><dd><tt>Returns the value of the cookie by the given |name|.</tt></dd></dl> |
+<dl><dt><a name="Tab-Highlight"><strong>Highlight</strong></a>(self, color)</dt><dd><tt>Synchronously highlights entire tab contents with the given RgbaColor.<br> |
+ <br> |
+TODO(tonyg): It is possible that the z-index hack here might not work for<br> |
+all pages. If this happens, DevTools also provides a method for this.</tt></dd></dl> |
+ |
<dl><dt><a name="Tab-Navigate"><strong>Navigate</strong></a>(self, url, script_to_evaluate_on_commit<font color="#909090">=None</font>, timeout<font color="#909090">=60</font>)</dt><dd><tt>Navigates to url.<br> |
<br> |
If |script_to_evaluate_on_commit| is given, the script source string will be<br> |
@@ -402,9 +529,32 @@ action_function must be a Python function that&nbs |
This function returns when the navigation is complete or when<br> |
the timeout has been exceeded.</tt></dd></dl> |
-<dl><dt><a name="Tab-Screenshot"><strong>Screenshot</strong></a>(self, timeout<font color="#909090">=60</font>)</dt><dd><tt>Capture a screenshot of the window for rendering validation</tt></dd></dl> |
+<dl><dt><a name="Tab-Screenshot"><strong>Screenshot</strong></a>(self, timeout<font color="#909090">=60</font>)</dt><dd><tt>Capture a screenshot of the tab's contents.<br> |
+ <br> |
+Returns:<br> |
+ A telemetry.core.Bitmap.</tt></dd></dl> |
-<dl><dt><a name="Tab-__del__"><strong>__del__</strong></a>(self)</dt></dl> |
+<dl><dt><a name="Tab-StartVideoCapture"><strong>StartVideoCapture</strong></a>(self, min_bitrate_mbps)</dt><dd><tt>Starts capturing video of the tab's contents.<br> |
+ <br> |
+This works by flashing the entire tab contents to a arbitrary color and then<br> |
+starting video recording. When the frames are processed, we can look for<br> |
+that flash as the content bounds.<br> |
+ <br> |
+Args:<br> |
+ min_bitrate_mbps: The minimum caputre bitrate in MegaBits Per Second.<br> |
+ The platform is free to deliver a higher bitrate if it can do so<br> |
+ without increasing overhead.</tt></dd></dl> |
+ |
+<dl><dt><a name="Tab-StopVideoCapture"><strong>StopVideoCapture</strong></a>(self)</dt><dd><tt>Stops recording video of the tab's contents.<br> |
+ <br> |
+This looks for the initial color flash in the first frame to establish the<br> |
+tab content boundaries and then omits all frames displaying the flash.<br> |
+ <br> |
+Yields:<br> |
+ (time_ms, bitmap) tuples representing each video keyframe. Only the first<br> |
+ frame in a run of sequential duplicate bitmaps is typically included.<br> |
+ time_ms is milliseconds since navigationStart.<br> |
+ bitmap is a telemetry.core.Bitmap.</tt></dd></dl> |
<dl><dt><a name="Tab-__init__"><strong>__init__</strong></a>(self, inspector_backend)</dt></dl> |
@@ -423,11 +573,16 @@ Currently this dictionary contains:<br> |
'event_listener_count': integer<br> |
}</tt></dd> |
</dl> |
+<dl><dt><strong>is_video_capture_running</strong></dt> |
+</dl> |
<dl><dt><strong>screenshot_supported</strong></dt> |
-<dd><tt>True if the browser instance is capable of capturing screenshots</tt></dd> |
+<dd><tt>True if the browser instance is capable of capturing screenshots.</tt></dd> |
</dl> |
<dl><dt><strong>url</strong></dt> |
</dl> |
+<dl><dt><strong>video_capture_supported</strong></dt> |
+<dd><tt>True if the browser instance is capable of capturing video.</tt></dd> |
+</dl> |
<hr> |
Methods inherited from <a href="telemetry.core.web_contents.html#WebContents">telemetry.core.web_contents.WebContents</a>:<br> |
<dl><dt><a name="Tab-Close"><strong>Close</strong></a>(self)</dt><dd><tt>Closes this page.<br> |
@@ -435,9 +590,7 @@ Methods inherited from <a href="telemetry.core.web_contents.html#WebContents">te |
Not all browsers or browser versions support this method.<br> |
Be sure to check browser.supports_tab_control.</tt></dd></dl> |
-<dl><dt><a name="Tab-Disconnect"><strong>Disconnect</strong></a>(self)</dt></dl> |
- |
-<dl><dt><a name="Tab-EvaluateJavaScript"><strong>EvaluateJavaScript</strong></a>(self, expr, timeout<font color="#909090">=60</font>)</dt><dd><tt>Evalutes expr in JavaScript and returns the JSONized result.<br> |
+<dl><dt><a name="Tab-EvaluateJavaScript"><strong>EvaluateJavaScript</strong></a>(self, expr, timeout<font color="#909090">=90</font>)</dt><dd><tt>Evalutes expr in JavaScript and returns the JSONized result.<br> |
<br> |
Consider using ExecuteJavaScript for cases where the result of the<br> |
expression is not needed.<br> |
@@ -448,17 +601,35 @@ be raised.<br> |
If the result of the evaluation cannot be JSONized, then an<br> |
EvaluationException will be raised.</tt></dd></dl> |
-<dl><dt><a name="Tab-ExecuteJavaScript"><strong>ExecuteJavaScript</strong></a>(self, expr, timeout<font color="#909090">=60</font>)</dt><dd><tt>Executes expr in JavaScript. Does not return the result.<br> |
+<dl><dt><a name="Tab-EvaluateJavaScriptInContext"><strong>EvaluateJavaScriptInContext</strong></a>(self, expr, context_id, timeout<font color="#909090">=90</font>)</dt><dd><tt>Similar to ExecuteJavaScript, except context_id can refer to an iframe.<br> |
+The main page has context_id=1, the first iframe context_id=2, etc.</tt></dd></dl> |
+ |
+<dl><dt><a name="Tab-ExecuteJavaScript"><strong>ExecuteJavaScript</strong></a>(self, expr, timeout<font color="#909090">=90</font>)</dt><dd><tt>Executes expr in JavaScript. Does not return the result.<br> |
<br> |
If the expression failed to evaluate, EvaluateException will be raised.</tt></dd></dl> |
-<dl><dt><a name="Tab-StartTimelineRecording"><strong>StartTimelineRecording</strong></a>(self)</dt></dl> |
+<dl><dt><a name="Tab-ExecuteJavaScriptInContext"><strong>ExecuteJavaScriptInContext</strong></a>(self, expr, context_id, timeout<font color="#909090">=90</font>)</dt><dd><tt>Similar to ExecuteJavaScript, except context_id can refer to an iframe.<br> |
+The main page has context_id=1, the first iframe context_id=2, etc.</tt></dd></dl> |
+ |
+<dl><dt><a name="Tab-HasReachedQuiescence"><strong>HasReachedQuiescence</strong></a>(self)</dt><dd><tt>Determine whether the page has reached quiescence after loading.<br> |
+ <br> |
+Returns:<br> |
+ True if 2 seconds have passed since last resource received, false<br> |
+ otherwise.</tt></dd></dl> |
+ |
+<dl><dt><a name="Tab-StartTimelineRecording"><strong>StartTimelineRecording</strong></a>(self, options<font color="#909090">=None</font>)</dt></dl> |
<dl><dt><a name="Tab-StopTimelineRecording"><strong>StopTimelineRecording</strong></a>(self)</dt></dl> |
-<dl><dt><a name="Tab-WaitForDocumentReadyStateToBeComplete"><strong>WaitForDocumentReadyStateToBeComplete</strong></a>(self, timeout<font color="#909090">=60</font>)</dt></dl> |
+<dl><dt><a name="Tab-TakeJSHeapSnapshot"><strong>TakeJSHeapSnapshot</strong></a>(self, timeout<font color="#909090">=120</font>)</dt></dl> |
+ |
+<dl><dt><a name="Tab-WaitForDocumentReadyStateToBeComplete"><strong>WaitForDocumentReadyStateToBeComplete</strong></a>(self, timeout<font color="#909090">=90</font>)</dt></dl> |
-<dl><dt><a name="Tab-WaitForDocumentReadyStateToBeInteractiveOrBetter"><strong>WaitForDocumentReadyStateToBeInteractiveOrBetter</strong></a>(self, timeout<font color="#909090">=60</font>)</dt></dl> |
+<dl><dt><a name="Tab-WaitForDocumentReadyStateToBeInteractiveOrBetter"><strong>WaitForDocumentReadyStateToBeInteractiveOrBetter</strong></a>(self, timeout<font color="#909090">=90</font>)</dt></dl> |
+ |
+<dl><dt><a name="Tab-WaitForJavaScriptExpression"><strong>WaitForJavaScriptExpression</strong></a>(self, expr, timeout)</dt><dd><tt>Waits for the given JavaScript expression to be True.<br> |
+ <br> |
+This method is robust against any given Evaluation timing out.</tt></dd></dl> |
<hr> |
Data descriptors inherited from <a href="telemetry.core.web_contents.html#WebContents">telemetry.core.web_contents.WebContents</a>:<br> |
@@ -468,6 +639,8 @@ Data descriptors inherited from <a href="telemetry.core.web_contents.html#WebCon |
<dl><dt><strong>__weakref__</strong></dt> |
<dd><tt>list of weak references to the object (if defined)</tt></dd> |
</dl> |
+<dl><dt><strong>is_timeline_recording_running</strong></dt> |
+</dl> |
<dl><dt><strong>message_output_stream</strong></dt> |
</dl> |
<dl><dt><strong>timeline_model</strong></dt> |
@@ -479,7 +652,7 @@ Data descriptors inherited from <a href="telemetry.core.web_contents.html#WebCon |
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> |
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> |
-<td width="100%"><dl><dt><a name="-RunPage"><strong>RunPage</strong></a> = Run(test, page_set, options)</dt><dd><tt>Runs a given test against a given page_set with the given options.</tt></dd></dl> |
+<td width="100%"><dl><dt><a name="-RunPage"><strong>RunPage</strong></a> = Run(test, page_set, expectations, finder_options)</dt><dd><tt>Runs a given test against a given page_set with the given options.</tt></dd></dl> |
</td></tr></table><p> |
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
<tr bgcolor="#55aa55"> |
@@ -487,5 +660,5 @@ Data descriptors inherited from <a href="telemetry.core.web_contents.html#WebCon |
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
-<td width="100%"><strong>__all__</strong> = ['Browser', 'BrowserOptions', 'PageMeasurement', 'RunPage', 'Tab']</td></tr></table> |
+<td width="100%"><strong>__all__</strong> = ['Browser', 'BrowserFinderOptions', 'PageMeasurement', 'RunPage', 'Tab']</td></tr></table> |
</body></html> |