telemetry.page.record_wpr
index
telemetry/page/record_wpr.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.core.browser_options
telemetry.core.discover
json
logging
os
telemetry.page.page_measurement
telemetry.page.page_measurement_results
telemetry.page.page_runner
telemetry.page.page_set
telemetry.page.page_test
telemetry.page.profile_creator
sys
tempfile
telemetry.test
telemetry.page.test_expectations
time
urlparse
telemetry.core.util
telemetry.core.wpr_modes

 
Classes
       
telemetry.page.page_test.PageTest(telemetry.core.command_line.ArgumentHandlerMixIn)
RecordPage

 
class RecordPage(telemetry.page.page_test.PageTest)
    
Method resolution order:
RecordPage
telemetry.page.page_test.PageTest
telemetry.core.command_line.ArgumentHandlerMixIn
__builtin__.object

Methods defined here:
CanRunForPage(self, page)
CustomizeBrowserOptionsForPageSet(self, pset, options)
DidNavigateToPage(self, page, tab)
Forward the call to the test.
Run(self, page, tab, results)
WillNavigateToPage(self, page, tab)
Override to ensure all resources are fetched from network.
__init__(self, measurements)

Methods inherited from telemetry.page.page_test.PageTest:
CleanUpAfterPage(self, page, tab)
Called after the test run method was run, even if it failed.
CreateExpectations(self, page_set)
Override to make this test generate its own expectations instead of
any that may have been defined in the page set.
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
CustomizeBrowserOptionsForSinglePage(self, page, options)
Set options specific to the test and the given page.
 
This will be called with the current page when the browser is (re)started.
Changing options at this point only makes sense if the browser is being
restarted for each page. Note that if page has a startup_url, the browser
will always be restarted for each run.
DidRunAction(self, page, tab, action)
Override to do operations after running the action on the page.
DidRunActions(self, page, tab)
Override to do operations after running the actions on the page.
DidRunPageRepeats(self, page)
Override to do operations after each page is iterated over.
DidRunTest(self, browser, results)
Override to do operations after all page set(s) are completed.
 
This will occur before the browser is torn down.
DidStartBrowser(self, browser)
Override to customize the browser right after it has launched.
DidStartHTTPServer(self, tab)
Override to do operations after the HTTP server is started.
IsExiting(self)
RequestExit(self)
RestartBrowserBeforeEachPage(self)
Should the browser be restarted for the page?
 
This returns true if the test needs to unconditionally restart the
browser for each page. It may be called before the browser is started.
RunNavigateSteps(self, page, tab)
Navigates the tab to the page URL attribute.
 
Runs the 'navigate_steps' page attribute as a compound action.
StopBrowserAfterPage(self, browser, page)
Should the browser be stopped after the page is run?
 
This is called after a page is run to decide whether the browser needs to
be stopped to clean up its state. If it is stopped, then it will be
restarted to run the next page.
 
A test that overrides this can look at both the page and the browser to
decide whether it needs to stop the browser.
TabForPage(self, page, browser)
Override to select a different tab for the page.  For instance, to
create a new tab for every page, return browser.tabs.New().
ValidatePageSet(self, page_set)
Override to examine the page set before the test run.  Useful for
example to validate that the pageset can be used with the test.
WillRunAction(self, page, tab, action)
Override to do operations before running the action on the page.
WillRunActions(self, page, tab)
Override to do operations before running the actions on the page.
WillRunPageRepeats(self, page)
Override to do operations before each page is iterated over.
WillRunTest(self, options)
Override to do operations before the page set(s) are navigated.
WillStartBrowser(self, browser)
Override to manipulate the browser environment before it launches.

Data descriptors inherited from telemetry.page.page_test.PageTest:
action_name_to_run
attempts
Maximum number of times test will be attempted.
clear_cache_before_each_run
When set to True, the browser's disk and memory cache will be cleared
before each run.
close_tabs_before_run
When set to True, all tabs are closed before running the test for the
first time.
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.
max_errors
Maximum number of errors allowed for the page set.
max_failures
Maximum number of failures allowed for the page set.

Class methods inherited from telemetry.core.command_line.ArgumentHandlerMixIn:
AddCommandLineArgs(cls, parser) from __builtin__.type
Override to accept custom command-line arguments.
ProcessCommandLineArgs(cls, parser, args) from __builtin__.type
Override to process command-line arguments.
 
We pass in parser so we can call parser.error().

Data descriptors inherited from telemetry.core.command_line.ArgumentHandlerMixIn:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
Main(base_dir)