telemetry.page.page_test
index
telemetry/page/page_test.py

# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

 
Modules
       
telemetry.page.actions.all_page_actions
telemetry.page.gtest_test_results
logging
telemetry.page.actions.page_action
telemetry.page.page_test_results
telemetry.core.util

 
Classes
       
__builtin__.object
PageTest
exceptions.Exception(exceptions.BaseException)
Failure

 
class Failure(exceptions.Exception)
    Exception that can be thrown from PageMeasurement to indicate an
undesired but designed-for problem.
 
 
Method resolution order:
Failure
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class PageTest(__builtin__.object)
    A class styled on unittest.TestCase for creating page-specific tests.
 
  Methods defined here:
AddCommandLineOptions(self, parser)
Override to expose command-line options for this test.
 
The provided parser is an optparse.OptionParser instance and accepts all
normal results. The parsed options are available in Run as
self.options.
AddOutputOptions(self, parser)
CanRunForPage(self, page)
Override to customize if the test can be ran for the given page.
CreatePageSet(self, args, options)
Override to make this test generate its own page set instead of
allowing arbitrary page sets entered from the command-line.
CustomizeBrowserOptions(self, options)
Override to add test-specific options to the BrowserOptions object
CustomizeBrowserOptionsForPage(self, page, options)
Add options specific to the test and the given page.
DidNavigateToPage(self, page, tab)
Override to do operations right after the page is navigated, but before
any waiting for completion has occurred.
DidRunAction(self, page, tab, action)
Override to do operations after running the action on the page.
DidRunPageSet(self, tab, results)
Override to do operations after page set is completed, but before browser
is torn down.
DidStartHTTPServer(self, tab)
Override to do operations after the HTTP server is started.
NeedsBrowserRestartAfterEachRun(self, tab)
Override to specify browser restart after each run.
PrepareResults(self, options)
Run(self, options, page, tab, results)
SetUpBrowser(self, browser)
Override to customize the browser right after it has launched.
WillNavigateToPage(self, page, tab)
Override to do operations before the page is navigated.
WillRunAction(self, page, tab, action)
Override to do operations before running the action on the page.
WillRunPageSet(self, tab)
Override to do operations before the page set is navigated.
__init__(self, test_method_name, action_name_to_run='', needs_browser_restart_after_each_run=False, discard_first_result=False, clear_cache_before_each_run=False)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
action_name_to_run
clear_cache_before_each_run
When set to True, the browser's disk and memory cache will be cleared
before each run.
discard_first_result
When set to True, the first run of the test is discarded.  This is
useful for cases where it's desirable to have some test resource cached so
the first run of the test can warm things up.
output_format_choices
Allowed output formats. The default is the first item in the list.

 
Functions
       
GetCompoundActionFromPage(page, action_name)