Home | History | Annotate | Download | only in pydoc
      1 
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      3 <html><head><title>Python: module telemetry.story.story</title>
      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>&nbsp;<br>
     10 <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.story.html"><font color="#ffffff">story</font></a>.story</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/story/story.py">telemetry/story/story.py</a></font></td></tr></table>
     13     <p><tt>#&nbsp;Copyright&nbsp;2015&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
     14 #&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
     15 #&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;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>&nbsp;<br>
     20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
     21     
     22 <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="re.html">re</a><br>
     24 </td><td width="25%" valign=top><a href="telemetry.story.shared_state.html">telemetry.story.shared_state</a><br>
     25 </td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
     26 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     27 <tr bgcolor="#ee77aa">
     28 <td colspan=3 valign=bottom>&nbsp;<br>
     29 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
     30     
     31 <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     32 <td width="100%"><dl>
     33 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
     34 </font></dt><dd>
     35 <dl>
     36 <dt><font face="helvetica, arial"><a href="telemetry.story.story.html#Story">Story</a>
     37 </font></dt></dl>
     38 </dd>
     39 </dl>
     40  <p>
     41 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     42 <tr bgcolor="#ffc8d8">
     43 <td colspan=3 valign=bottom>&nbsp;<br>
     44 <font color="#000000" face="helvetica, arial"><a name="Story">class <strong>Story</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
     45     
     46 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
     47 <td colspan=2><tt>A&nbsp;class&nbsp;styled&nbsp;on&nbsp;unittest.TestCase&nbsp;for&nbsp;creating&nbsp;story&nbsp;tests.<br>
     48 &nbsp;<br>
     49 Tests&nbsp;should&nbsp;override&nbsp;Run&nbsp;to&nbsp;maybe&nbsp;start&nbsp;the&nbsp;application&nbsp;and&nbsp;perform&nbsp;actions<br>
     50 on&nbsp;it.&nbsp;To&nbsp;share&nbsp;state&nbsp;between&nbsp;different&nbsp;tests,&nbsp;one&nbsp;can&nbsp;define&nbsp;a<br>
     51 shared_state&nbsp;which&nbsp;contains&nbsp;hooks&nbsp;that&nbsp;will&nbsp;be&nbsp;called&nbsp;before&nbsp;and<br>
     52 after&nbsp;mutiple&nbsp;stories&nbsp;run&nbsp;and&nbsp;in&nbsp;between&nbsp;runs.<br>
     53 &nbsp;<br>
     54 Args:<br>
     55 &nbsp;&nbsp;shared_state_class:&nbsp;subclass&nbsp;of&nbsp;telemetry.story.shared_state.SharedState.<br>
     56 &nbsp;&nbsp;name:&nbsp;string&nbsp;name&nbsp;of&nbsp;this&nbsp;story&nbsp;that&nbsp;can&nbsp;be&nbsp;used&nbsp;for&nbsp;identifying&nbsp;this&nbsp;story<br>
     57 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;results&nbsp;output.<br>
     58 &nbsp;&nbsp;labels:&nbsp;A&nbsp;list&nbsp;or&nbsp;set&nbsp;of&nbsp;string&nbsp;labels&nbsp;that&nbsp;are&nbsp;used&nbsp;for&nbsp;filtering.&nbsp;See<br>
     59 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;story.story_filter&nbsp;for&nbsp;more&nbsp;information.<br>
     60 &nbsp;&nbsp;is_local:&nbsp;If&nbsp;True,&nbsp;the&nbsp;story&nbsp;does&nbsp;not&nbsp;require&nbsp;network.<br>&nbsp;</tt></td></tr>
     61 <tr><td>&nbsp;</td>
     62 <td width="100%">Methods defined here:<br>
     63 <dl><dt><a name="Story-AsDict"><strong>AsDict</strong></a>(self)</dt><dd><tt>Converts&nbsp;a&nbsp;story&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;a&nbsp;dict&nbsp;suitable&nbsp;for&nbsp;JSON&nbsp;output.</tt></dd></dl>
     64 
     65 <dl><dt><a name="Story-Run"><strong>Run</strong></a>(self, shared_state)</dt><dd><tt>Execute&nbsp;the&nbsp;interactions&nbsp;with&nbsp;the&nbsp;applications&nbsp;and/or&nbsp;platforms.</tt></dd></dl>
     66 
     67 <dl><dt><a name="Story-__init__"><strong>__init__</strong></a>(self, shared_state_class, name<font color="#909090">=''</font>, labels<font color="#909090">=None</font>, is_local<font color="#909090">=False</font>, make_javascript_deterministic<font color="#909090">=True</font>)</dt><dd><tt>Args:<br>
     68 &nbsp;&nbsp;make_javascript_deterministic:&nbsp;Whether&nbsp;JavaScript&nbsp;performed&nbsp;on<br>
     69 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;page&nbsp;is&nbsp;made&nbsp;deterministic&nbsp;across&nbsp;multiple&nbsp;runs.&nbsp;This<br>
     70 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requires&nbsp;that&nbsp;the&nbsp;web&nbsp;content&nbsp;is&nbsp;served&nbsp;via&nbsp;Web&nbsp;Page&nbsp;Replay<br>
     71 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;take&nbsp;effect.&nbsp;This&nbsp;setting&nbsp;does&nbsp;not&nbsp;affect&nbsp;stories&nbsp;containing&nbsp;no&nbsp;web<br>
     72 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content&nbsp;or&nbsp;where&nbsp;the&nbsp;HTTP&nbsp;MIME&nbsp;type&nbsp;is&nbsp;not&nbsp;text/html.See&nbsp;also:<br>
     73 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_InjectScripts&nbsp;method&nbsp;in&nbsp;third_party/webpagereplay/httpclient.py.</tt></dd></dl>
     74 
     75 <hr>
     76 Data descriptors defined here:<br>
     77 <dl><dt><strong>__dict__</strong></dt>
     78 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
     79 </dl>
     80 <dl><dt><strong>__weakref__</strong></dt>
     81 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
     82 </dl>
     83 <dl><dt><strong>display_name</strong></dt>
     84 </dl>
     85 <dl><dt><strong>file_safe_name</strong></dt>
     86 <dd><tt>A&nbsp;version&nbsp;of&nbsp;display_name&nbsp;that's&nbsp;safe&nbsp;to&nbsp;use&nbsp;as&nbsp;a&nbsp;filename.<br>
     87 &nbsp;<br>
     88 The&nbsp;default&nbsp;implementation&nbsp;sanitizes&nbsp;special&nbsp;characters&nbsp;with&nbsp;underscores,<br>
     89 but&nbsp;it's&nbsp;okay&nbsp;to&nbsp;override&nbsp;it&nbsp;with&nbsp;a&nbsp;more&nbsp;specific&nbsp;implementation&nbsp;in<br>
     90 subclasses.</tt></dd>
     91 </dl>
     92 <dl><dt><strong>id</strong></dt>
     93 </dl>
     94 <dl><dt><strong>is_local</strong></dt>
     95 <dd><tt>Returns&nbsp;True&nbsp;iff&nbsp;this&nbsp;story&nbsp;does&nbsp;not&nbsp;require&nbsp;network.</tt></dd>
     96 </dl>
     97 <dl><dt><strong>labels</strong></dt>
     98 </dl>
     99 <dl><dt><strong>make_javascript_deterministic</strong></dt>
    100 </dl>
    101 <dl><dt><strong>name</strong></dt>
    102 </dl>
    103 <dl><dt><strong>serving_dir</strong></dt>
    104 <dd><tt>Returns&nbsp;the&nbsp;absolute&nbsp;path&nbsp;to&nbsp;a&nbsp;directory&nbsp;with&nbsp;hash&nbsp;files&nbsp;to&nbsp;data&nbsp;that<br>
    105 should&nbsp;be&nbsp;updated&nbsp;from&nbsp;cloud&nbsp;storage,&nbsp;or&nbsp;None&nbsp;if&nbsp;no&nbsp;files&nbsp;need&nbsp;to&nbsp;be<br>
    106 updated.</tt></dd>
    107 </dl>
    108 <dl><dt><strong>shared_state_class</strong></dt>
    109 </dl>
    110 </td></tr></table></td></tr></table>
    111 </body></html>