blob: 7cadee380bd3de1bb13a835f8adfaedc1cb56f76 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2015 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.
-->
<link rel="import" href="/tracing/core/test_utils.html">
<link rel="import" href="/tracing/extras/rail/rail_interaction_record.html">
<script>
'use strict';
/**
* @fileoverview Stub version of RAILInteractionRecord for testing.
*/
tr.exportTo('tr.e.rail', function() {
function StubRAILInteractionRecord(args) {
var sd = tr.c.TestUtils.getStartAndDurationFromDict(args);
tr.e.rail.RAILInteractionRecord.call(
this, args.parentModel, args.railTypeName, args.railTypeName,
sd.start, sd.duration);
this.args = args;
if (args.associatedEvents) {
args.associatedEvents.forEach(function(event) {
this.associatedEvents.push(event);
}, this);
}
}
StubRAILInteractionRecord.prototype = {
__proto__: tr.e.rail.RAILInteractionRecord.prototype,
get normalizedUserComfort() {
return this.args.normalizedUserComfort;
},
get normalizedEfficiency() {
return this.args.normalizedEfficiency;
}
};
return {
StubRAILInteractionRecord: StubRAILInteractionRecord
};
});
</script>