| OLD | NEW |
| (Empty) | |
| 1 |
| 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 <html><head><title>Python: module telemetry.page.page_test</title> |
| 4 </head><body bgcolor="#f0f0f8"> |
| 5 |
| 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| 7 <tr bgcolor="#7799ee"> |
| 8 <td valign=bottom> <br> |
| 9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.page.html"><font color="#ffffff">page</font></a>.page_test</strong></big></big>
</font></td |
| 10 ><td align=right valign=bottom |
| 11 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href=
"file:/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/page/page_test.py"
>/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/page/page_test.py</a></
font></td></tr></table> |
| 12 <p><tt># Copyright (c) 2012 The Chromium Autho
rs. All rights reserved.<br> |
| 13 # Use of this source code is governed by
a BSD-style license that can be<br> |
| 14 # found in the LICENSE file.</tt></p> |
| 15 <p> |
| 16 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 17 <tr bgcolor="#aa55cc"> |
| 18 <td colspan=3 valign=bottom> <br> |
| 19 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big
></font></td></tr> |
| 20 |
| 21 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td>
</td> |
| 22 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=t
op><a href="telemetry.page.actions.all_page_actions.html">telemetry.page.actions
.all_page_actions</a><br> |
| 23 <a href="telemetry.page.gtest_test_results.html">telemetry.page.gtest_test_resul
ts</a><br> |
| 24 </td><td width="25%" valign=top><a href="logging.html">logging</a><br> |
| 25 <a href="telemetry.page.actions.page_action.html">telemetry.page.actions.page_ac
tion</a><br> |
| 26 </td><td width="25%" valign=top><a href="telemetry.page.page_test_results.html">
telemetry.page.page_test_results</a><br> |
| 27 <a href="telemetry.core.util.html">telemetry.core.util</a><br> |
| 28 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> |
| 29 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 30 <tr bgcolor="#ee77aa"> |
| 31 <td colspan=3 valign=bottom> <br> |
| 32 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> |
| 33 |
| 34 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> |
| 35 <td width="100%"><dl> |
| 36 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.
object</a> |
| 37 </font></dt><dd> |
| 38 <dl> |
| 39 <dt><font face="helvetica, arial"><a href="telemetry.page.page_test.html#PageTes
t">PageTest</a> |
| 40 </font></dt></dl> |
| 41 </dd> |
| 42 <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions
.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException<
/a>) |
| 43 </font></dt><dd> |
| 44 <dl> |
| 45 <dt><font face="helvetica, arial"><a href="telemetry.page.page_test.html#Failure
">Failure</a> |
| 46 </font></dt></dl> |
| 47 </dd> |
| 48 </dl> |
| 49 <p> |
| 50 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 51 <tr bgcolor="#ffc8d8"> |
| 52 <td colspan=3 valign=bottom> <br> |
| 53 <font color="#000000" face="helvetica, arial"><a name="Failure">class <strong>Fa
ilure</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
</font></td></tr> |
| 54 |
| 55 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 56 <td colspan=2><tt><a href="exceptions.html#Exception">Exception</a> that&nb
sp;can be thrown from PageMeasurement to indicate&
nbsp;an<br> |
| 57 undesired but designed-for problem.<br> </tt></td></tr> |
| 58 <tr><td> </td> |
| 59 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 60 <dd><a href="telemetry.page.page_test.html#Failure">Failure</a></dd> |
| 61 <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 62 <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 63 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 64 </dl> |
| 65 <hr> |
| 66 Data descriptors defined here:<br> |
| 67 <dl><dt><strong>__weakref__</strong></dt> |
| 68 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 69 </dl> |
| 70 <hr> |
| 71 Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception<
/a>:<br> |
| 72 <dl><dt><a name="Failure-__init__"><strong>__init__</strong></a>(...)</dt><dd><t
t>x.<a href="#Failure-__init__">__init__</a>(...) initializes x;
see help(type(x)) for signature</tt></dd></dl> |
| 73 |
| 74 <hr> |
| 75 Data and other attributes inherited from <a href="exceptions.html#Exception">exc
eptions.Exception</a>:<br> |
| 76 <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object>
;<dd><tt>T.<a href="#Failure-__new__">__new__</a>(S, ...) -> a
new <a href="__builtin__.html#object">object</a> with type&
nbsp;S, a subtype of T</tt></dl> |
| 77 |
| 78 <hr> |
| 79 Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseEx
ception</a>:<br> |
| 80 <dl><dt><a name="Failure-__delattr__"><strong>__delattr__</strong></a>(...)</dt>
<dd><tt>x.<a href="#Failure-__delattr__">__delattr__</a>('name') <==>
del x.name</tt></dd></dl> |
| 81 |
| 82 <dl><dt><a name="Failure-__getattribute__"><strong>__getattribute__</strong></a>
(...)</dt><dd><tt>x.<a href="#Failure-__getattribute__">__getattribute__</a>('na
me') <==> x.name</tt></dd></dl> |
| 83 |
| 84 <dl><dt><a name="Failure-__getitem__"><strong>__getitem__</strong></a>(...)</dt>
<dd><tt>x.<a href="#Failure-__getitem__">__getitem__</a>(y) <==> 
;x[y]</tt></dd></dl> |
| 85 |
| 86 <dl><dt><a name="Failure-__getslice__"><strong>__getslice__</strong></a>(...)</d
t><dd><tt>x.<a href="#Failure-__getslice__">__getslice__</a>(i, j) <
;==> x[i:j]<br> |
| 87 <br> |
| 88 Use of negative indices is not supported.</tt></dd
></dl> |
| 89 |
| 90 <dl><dt><a name="Failure-__reduce__"><strong>__reduce__</strong></a>(...)</dt></
dl> |
| 91 |
| 92 <dl><dt><a name="Failure-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><t
t>x.<a href="#Failure-__repr__">__repr__</a>() <==> repr(x)</tt>
</dd></dl> |
| 93 |
| 94 <dl><dt><a name="Failure-__setattr__"><strong>__setattr__</strong></a>(...)</dt>
<dd><tt>x.<a href="#Failure-__setattr__">__setattr__</a>('name', value)&nbs
p;<==> x.name = value</tt></dd></dl> |
| 95 |
| 96 <dl><dt><a name="Failure-__setstate__"><strong>__setstate__</strong></a>(...)</d
t></dl> |
| 97 |
| 98 <dl><dt><a name="Failure-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>
x.<a href="#Failure-__str__">__str__</a>() <==> str(x)</tt></dd>
</dl> |
| 99 |
| 100 <dl><dt><a name="Failure-__unicode__"><strong>__unicode__</strong></a>(...)</dt>
</dl> |
| 101 |
| 102 <hr> |
| 103 Data descriptors inherited from <a href="exceptions.html#BaseException">exceptio
ns.BaseException</a>:<br> |
| 104 <dl><dt><strong>__dict__</strong></dt> |
| 105 </dl> |
| 106 <dl><dt><strong>args</strong></dt> |
| 107 </dl> |
| 108 <dl><dt><strong>message</strong></dt> |
| 109 </dl> |
| 110 </td></tr></table> <p> |
| 111 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 112 <tr bgcolor="#ffc8d8"> |
| 113 <td colspan=3 valign=bottom> <br> |
| 114 <font color="#000000" face="helvetica, arial"><a name="PageTest">class <strong>P
ageTest</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</
font></td></tr> |
| 115 |
| 116 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 117 <td colspan=2><tt>A class styled on unittest.TestCase f
or creating page-specific tests.<br> </tt></td></tr> |
| 118 <tr><td> </td> |
| 119 <td width="100%">Methods defined here:<br> |
| 120 <dl><dt><a name="PageTest-AddCommandLineOptions"><strong>AddCommandLineOptions</
strong></a>(self, parser)</dt><dd><tt>Override to expose command-
line options for this test.<br> |
| 121 <br> |
| 122 The provided parser is an optparse.OptionParser in
stance and accepts all<br> |
| 123 normal results. The parsed options are available&n
bsp;in Run as<br> |
| 124 self.<strong>options</strong>.</tt></dd></dl> |
| 125 |
| 126 <dl><dt><a name="PageTest-AddOutputOptions"><strong>AddOutputOptions</strong></a
>(self, parser)</dt></dl> |
| 127 |
| 128 <dl><dt><a name="PageTest-CanRunForPage"><strong>CanRunForPage</strong></a>(self
, page)</dt><dd><tt>Override to customize if the test&n
bsp;can be ran for the given page.</tt></dd></dl> |
| 129 |
| 130 <dl><dt><a name="PageTest-CreatePageSet"><strong>CreatePageSet</strong></a>(self
, args, options)</dt><dd><tt>Override to make this test 
;generate its own page set instead of<br> |
| 131 allowing arbitrary page sets entered from the 
;command-line.</tt></dd></dl> |
| 132 |
| 133 <dl><dt><a name="PageTest-CustomizeBrowserOptions"><strong>CustomizeBrowserOptio
ns</strong></a>(self, options)</dt><dd><tt>Override to add test-s
pecific options to the BrowserOptions <a href="__builti
n__.html#object">object</a></tt></dd></dl> |
| 134 |
| 135 <dl><dt><a name="PageTest-CustomizeBrowserOptionsForPage"><strong>CustomizeBrows
erOptionsForPage</strong></a>(self, page, options)</dt><dd><tt>Add options&
nbsp;specific to the test and the given page.
</tt></dd></dl> |
| 136 |
| 137 <dl><dt><a name="PageTest-DidNavigateToPage"><strong>DidNavigateToPage</strong><
/a>(self, page, tab)</dt><dd><tt>Override to do operations r
ight after the page is navigated, but before<
br> |
| 138 any waiting for completion has occurred.</tt></dd></dl> |
| 139 |
| 140 <dl><dt><a name="PageTest-DidRunAction"><strong>DidRunAction</strong></a>(self,
page, tab, action)</dt><dd><tt>Override to do operations aft
er running the action on the page.</tt></dd></dl> |
| 141 |
| 142 <dl><dt><a name="PageTest-DidRunPageSet"><strong>DidRunPageSet</strong></a>(self
, tab, results)</dt><dd><tt>Override to do operations after&
nbsp;page set is completed, but before browser<br> |
| 143 is torn down.</tt></dd></dl> |
| 144 |
| 145 <dl><dt><a name="PageTest-DidStartHTTPServer"><strong>DidStartHTTPServer</strong
></a>(self, tab)</dt><dd><tt>Override to do operations after
the HTTP server is started.</tt></dd></dl> |
| 146 |
| 147 <dl><dt><a name="PageTest-NeedsBrowserRestartAfterEachRun"><strong>NeedsBrowserR
estartAfterEachRun</strong></a>(self, tab)</dt><dd><tt>Override to spe
cify browser restart after each run.</tt></dd></dl> |
| 148 |
| 149 <dl><dt><a name="PageTest-PrepareResults"><strong>PrepareResults</strong></a>(se
lf, options)</dt></dl> |
| 150 |
| 151 <dl><dt><a name="PageTest-Run"><strong>Run</strong></a>(self, options, page, tab
, results)</dt></dl> |
| 152 |
| 153 <dl><dt><a name="PageTest-SetUpBrowser"><strong>SetUpBrowser</strong></a>(self,
browser)</dt><dd><tt>Override to customize the browser
right after it has launched.</tt></dd></dl> |
| 154 |
| 155 <dl><dt><a name="PageTest-WillNavigateToPage"><strong>WillNavigateToPage</strong
></a>(self, page, tab)</dt><dd><tt>Override to do operations 
;before the page is navigated.</tt></dd></dl> |
| 156 |
| 157 <dl><dt><a name="PageTest-WillRunAction"><strong>WillRunAction</strong></a>(self
, page, tab, action)</dt><dd><tt>Override to do operations b
efore running the action on the page.</tt></dd></d
l> |
| 158 |
| 159 <dl><dt><a name="PageTest-WillRunPageSet"><strong>WillRunPageSet</strong></a>(se
lf, tab)</dt><dd><tt>Override to do operations before t
he page set is navigated.</tt></dd></dl> |
| 160 |
| 161 <dl><dt><a name="PageTest-__init__"><strong>__init__</strong></a>(self, test_met
hod_name, action_name_to_run<font color="#909090">=''</font>, needs_browser_rest
art_after_each_run<font color="#909090">=False</font>, discard_first_result<font
color="#909090">=False</font>)</dt></dl> |
| 162 |
| 163 <hr> |
| 164 Data descriptors defined here:<br> |
| 165 <dl><dt><strong>__dict__</strong></dt> |
| 166 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> |
| 167 </dl> |
| 168 <dl><dt><strong>__weakref__</strong></dt> |
| 169 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 170 </dl> |
| 171 <dl><dt><strong>action_name_to_run</strong></dt> |
| 172 </dl> |
| 173 <dl><dt><strong>discard_first_result</strong></dt> |
| 174 <dd><tt>When set to True, the first run of&nb
sp;the test is discarded. This is<br> |
| 175 useful for cases where it's desirable to have
some test resource cached so<br> |
| 176 the first run of the test can warm thing
s up.</tt></dd> |
| 177 </dl> |
| 178 <dl><dt><strong>output_format_choices</strong></dt> |
| 179 <dd><tt>Allowed output formats. The default is the
first item in the list.</tt></dd> |
| 180 </dl> |
| 181 </td></tr></table></td></tr></table><p> |
| 182 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 183 <tr bgcolor="#eeaa77"> |
| 184 <td colspan=3 valign=bottom> <br> |
| 185 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></b
ig></font></td></tr> |
| 186 |
| 187 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td>
</td> |
| 188 <td width="100%"><dl><dt><a name="-GetCompoundActionFromPage"><strong>GetCompoun
dActionFromPage</strong></a>(page, action_name)</dt></dl> |
| 189 </td></tr></table> |
| 190 </body></html> |
| OLD | NEW |