Move insertAdjacent*() API from HTMLElement to Element
[WebKit-https.git] / Websites / perf.webkit.org / unit-tests / resources / mock-v3-models.js
1 'use strict';
2
3 var MockModels = {
4     inject: function () {
5         beforeEach(function () {
6             AnalysisTask._fetchAllPromise = null;
7             AnalysisTask.clearStaticMap();
8             CommitLog.clearStaticMap();
9             Metric.clearStaticMap();
10             Platform.clearStaticMap();
11             Repository.clearStaticMap();
12             RootSet.clearStaticMap();
13             Test.clearStaticMap();
14             TestGroup.clearStaticMap();
15             BuildRequest.clearStaticMap();
16
17             MockModels.osx = Repository.ensureSingleton(9, {name: 'OS X'});
18             MockModels.ios = Repository.ensureSingleton(22, {name: 'iOS'});
19             MockModels.webkit = Repository.ensureSingleton(11, {name: 'WebKit', url: 'http://trac.webkit.org/changeset/$1'});
20             MockModels.sharedRepository = Repository.ensureSingleton(16, {name: 'Shared'});
21             MockModels.builder = new Builder(176, {name: 'WebKit Perf Builder', buildUrl: 'http://build.webkit.org/builders/$builderName/$buildNumber'});
22
23             MockModels.someTest = Test.ensureSingleton(1, {name: 'Some test'});
24             MockModels.someMetric = Metric.ensureSingleton(2884, {name: 'Some metric', test: MockModels.someTest});
25             MockModels.somePlatform = Platform.ensureSingleton(65, {name: 'Some platform', metrics: [MockModels.someMetric]});
26
27             MockModels.speedometer = Test.ensureSingleton(1928, {name: 'Speedometer'});
28             MockModels.jetstream = Test.ensureSingleton(1886, {name: 'JetStream'});
29             MockModels.dromaeo = Test.ensureSingleton(2022, {name: 'Dromaeo'});
30             MockModels.domcore = Test.ensureSingleton(2023, {name: 'DOM Core Tests', parentId: 2022});
31
32             MockModels.iphone = Platform.ensureSingleton(12, {name: 'iPhone', metrics: []});
33             MockModels.ipad = Platform.ensureSingleton(13, {name: 'iPad', metrics: []});
34
35             MockModels.plt = Test.ensureSingleton(844, {name: 'Page Load Test'});
36             MockModels.pltMean = Metric.ensureSingleton(1158, {name: 'Time', aggregator: 'Arithmetic', test: MockModels.plt});
37             MockModels.elCapitan = Platform.ensureSingleton(31, {name: 'El Capitan', metrics: [MockModels.pltMean]});
38         });
39     }
40 }
41
42 if (typeof module != 'undefined')
43     module.exports.MockModels = MockModels;