Commit fbacdc31 authored by Will Chen's avatar Will Chen Committed by Commit Bot

DevTools: test path for experiment in new test framework

The legacy test framework has a mechanism for enabling experiments at the startup
of DevTools, and this brings parity in the new test framework.

In the long-term, there should be a better solution as this is very
confusing for first-time DevTools test contributors and is a code smell.

Bug: 667560
Change-Id: I230453e16b3d06f6ee9ada99c0beb793f244d8c5
Reviewed-on: https://chromium-review.googlesource.com/695910Reviewed-by: default avatarWill Chen <chenwilliam@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Will Chen <chenwilliam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505901}
parent 3f096d72
......@@ -144,7 +144,7 @@ Main.Main = class {
Runtime.experiments.cleanUpStaleExperiments();
if (Host.isUnderTest(prefs)) {
var testPath = JSON.parse(prefs['testPath'] || '""');
var testPath = Runtime.queryParam('test') || JSON.parse(prefs['testPath'] || '""');
// Enable experiments for testing.
if (testPath.indexOf('accessibility/') !== -1)
Runtime.experiments.enableForTest('accessibilityInspection');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment