From 846e1254d8f8fdf2052b7dd90b3df74eb7782222 Mon Sep 17 00:00:00 2001 From: Georgiy Abbasov Date: Thu, 30 Mar 2017 18:53:18 +0300 Subject: [PATCH] Update custom "callsite-record" module --- modules/callsite-record/index.js | 19 ++++++++++--------- src/api/test-controller/index.js | 6 +++--- .../client-function-builder.js | 4 ++-- src/client-functions/selectors/add-api.js | 14 +++++++------- src/errors/get-callsite.js | 13 +++++++++++-- src/errors/process-test-fn-error.js | 4 ++-- src/errors/runtime/index.js | 4 ++-- ...tion-additional-element-is-invisible-error | 2 +- .../action-additional-element-not-found-error | 2 +- ...nal-selector-matches-wrong-node-type-error | 2 +- .../action-boolean-option-error | 2 +- .../action-can-not-find-file-to-upload-error | 2 +- .../action-element-is-invisible-error | 2 +- .../action-element-is-not-file-input-error | 2 +- .../action-element-non-content-editable-error | 2 +- .../action-element-non-editable-error | 2 +- .../action-element-not-found-error | 2 +- .../action-element-not-iframe-error | 2 +- .../action-element-not-text-area-error | 2 +- .../action-iframe-is-not-loaded-error | 2 +- .../action-incorrect-keys-error | 2 +- .../action-integer-argument-error | 2 +- .../action-integer-option-error | 2 +- ...tion-non-empty-string-array-argument-error | 2 +- .../action-options-type-error | 2 +- .../action-positive-integer-argument-error | 2 +- .../action-positive-integer-option-error | 2 +- .../action-role-argument-error | 2 +- .../action-root-container-not-found-error | 2 +- .../action-selector-error | 2 +- ...ion-selector-matches-wrong-node-type-error | 2 +- .../action-speed-option-error | 2 +- .../action-string-argument-error | 2 +- .../action-string-array-element-error | 2 +- .../action-unsupported-device-type-error | 2 +- .../action-unsupported-url-protocol-error | 2 +- ...fo-for-element-specified-by-selector-error | 2 +- ...ient-function-execution-interruption-error | 2 +- .../current-iframe-is-invisible-error | 2 +- .../current-iframe-is-not-loaded-error | 2 +- .../current-iframe-not-found-error | 2 +- .../dom-node-client-function-result-error | 2 +- .../external-assertion-library-error | 2 +- .../invalid-selector-result-error | 2 +- .../missing-await-error | 2 +- .../native-dialog-not-handled-error | 2 +- .../expected-test-run-errors/page-load-error | 2 +- .../role-switch-in-role-initializer-error | 2 +- ...ative-dialog-handler-code-wrong-type-error | 2 +- .../set-test-speed-argument-error | 2 +- ...ht-error-in-add-custom-dom-properties-code | 2 +- .../uncaught-error-in-client-function-code | 2 +- .../uncaught-error-in-native-dialog-handler | 2 +- .../uncaught-js-error-in-test-code | 2 +- .../uncaught-js-error-on-page | 2 +- .../window-dimensions-overflow-error | 2 +- test/server/data/test-callsite/index.js | 2 +- 57 files changed, 87 insertions(+), 77 deletions(-) diff --git a/modules/callsite-record/index.js b/modules/callsite-record/index.js index 67ade30249d..63dea9444bf 100644 --- a/modules/callsite-record/index.js +++ b/modules/callsite-record/index.js @@ -5,7 +5,6 @@ var stackParser = require('error-stack-parser'); var padStart = require('lodash').padStart; var defaults = require('lodash').defaults; var highlight = require('highlight-es'); -var wrapCallSite = require('source-map-support').wrapCallSite; var renderers = { default: require('./renderers/default'), @@ -283,21 +282,23 @@ CallsiteRecord.fromError = function (error, isCallsiteFrame) { }; // API -module.exports = function createCallsiteRecord (/* err, isCallsiteFrame || fnName, typeName */) { - if (arguments[0] instanceof Error) - return CallsiteRecord.fromError(arguments[0], arguments[1]); +module.exports = function createCallsiteRecord (options) { /*{ forError, isCallsiteFrame, byFunctionName, typeName, processFrameFn }*/ + if (options.forError) + return CallsiteRecord.fromError(options.forError, options.isCallsiteFrame); - else if (typeof arguments[0] === 'string') { + else if (options.byFunctionName) { var stackFrames = callsite(); - stackFrames = stackFrames.map(function (frame) { - return wrapCallSite(frame) - }); + if (options.processFrameFn) { + stackFrames = stackFrames.map(function (frame) { + return options.processFrameFn(frame); + }); + } // NOTE: remove API call stackFrames.shift(); - return CallsiteRecord.fromStackFrames(stackFrames, arguments[0], arguments[1]); + return CallsiteRecord.fromStackFrames(stackFrames, options.byFunctionName, options.typeName); } return null; diff --git a/src/api/test-controller/index.js b/src/api/test-controller/index.js index 471a2361699..e1edd2143af 100644 --- a/src/api/test-controller/index.js +++ b/src/api/test-controller/index.js @@ -1,7 +1,7 @@ import Promise from 'pinkie'; import { identity, assign, isNil as isNullOrUndefined } from 'lodash'; import { MissingAwaitError } from '../../errors/test-run'; -import getCallsite from '../../errors/get-callsite'; +import { getCallsiteForMethod } from '../../errors/get-callsite'; import ClientFunctionBuilder from '../../client-functions/client-function-builder'; import Assertion from './assertion'; import { getDelegatedAPIList, delegateAPI } from '../../utils/delegated-api'; @@ -82,7 +82,7 @@ export default class TestController { _enqueueTask (apiMethodName, createTaskExecutor) { this._checkForMissingAwait(); - var callsite = getCallsite(apiMethodName); + var callsite = getCallsiteForMethod(apiMethodName); var executor = createTaskExecutor(callsite); this.executionChain = this.executionChain.then(executor); @@ -242,7 +242,7 @@ export default class TestController { } _getNativeDialogHistory$ () { - var callsite = getCallsite('getNativeDialogHistory'); + var callsite = getCallsiteForMethod('getNativeDialogHistory'); return this.testRun.executeCommand(new GetNativeDialogHistoryCommand(), callsite); } diff --git a/src/client-functions/client-function-builder.js b/src/client-functions/client-function-builder.js index 916898ddbbc..4f37adecccf 100644 --- a/src/client-functions/client-function-builder.js +++ b/src/client-functions/client-function-builder.js @@ -7,7 +7,7 @@ import compileClientFunction from '../compiler/es-next/compile-client-function'; import { APIError, ClientFunctionAPIError } from '../errors/runtime'; import { assertType, is } from '../errors/runtime/type-assertions'; import MESSAGE from '../errors/runtime/message'; -import getCallsite from '../errors/get-callsite'; +import { getCallsiteForMethod } from '../errors/get-callsite'; import ClientFunctionResultPromise from './result-promise'; import testRunMarker from '../test-run/marker-symbol'; @@ -64,7 +64,7 @@ export default class ClientFunctionBuilder { var clientFn = function __$$clientFunction$$ () { var testRun = builder.getBoundTestRun() || testRunTracker.resolveContextTestRun(); - var callsite = getCallsite(builder.callsiteNames.execution); + var callsite = getCallsiteForMethod(builder.callsiteNames.execution); var args = []; // OPTIMIZATION: don't leak `arguments` object. diff --git a/src/client-functions/selectors/add-api.js b/src/client-functions/selectors/add-api.js index 8e6113b1f6d..88ce3e91ac2 100644 --- a/src/client-functions/selectors/add-api.js +++ b/src/client-functions/selectors/add-api.js @@ -2,7 +2,7 @@ import { assign } from 'lodash'; import clientFunctionBuilderSymbol from '../builder-symbol'; import { ELEMENT_SNAPSHOT_PROPERTIES, NODE_SNAPSHOT_PROPERTIES } from './snapshot-properties'; import { CantObtainInfoForElementSpecifiedBySelectorError } from '../../errors/test-run'; -import getCallsite from '../../errors/get-callsite'; +import { getCallsiteForMethod } from '../../errors/get-callsite'; import ClientFunctionBuilder from '../client-function-builder'; import ClientFunctionResultPromise from '../result-promise'; import { assertType, is } from '../../errors/runtime/type-assertions'; @@ -106,7 +106,7 @@ function addSnapshotProperties (obj, getSelector, properties) { properties.forEach(prop => { Object.defineProperty(obj, prop, { get: () => { - var callsite = getCallsite('get'); + var callsite = getCallsiteForMethod('get'); return ClientFunctionResultPromise.fromFn(async () => { var snapshot = await getSnapshot(getSelector, callsite); @@ -149,7 +149,7 @@ function addSnapshotPropertyShorthands (obj, getSelector, customDOMProperties, c addCustomMethods(obj, getSelector, customMethods); obj.getStyleProperty = prop => { - var callsite = getCallsite('getStyleProperty'); + var callsite = getCallsiteForMethod('getStyleProperty'); return ClientFunctionResultPromise.fromFn(async () => { var snapshot = await getSnapshot(getSelector, callsite); @@ -159,7 +159,7 @@ function addSnapshotPropertyShorthands (obj, getSelector, customDOMProperties, c }; obj.getAttribute = attrName => { - var callsite = getCallsite('getAttribute'); + var callsite = getCallsiteForMethod('getAttribute'); return ClientFunctionResultPromise.fromFn(async () => { var snapshot = await getSnapshot(getSelector, callsite); @@ -169,7 +169,7 @@ function addSnapshotPropertyShorthands (obj, getSelector, customDOMProperties, c }; obj.getBoundingClientRectProperty = prop => { - var callsite = getCallsite('getBoundingClientRectProperty'); + var callsite = getCallsiteForMethod('getBoundingClientRectProperty'); return ClientFunctionResultPromise.fromFn(async () => { var snapshot = await getSnapshot(getSelector, callsite); @@ -179,7 +179,7 @@ function addSnapshotPropertyShorthands (obj, getSelector, customDOMProperties, c }; obj.hasClass = name => { - var callsite = getCallsite('hasClass'); + var callsite = getCallsiteForMethod('hasClass'); return ClientFunctionResultPromise.fromFn(async () => { var snapshot = await getSnapshot(getSelector, callsite); @@ -192,7 +192,7 @@ function addSnapshotPropertyShorthands (obj, getSelector, customDOMProperties, c function createCounter (getSelector, SelectorBuilder) { var builder = new SelectorBuilder(getSelector(), { counterMode: true }, { instantiation: 'Selector' }); var counter = builder.getFunction(); - var callsite = getCallsite('get'); + var callsite = getCallsiteForMethod('get'); return async () => { try { diff --git a/src/errors/get-callsite.js b/src/errors/get-callsite.js index 49e58ba1e83..ebce7a2ea9f 100644 --- a/src/errors/get-callsite.js +++ b/src/errors/get-callsite.js @@ -1,19 +1,28 @@ import createCallsiteRecord from '../../modules/callsite-record'; import stackCleaningHook from './stack-cleaning-hook'; +import { wrapCallSite } from 'source-map-support'; const STACK_TRACE_LIMIT = 2000; -export default function getCallsite (methodName, typeName) { +function getCallsite (options) { var originalStackCleaningEnabled = stackCleaningHook.enabled; var originalStackTraceLimit = Error.stackTraceLimit; stackCleaningHook.enabled = false; Error.stackTraceLimit = STACK_TRACE_LIMIT; - var callsiteRecord = createCallsiteRecord(methodName, typeName); + var callsiteRecord = createCallsiteRecord(options); Error.stackTraceLimit = originalStackTraceLimit; stackCleaningHook.enabled = originalStackCleaningEnabled; return callsiteRecord; } + +export function getCallsiteForMethod (methodName, typeName) { + return getCallsite({ byFunctionName: methodName, typeName, processFrameFn: wrapCallSite }); +} + +export function getCallsiteForError (error, isCallsiteFrame) { + return getCallsite({ forError: error, isCallsiteFrame }); +} diff --git a/src/errors/process-test-fn-error.js b/src/errors/process-test-fn-error.js index 4453c0dc3f7..a7cde94597e 100644 --- a/src/errors/process-test-fn-error.js +++ b/src/errors/process-test-fn-error.js @@ -1,5 +1,5 @@ import { sep } from 'path'; -import getCallsite from './get-callsite'; +import { getCallsiteForError } from './get-callsite'; import { APIError } from './runtime'; import { @@ -34,7 +34,7 @@ export default function processTestFnError (err) { // NOTE: assertion libraries can add their source files to the error stack frames. // We should skip them to create a correct callsite for the assertion error. - var callsite = isAssertionError ? getCallsite(err, isAssertionErrorCallsiteFrame) : getCallsite(err); + var callsite = isAssertionError ? getCallsiteForError(err, isAssertionErrorCallsiteFrame) : getCallsiteForError(err); return isAssertionError ? new ExternalAssertionLibraryError(err, callsite) : diff --git a/src/errors/runtime/index.js b/src/errors/runtime/index.js index 77b60526cc0..19a87888eef 100644 --- a/src/errors/runtime/index.js +++ b/src/errors/runtime/index.js @@ -1,7 +1,7 @@ import { renderers } from 'callsite-record'; import MESSAGE from './message'; import createStackFilter from '../create-stack-filter'; -import getCallsite from '../get-callsite'; +import { getCallsiteForMethod } from '../get-callsite'; import renderTemplate from '../../utils/render-template'; // Errors @@ -34,7 +34,7 @@ export class APIError extends Error { // NOTE: `rawMessage` is used in error substitution if it occurs in test run. this.rawMessage = rawMessage; - this.callsite = getCallsite(methodName); + this.callsite = getCallsiteForMethod(methodName); this.constructor = APIError; // HACK: prototype properties don't work with built-in subclasses diff --git a/test/server/data/expected-test-run-errors/action-additional-element-is-invisible-error b/test/server/data/expected-test-run-errors/action-additional-element-is-invisible-error index 5076ec83a0f..e90f18208d2 100644 --- a/test/server/data/expected-test-run-errors/action-additional-element-is-invisible-error +++ b/test/server/data/expected-test-run-errors/action-additional-element-is-invisible-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-additional-element-not-found-error b/test/server/data/expected-test-run-errors/action-additional-element-not-found-error index 69293f56267..18a1fa37d6e 100644 --- a/test/server/data/expected-test-run-errors/action-additional-element-not-found-error +++ b/test/server/data/expected-test-run-errors/action-additional-element-not-found-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-additional-selector-matches-wrong-node-type-error b/test/server/data/expected-test-run-errors/action-additional-selector-matches-wrong-node-type-error index 7d2c42d20d9..0739fe72928 100644 --- a/test/server/data/expected-test-run-errors/action-additional-selector-matches-wrong-node-type-error +++ b/test/server/data/expected-test-run-errors/action-additional-selector-matches-wrong-node-type-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-boolean-option-error b/test/server/data/expected-test-run-errors/action-boolean-option-error index 6deeb87b433..725b9f85371 100644 --- a/test/server/data/expected-test-run-errors/action-boolean-option-error +++ b/test/server/data/expected-test-run-errors/action-boolean-option-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-can-not-find-file-to-upload-error b/test/server/data/expected-test-run-errors/action-can-not-find-file-to-upload-error index 132613ac9ae..ce387e43b29 100644 --- a/test/server/data/expected-test-run-errors/action-can-not-find-file-to-upload-error +++ b/test/server/data/expected-test-run-errors/action-can-not-find-file-to-upload-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-element-is-invisible-error b/test/server/data/expected-test-run-errors/action-element-is-invisible-error index 3fac01efcce..1764c6968e4 100644 --- a/test/server/data/expected-test-run-errors/action-element-is-invisible-error +++ b/test/server/data/expected-test-run-errors/action-element-is-invisible-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-element-is-not-file-input-error b/test/server/data/expected-test-run-errors/action-element-is-not-file-input-error index 25eb7820dd2..b65b297a46f 100644 --- a/test/server/data/expected-test-run-errors/action-element-is-not-file-input-error +++ b/test/server/data/expected-test-run-errors/action-element-is-not-file-input-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-element-non-content-editable-error b/test/server/data/expected-test-run-errors/action-element-non-content-editable-error index 65aefea7c5f..3a77e2c79d8 100644 --- a/test/server/data/expected-test-run-errors/action-element-non-content-editable-error +++ b/test/server/data/expected-test-run-errors/action-element-non-content-editable-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-element-non-editable-error b/test/server/data/expected-test-run-errors/action-element-non-editable-error index 5c5377ba673..1951ea59b71 100644 --- a/test/server/data/expected-test-run-errors/action-element-non-editable-error +++ b/test/server/data/expected-test-run-errors/action-element-non-editable-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-element-not-found-error b/test/server/data/expected-test-run-errors/action-element-not-found-error index 4c81535a210..9d9ef542e43 100644 --- a/test/server/data/expected-test-run-errors/action-element-not-found-error +++ b/test/server/data/expected-test-run-errors/action-element-not-found-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-element-not-iframe-error b/test/server/data/expected-test-run-errors/action-element-not-iframe-error index 394a61625af..dc6713243d6 100644 --- a/test/server/data/expected-test-run-errors/action-element-not-iframe-error +++ b/test/server/data/expected-test-run-errors/action-element-not-iframe-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-element-not-text-area-error b/test/server/data/expected-test-run-errors/action-element-not-text-area-error index 58e8739f11f..e161e1e6804 100644 --- a/test/server/data/expected-test-run-errors/action-element-not-text-area-error +++ b/test/server/data/expected-test-run-errors/action-element-not-text-area-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-iframe-is-not-loaded-error b/test/server/data/expected-test-run-errors/action-iframe-is-not-loaded-error index 1d86cde05e4..122867d9cd0 100644 --- a/test/server/data/expected-test-run-errors/action-iframe-is-not-loaded-error +++ b/test/server/data/expected-test-run-errors/action-iframe-is-not-loaded-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-incorrect-keys-error b/test/server/data/expected-test-run-errors/action-incorrect-keys-error index 6baa110b1a0..06dd7769c0f 100644 --- a/test/server/data/expected-test-run-errors/action-incorrect-keys-error +++ b/test/server/data/expected-test-run-errors/action-incorrect-keys-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-integer-argument-error b/test/server/data/expected-test-run-errors/action-integer-argument-error index 10f54c648d9..39d62d181f0 100644 --- a/test/server/data/expected-test-run-errors/action-integer-argument-error +++ b/test/server/data/expected-test-run-errors/action-integer-argument-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-integer-option-error b/test/server/data/expected-test-run-errors/action-integer-option-error index ef3df83669e..43271c80282 100644 --- a/test/server/data/expected-test-run-errors/action-integer-option-error +++ b/test/server/data/expected-test-run-errors/action-integer-option-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-non-empty-string-array-argument-error b/test/server/data/expected-test-run-errors/action-non-empty-string-array-argument-error index acede422e83..6a815534598 100644 --- a/test/server/data/expected-test-run-errors/action-non-empty-string-array-argument-error +++ b/test/server/data/expected-test-run-errors/action-non-empty-string-array-argument-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-options-type-error b/test/server/data/expected-test-run-errors/action-options-type-error index 6d6cc744f9a..9d0d48cd852 100644 --- a/test/server/data/expected-test-run-errors/action-options-type-error +++ b/test/server/data/expected-test-run-errors/action-options-type-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-positive-integer-argument-error b/test/server/data/expected-test-run-errors/action-positive-integer-argument-error index f01a4bf2f22..d575b57f347 100644 --- a/test/server/data/expected-test-run-errors/action-positive-integer-argument-error +++ b/test/server/data/expected-test-run-errors/action-positive-integer-argument-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-positive-integer-option-error b/test/server/data/expected-test-run-errors/action-positive-integer-option-error index 48e3843b185..3b2b1ae71a5 100644 --- a/test/server/data/expected-test-run-errors/action-positive-integer-option-error +++ b/test/server/data/expected-test-run-errors/action-positive-integer-option-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-role-argument-error b/test/server/data/expected-test-run-errors/action-role-argument-error index e214a5171ef..f029b694243 100644 --- a/test/server/data/expected-test-run-errors/action-role-argument-error +++ b/test/server/data/expected-test-run-errors/action-role-argument-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-root-container-not-found-error b/test/server/data/expected-test-run-errors/action-root-container-not-found-error index 45787ad8c2f..622dc9e6ebd 100644 --- a/test/server/data/expected-test-run-errors/action-root-container-not-found-error +++ b/test/server/data/expected-test-run-errors/action-root-container-not-found-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-selector-error b/test/server/data/expected-test-run-errors/action-selector-error index 614cd67f48c..c5a36a54c19 100644 --- a/test/server/data/expected-test-run-errors/action-selector-error +++ b/test/server/data/expected-test-run-errors/action-selector-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-selector-matches-wrong-node-type-error b/test/server/data/expected-test-run-errors/action-selector-matches-wrong-node-type-error index 18692aa784b..16a772a78c0 100644 --- a/test/server/data/expected-test-run-errors/action-selector-matches-wrong-node-type-error +++ b/test/server/data/expected-test-run-errors/action-selector-matches-wrong-node-type-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-speed-option-error b/test/server/data/expected-test-run-errors/action-speed-option-error index 2b0f434f889..b1acfac8758 100644 --- a/test/server/data/expected-test-run-errors/action-speed-option-error +++ b/test/server/data/expected-test-run-errors/action-speed-option-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-string-argument-error b/test/server/data/expected-test-run-errors/action-string-argument-error index 33318cfed42..8f44099280e 100644 --- a/test/server/data/expected-test-run-errors/action-string-argument-error +++ b/test/server/data/expected-test-run-errors/action-string-argument-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-string-array-element-error b/test/server/data/expected-test-run-errors/action-string-array-element-error index 00760aa6d58..05ef53cfb16 100644 --- a/test/server/data/expected-test-run-errors/action-string-array-element-error +++ b/test/server/data/expected-test-run-errors/action-string-array-element-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-unsupported-device-type-error b/test/server/data/expected-test-run-errors/action-unsupported-device-type-error index 4e96ee1765b..4e585d30231 100644 --- a/test/server/data/expected-test-run-errors/action-unsupported-device-type-error +++ b/test/server/data/expected-test-run-errors/action-unsupported-device-type-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/action-unsupported-url-protocol-error b/test/server/data/expected-test-run-errors/action-unsupported-url-protocol-error index 2d24a8fbdef..dba84019001 100644 --- a/test/server/data/expected-test-run-errors/action-unsupported-url-protocol-error +++ b/test/server/data/expected-test-run-errors/action-unsupported-url-protocol-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/cant-obtain-info-for-element-specified-by-selector-error b/test/server/data/expected-test-run-errors/cant-obtain-info-for-element-specified-by-selector-error index f748e12893f..70be3c9e1a7 100644 --- a/test/server/data/expected-test-run-errors/cant-obtain-info-for-element-specified-by-selector-error +++ b/test/server/data/expected-test-run-errors/cant-obtain-info-for-element-specified-by-selector-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/client-function-execution-interruption-error b/test/server/data/expected-test-run-errors/client-function-execution-interruption-error index 9e824f598bf..c87862e7793 100644 --- a/test/server/data/expected-test-run-errors/client-function-execution-interruption-error +++ b/test/server/data/expected-test-run-errors/client-function-execution-interruption-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/current-iframe-is-invisible-error b/test/server/data/expected-test-run-errors/current-iframe-is-invisible-error index 5e1aca8fa4e..43c86bde6b3 100644 --- a/test/server/data/expected-test-run-errors/current-iframe-is-invisible-error +++ b/test/server/data/expected-test-run-errors/current-iframe-is-invisible-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/current-iframe-is-not-loaded-error b/test/server/data/expected-test-run-errors/current-iframe-is-not-loaded-error index a2cc8ae2fd5..40f5422a1a4 100644 --- a/test/server/data/expected-test-run-errors/current-iframe-is-not-loaded-error +++ b/test/server/data/expected-test-run-errors/current-iframe-is-not-loaded-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/current-iframe-not-found-error b/test/server/data/expected-test-run-errors/current-iframe-not-found-error index a25a630be63..73a0c234990 100644 --- a/test/server/data/expected-test-run-errors/current-iframe-not-found-error +++ b/test/server/data/expected-test-run-errors/current-iframe-not-found-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/dom-node-client-function-result-error b/test/server/data/expected-test-run-errors/dom-node-client-function-result-error index c2403c313e1..8060d321b66 100644 --- a/test/server/data/expected-test-run-errors/dom-node-client-function-result-error +++ b/test/server/data/expected-test-run-errors/dom-node-client-function-result-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/external-assertion-library-error b/test/server/data/expected-test-run-errors/external-assertion-library-error index a439c89b03a..cecd168403a 100644 --- a/test/server/data/expected-test-run-errors/external-assertion-library-error +++ b/test/server/data/expected-test-run-errors/external-assertion-library-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/invalid-selector-result-error b/test/server/data/expected-test-run-errors/invalid-selector-result-error index 7b166b656bd..305e407268c 100644 --- a/test/server/data/expected-test-run-errors/invalid-selector-result-error +++ b/test/server/data/expected-test-run-errors/invalid-selector-result-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/missing-await-error b/test/server/data/expected-test-run-errors/missing-await-error index 3946c37286d..0654a9524df 100644 --- a/test/server/data/expected-test-run-errors/missing-await-error +++ b/test/server/data/expected-test-run-errors/missing-await-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/native-dialog-not-handled-error b/test/server/data/expected-test-run-errors/native-dialog-not-handled-error index 014d087a2d1..f5134e39f44 100644 --- a/test/server/data/expected-test-run-errors/native-dialog-not-handled-error +++ b/test/server/data/expected-test-run-errors/native-dialog-not-handled-error @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/page-load-error b/test/server/data/expected-test-run-errors/page-load-error index 0c215a09d48..b677b649050 100644 --- a/test/server/data/expected-test-run-errors/page-load-error +++ b/test/server/data/expected-test-run-errors/page-load-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/role-switch-in-role-initializer-error b/test/server/data/expected-test-run-errors/role-switch-in-role-initializer-error index 6fb069a6184..bc2afe7d8f9 100644 --- a/test/server/data/expected-test-run-errors/role-switch-in-role-initializer-error +++ b/test/server/data/expected-test-run-errors/role-switch-in-role-initializer-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/set-native-dialog-handler-code-wrong-type-error b/test/server/data/expected-test-run-errors/set-native-dialog-handler-code-wrong-type-error index 74d2145b268..f4b725f3c67 100644 --- a/test/server/data/expected-test-run-errors/set-native-dialog-handler-code-wrong-type-error +++ b/test/server/data/expected-test-run-errors/set-native-dialog-handler-code-wrong-type-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/set-test-speed-argument-error b/test/server/data/expected-test-run-errors/set-test-speed-argument-error index 770b2b349db..4d4c2e9a772 100644 --- a/test/server/data/expected-test-run-errors/set-test-speed-argument-error +++ b/test/server/data/expected-test-run-errors/set-test-speed-argument-error @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/uncaught-error-in-add-custom-dom-properties-code b/test/server/data/expected-test-run-errors/uncaught-error-in-add-custom-dom-properties-code index 5d4943e1918..738b0b6a34a 100644 --- a/test/server/data/expected-test-run-errors/uncaught-error-in-add-custom-dom-properties-code +++ b/test/server/data/expected-test-run-errors/uncaught-error-in-add-custom-dom-properties-code @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/uncaught-error-in-client-function-code b/test/server/data/expected-test-run-errors/uncaught-error-in-client-function-code index 7b133efcea4..84abf95076c 100644 --- a/test/server/data/expected-test-run-errors/uncaught-error-in-client-function-code +++ b/test/server/data/expected-test-run-errors/uncaught-error-in-client-function-code @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/uncaught-error-in-native-dialog-handler b/test/server/data/expected-test-run-errors/uncaught-error-in-native-dialog-handler index ca21bb2bbb9..00d6e161b39 100644 --- a/test/server/data/expected-test-run-errors/uncaught-error-in-native-dialog-handler +++ b/test/server/data/expected-test-run-errors/uncaught-error-in-native-dialog-handler @@ -7,7 +7,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/uncaught-js-error-in-test-code b/test/server/data/expected-test-run-errors/uncaught-js-error-in-test-code index db75f24cf6f..8eb55444d40 100644 --- a/test/server/data/expected-test-run-errors/uncaught-js-error-in-test-code +++ b/test/server/data/expected-test-run-errors/uncaught-js-error-in-test-code @@ -4,7 +4,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/uncaught-js-error-on-page b/test/server/data/expected-test-run-errors/uncaught-js-error-on-page index afe482def47..2a5c36ad343 100644 --- a/test/server/data/expected-test-run-errors/uncaught-js-error-on-page +++ b/test/server/data/expected-test-run-errors/uncaught-js-error-on-page @@ -6,7 +6,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/expected-test-run-errors/window-dimensions-overflow-error b/test/server/data/expected-test-run-errors/window-dimensions-overflow-error index 9adb8d1cf2e..e8acd603ac5 100644 --- a/test/server/data/expected-test-run-errors/window-dimensions-overflow-error +++ b/test/server/data/expected-test-run-errors/window-dimensions-overflow-error @@ -5,7 +5,7 @@ Browser: Chrome 15.0.874 / Mac OS X 10.8.1 Screenshot: /unix/path/with/ 18 |function func1 () { - 19 | record = createCallsiteRecord('func1'); + 19 | record = createCallsiteRecord({ byFunctionName: 'func1' }); 20 |} 21 | 22 |(function func2 () { diff --git a/test/server/data/test-callsite/index.js b/test/server/data/test-callsite/index.js index 66d44e6378f..a17eefa110c 100644 --- a/test/server/data/test-callsite/index.js +++ b/test/server/data/test-callsite/index.js @@ -16,7 +16,7 @@ function stackFilter (err, frames) { stackTrace.filter.attach(stackFilter); function func1 () { - record = createCallsiteRecord('func1'); + record = createCallsiteRecord({ byFunctionName: 'func1' }); } (function func2 () {