Open browser-tests/index.html?grep=TimeSeriesChart%20fetchMeasurementSets Observe all test cases fail with the following error: TypeError: undefined is not an object (evaluating 'RemoteAPI.getJSONWithStatus')_fetchPrimaryCluster@file:///Volumes/Data/git-webkit/Websites/perf.webkit.org/public/v3/models/measurement-set.js:116:25 The problem is that unit-tests/resources/mock-remote-api.js directly imports privileged APIs for browser & node using require. We can't do this because require(~) doesn't exist in a browser. Each user of MockRemoteAPI needs to manually inject the appropriate type of PrivilegedAPI instead.
There are 48 browser test failures (out of 140 tests we have) all caused by this change :(
Created attachment 339113 [details] Patch
Comment on attachment 339113 [details] Patch Attachment 339113 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/7509159 New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
Created attachment 339132 [details] Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment on attachment 339113 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339113&action=review > Websites/perf.webkit.org/unit-tests/resources/mock-remote-api.js:67 > + const PrivilegedAPI = useNodePrivilegedAPI ? > + require('../../tools/js/privileged-api').PrivilegedAPI : require('../../public/v3/privileged-api.js').PrivilegedAPI; This is not right as it would end up loading PrivilegedAPI each time inject is called.
Created attachment 339134 [details] Fixes the bug
Comment on attachment 339134 [details] Fixes the bug Clearing flags on attachment: 339134 Committed r231180: <https://trac.webkit.org/changeset/231180>
All reviewed patches have been landed. Closing bug.
<rdar://problem/39854346>