Load lighthouse_test_runner as module

[email protected]

Bug: 1105476
Change-Id: Ia45e25caee320c49ed0449251f149d92999e26df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2409993
Commit-Queue: Tim van der Lippe <[email protected]>
Reviewed-by: Jack Franklin <[email protected]>
diff --git a/BUILD.gn b/BUILD.gn
index fa8669e..b798a36 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -24,7 +24,7 @@
   "front_end/application_test_runner/ResourcesTestRunner.js",
   "front_end/application_test_runner/ResourceTreeTestRunner.js",
   "front_end/application_test_runner/ServiceWorkersTestRunner.js",
-  "front_end/lighthouse_test_runner/LighthouseTestRunner.js",
+  "front_end/lighthouse_test_runner/lighthouse_test_runner.js",
   "front_end/lighthouse_test_runner/module.json",
   "front_end/axe_core_test_runner/axe_core_test_runner.js",
   "front_end/axe_core_test_runner/module.json",
diff --git a/all_devtools_files.gni b/all_devtools_files.gni
index 30c915f..0f4cc317 100644
--- a/all_devtools_files.gni
+++ b/all_devtools_files.gni
@@ -24,7 +24,7 @@
   "front_end/application_test_runner/ResourcesTestRunner.js",
   "front_end/application_test_runner/ResourceTreeTestRunner.js",
   "front_end/application_test_runner/ServiceWorkersTestRunner.js",
-  "front_end/lighthouse_test_runner/LighthouseTestRunner.js",
+  "front_end/lighthouse_test_runner/lighthouse_test_runner.js",
   "front_end/lighthouse_test_runner/module.json",
   "front_end/lighthouse_worker.js",
   "front_end/lighthouse_worker.json",
diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn
index 4ec2736..a06d156 100644
--- a/front_end/BUILD.gn
+++ b/front_end/BUILD.gn
@@ -117,6 +117,7 @@
     "extensions_test_runner:bundle",
     "heap_profiler_test_runner:bundle",
     "layers_test_runner:bundle",
+    "lighthouse_test_runner:bundle",
   ]
 }
 
diff --git a/front_end/lighthouse_test_runner/BUILD.gn b/front_end/lighthouse_test_runner/BUILD.gn
new file mode 100644
index 0000000..31f48af
--- /dev/null
+++ b/front_end/lighthouse_test_runner/BUILD.gn
@@ -0,0 +1,9 @@
+# Copyright 2020 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.
+
+import("../../scripts/build/ninja/copy.gni")
+
+copy_sources_to_resources("bundle") {
+  sources = [ "lighthouse_test_runner.js" ]
+}
diff --git a/front_end/lighthouse_test_runner/LighthouseTestRunner.js b/front_end/lighthouse_test_runner/lighthouse_test_runner.js
similarity index 100%
rename from front_end/lighthouse_test_runner/LighthouseTestRunner.js
rename to front_end/lighthouse_test_runner/lighthouse_test_runner.js
diff --git a/front_end/lighthouse_test_runner/module.json b/front_end/lighthouse_test_runner/module.json
index 3ebe051..3623b81 100644
--- a/front_end/lighthouse_test_runner/module.json
+++ b/front_end/lighthouse_test_runner/module.json
@@ -3,7 +3,7 @@
     "test_runner",
     "lighthouse"
   ],
-  "scripts": [
-    "LighthouseTestRunner.js"
+  "modules": [
+    "lighthouse_test_runner.js"
   ]
 }