OLD | NEW |
| (Empty) |
1 | |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
3 <html><head><title>Python: module telemetry.web_perf.timeline_based_page_test</t
itle> | |
4 <meta charset="utf-8"> | |
5 </head><body bgcolor="#f0f0f8"> | |
6 | |
7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> | |
8 <tr bgcolor="#7799ee"> | |
9 <td valign=bottom> <br> | |
10 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.web_perf.html"><font color="#ffffff">web_perf</font></a>.timeline_based_page_te
st</strong></big></big></font></td | |
11 ><td align=right valign=bottom | |
12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href=
"../telemetry/web_perf/timeline_based_page_test.py">telemetry/web_perf/timeline_
based_page_test.py</a></font></td></tr></table> | |
13 <p><tt># Copyright (c) 2015 The Chromium Autho
rs. All rights reserved.<br> | |
14 # Use of this source code is governed by
a BSD-style license that can be<br> | |
15 # found in the LICENSE file.</tt></p> | |
16 <p> | |
17 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
18 <tr bgcolor="#aa55cc"> | |
19 <td colspan=3 valign=bottom> <br> | |
20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big
></font></td></tr> | |
21 | |
22 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td>
</td> | |
23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=t
op><a href="telemetry.page.page_test.html">telemetry.page.page_test</a><br> | |
24 </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> | |
25 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
26 <tr bgcolor="#ee77aa"> | |
27 <td colspan=3 valign=bottom> <br> | |
28 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> | |
29 | |
30 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> | |
31 <td width="100%"><dl> | |
32 <dt><font face="helvetica, arial"><a href="telemetry.page.page_test.html#PageTes
t">telemetry.page.page_test.PageTest</a>(<a href="__builtin__.html#object">__bui
ltin__.object</a>) | |
33 </font></dt><dd> | |
34 <dl> | |
35 <dt><font face="helvetica, arial"><a href="telemetry.web_perf.timeline_based_pag
e_test.html#TimelineBasedPageTest">TimelineBasedPageTest</a> | |
36 </font></dt></dl> | |
37 </dd> | |
38 </dl> | |
39 <p> | |
40 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
41 <tr bgcolor="#ffc8d8"> | |
42 <td colspan=3 valign=bottom> <br> | |
43 <font color="#000000" face="helvetica, arial"><a name="TimelineBasedPageTest">cl
ass <strong>TimelineBasedPageTest</strong></a>(<a href="telemetry.page.page_test
.html#PageTest">telemetry.page.page_test.PageTest</a>)</font></td></tr> | |
44 | |
45 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> | |
46 <td colspan=2><tt>Page test that collects metrics with&
nbsp;TimelineBasedMeasurement.<br> | |
47 <br> | |
48 WillRunStory(), Measure() and DidRunStory() are all&nbs
p;done in story_runner<br> | |
49 explicitly. We still need this wrapper around 
;<a href="telemetry.page.page_test.html#PageTest">PageTest</a> because 
;it executes<br> | |
50 some browser related functions in the parent
class, which is needed by<br> | |
51 Timeline Based Measurement benchmarks. This class
will be removed after<br> | |
52 page_test's hooks are fully removed.<br> </tt></td></tr
> | |
53 <tr><td> </td> | |
54 <td width="100%"><dl><dt>Method resolution order:</dt> | |
55 <dd><a href="telemetry.web_perf.timeline_based_page_test.html#TimelineBasedPageT
est">TimelineBasedPageTest</a></dd> | |
56 <dd><a href="telemetry.page.page_test.html#PageTest">telemetry.page.page_test.Pa
geTest</a></dd> | |
57 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | |
58 </dl> | |
59 <hr> | |
60 Methods defined here:<br> | |
61 <dl><dt><a name="TimelineBasedPageTest-ValidateAndMeasurePage"><strong>ValidateA
ndMeasurePage</strong></a>(self, page, tab, results)</dt><dd><tt>Collect al
l possible metrics and added them to results.
</tt></dd></dl> | |
62 | |
63 <dl><dt><a name="TimelineBasedPageTest-__init__"><strong>__init__</strong></a>(s
elf, tbm)</dt></dl> | |
64 | |
65 <hr> | |
66 Data descriptors defined here:<br> | |
67 <dl><dt><strong>measurement</strong></dt> | |
68 </dl> | |
69 <hr> | |
70 Methods inherited from <a href="telemetry.page.page_test.html#PageTest">telemetr
y.page.page_test.PageTest</a>:<br> | |
71 <dl><dt><a name="TimelineBasedPageTest-CustomizeBrowserOptions"><strong>Customiz
eBrowserOptions</strong></a>(self, options)</dt><dd><tt>Override to ad
d test-specific options to the BrowserOptions obje
ct</tt></dd></dl> | |
72 | |
73 <dl><dt><a name="TimelineBasedPageTest-DidNavigateToPage"><strong>DidNavigateToP
age</strong></a>(self, page, tab)</dt><dd><tt>Override to do oper
ations right after the page is navigated and&
nbsp;after<br> | |
74 all waiting for completion has occurred.</tt></dd></dl> | |
75 | |
76 <dl><dt><a name="TimelineBasedPageTest-DidRunPage"><strong>DidRunPage</strong></
a>(self, platform)</dt><dd><tt>Called after the test run&nbs
p;method was run, even if it failed.</tt></dd></dl
> | |
77 | |
78 <dl><dt><a name="TimelineBasedPageTest-DidStartBrowser"><strong>DidStartBrowser<
/strong></a>(self, browser)</dt><dd><tt>Override to customize the
browser right after it has launched.</tt></dd></d
l> | |
79 | |
80 <dl><dt><a name="TimelineBasedPageTest-RestartBrowserBeforeEachPage"><strong>Res
tartBrowserBeforeEachPage</strong></a>(self)</dt><dd><tt>Should the br
owser be restarted for the page?<br> | |
81 <br> | |
82 This returns true if the test needs to u
nconditionally restart the<br> | |
83 browser for each page. It may be called
before the browser is started.</tt></dd></dl> | |
84 | |
85 <dl><dt><a name="TimelineBasedPageTest-RunNavigateSteps"><strong>RunNavigateStep
s</strong></a>(self, page, tab)</dt><dd><tt>Navigates the tab to&
nbsp;the page URL attribute.<br> | |
86 <br> | |
87 Runs the 'navigate_steps' page attribute as a 
;compound action.</tt></dd></dl> | |
88 | |
89 <dl><dt><a name="TimelineBasedPageTest-SetOptions"><strong>SetOptions</strong></
a>(self, options)</dt><dd><tt>Sets the BrowserFinderOptions insta
nce to use.</tt></dd></dl> | |
90 | |
91 <dl><dt><a name="TimelineBasedPageTest-StopBrowserAfterPage"><strong>StopBrowser
AfterPage</strong></a>(self, browser, page)</dt><dd><tt>Should the bro
wser be stopped after the page is run?<br> | |
92 <br> | |
93 This is called after a page is run to&nb
sp;decide whether the browser needs to<br> | |
94 be stopped to clean up its state. If it&
nbsp;is stopped, then it will be<br> | |
95 restarted to run the next page.<br> | |
96 <br> | |
97 A test that overrides this can look at b
oth the page and the browser to<br> | |
98 decide whether it needs to stop the browser.<
/tt></dd></dl> | |
99 | |
100 <dl><dt><a name="TimelineBasedPageTest-TabForPage"><strong>TabForPage</strong></
a>(self, page, browser)</dt><dd><tt>Override to select a dif
ferent tab for the page. For instance,
to<br> | |
101 create a new tab for every page, return
browser.tabs.New().</tt></dd></dl> | |
102 | |
103 <dl><dt><a name="TimelineBasedPageTest-WillNavigateToPage"><strong>WillNavigateT
oPage</strong></a>(self, page, tab)</dt><dd><tt>Override to do op
erations before the page is navigated, notably&nbs
p;Telemetry<br> | |
104 will already have performed the following operatio
ns on the browser before<br> | |
105 calling this function:<br> | |
106 * Ensure only one tab is open.<br> | |
107 * Call WaitForDocumentReadyStateToComplete on the tab.<
/tt></dd></dl> | |
108 | |
109 <dl><dt><a name="TimelineBasedPageTest-WillStartBrowser"><strong>WillStartBrowse
r</strong></a>(self, platform)</dt><dd><tt>Override to manipulate 
;the browser environment before it launches.</tt></dd><
/dl> | |
110 | |
111 <hr> | |
112 Data descriptors inherited from <a href="telemetry.page.page_test.html#PageTest"
>telemetry.page.page_test.PageTest</a>:<br> | |
113 <dl><dt><strong>__dict__</strong></dt> | |
114 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> | |
115 </dl> | |
116 <dl><dt><strong>__weakref__</strong></dt> | |
117 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> | |
118 </dl> | |
119 <dl><dt><strong>clear_cache_before_each_run</strong></dt> | |
120 <dd><tt>When set to True, the browser's disk
and memory cache will be cleared<br> | |
121 before each run.</tt></dd> | |
122 </dl> | |
123 <dl><dt><strong>close_tabs_before_run</strong></dt> | |
124 <dd><tt>When set to True, all tabs are closed
before running the test for the<br> | |
125 first time.</tt></dd> | |
126 </dl> | |
127 <dl><dt><strong>is_multi_tab_test</strong></dt> | |
128 <dd><tt>Returns True if the test opens multiple&nb
sp;tabs.<br> | |
129 <br> | |
130 If the test overrides TabForPage, it is deeme
d a multi-tab test.<br> | |
131 Multi-tab tests do not retry after tab or&nbs
p;browser crashes, whereas,<br> | |
132 single-tab tests too. That is because the sta
te of multi-tab tests<br> | |
133 (e.g., how many tabs are open, etc.) is
unknown after crashes.</tt></dd> | |
134 </dl> | |
135 </td></tr></table></td></tr></table> | |
136 </body></html> | |
OLD | NEW |