REGRESSION(r230960): Browser tests under TimeSeriesChart fetchMeasurementSets all...
[WebKit-https.git] / Websites / perf.webkit.org / unit-tests / privileged-api-tests.js
index 9da4b89..eb425df 100644 (file)
@@ -1,12 +1,13 @@
 'use strict';
 
 const assert = require('assert');
-
-const MockRemoteAPI = require('./resources/mock-remote-api.js').MockRemoteAPI;
 require('../tools/js/v3-models.js');
+const BrowserPrivilegedAPI = require('../public/v3/privileged-api.js').PrivilegedAPI;
+const NodePrivilegedAPI = require('../tools/js/privileged-api').PrivilegedAPI;
+const MockRemoteAPI = require('./resources/mock-remote-api.js').MockRemoteAPI;
 
 describe('BrowserPrivilegedAPI', () => {
-    let requests = MockRemoteAPI.inject();
+    const requests = MockRemoteAPI.inject(null, BrowserPrivilegedAPI);
 
     beforeEach(() => {
         PrivilegedAPI._token = null;
@@ -169,7 +170,7 @@ describe('BrowserPrivilegedAPI', () => {
 });
 
 describe('NodePrivilegedAPI', () => {
-    let requests = MockRemoteAPI.inject(null, 'node');
+    let requests = MockRemoteAPI.inject(null, NodePrivilegedAPI);
     beforeEach(() => {
         PrivilegedAPI.configure('slave_name', 'password');
     });