Add Options#setPerfLoggingPrefs

This commit is contained in:
Kuniwak
2015-07-08 17:53:08 +09:00
parent 30c4a6ea12
commit 6c8a0d02aa
2 changed files with 35 additions and 0 deletions
@@ -20,6 +20,7 @@ function TestChromeOptions() {
options = options.setChromeLogFile("logfile");
options = options.setLocalState("state");
options = options.setLoggingPrefs(new webdriver.logging.Preferences());
options = options.setPerfLoggingPrefs({enableNetwork: true, enablePage: true, enableTimeline: true, tracingCategories: "category", bufferUsageReportingInterval: 1000});
options = options.setProxy({ proxyType: "proxyType" });
options = options.setUserPreferences("preferences");
var capabilities: webdriver.Capabilities = options.toCapabilities();
+34
View File
@@ -33,6 +33,14 @@ declare module chrome {
prefs?: any;
}
interface IPerfLoggingPrefs {
enableNetwork: boolean;
enablePage: boolean;
enableTimeline: boolean;
tracingCategories: string;
bufferUsageReportingInterval: number;
}
/**
* Class for managing ChromeDriver specific options.
*/
@@ -124,6 +132,32 @@ declare module chrome {
*/
setLoggingPrefs(prefs: webdriver.logging.Preferences): Options;
/**
* Sets the performance logging preferences. Options include:
*
* - `enableNetwork`: Whether or not to collect events from Network domain.
* - `enablePage`: Whether or not to collect events from Page domain.
* - `enableTimeline`: Whether or not to collect events from Timeline domain.
* Note: when tracing is enabled, Timeline domain is implicitly disabled,
* unless `enableTimeline` is explicitly set to true.
* - `tracingCategories`: A comma-separated string of Chrome tracing categories
* for which trace events should be collected. An unspecified or empty
* string disables tracing.
* - `bufferUsageReportingInterval`: The requested number of milliseconds
* between DevTools trace buffer usage events. For example, if 1000, then
* once per second, DevTools will report how full the trace buffer is. If a
* report indicates the buffer usage is 100%, a warning will be issued.
*
* @param {{enableNetwork: boolean,
* enablePage: boolean,
* enableTimeline: boolean,
* tracingCategories: string,
* bufferUsageReportingInterval: number}} prefs The performance
* logging preferences.
* @return {!Options} A self reference.
*/
setPerfLoggingPrefs(prefs: IPerfLoggingPrefs): Options;
/**
* Sets preferences for the "Local State" file in Chrome's user data