Bug 1517517 [wpt PR 14702] - Fix Mojo detection in bluetooth-helpers.js, a=testonly
authorRobert Ma <robertma@chromium.org>
Thu, 31 Jan 2019 15:44:04 +0000
changeset 457862 1b22d48a609ca277ac79cffcf2e90698b2c4481b
parent 457861 7d38897c8194cfccca7736fb6a14178d6a8084f6
child 457863 467e3fe9844956e6999227c685da400b64c32d45
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1517517, 14702
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517517 [wpt PR 14702] - Fix Mojo detection in bluetooth-helpers.js, a=testonly Automatic update from web-platform-tests Fix Mojo detection in bluetooth-helpers.js Avoid throwing a reference error when Mojo is not defined. -- wpt-commits: 7fac5d53fbbc546d1ea5246b1d61ff080c3a40e7 wpt-pr: 14702
testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js
--- a/testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js
+++ b/testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js
@@ -13,18 +13,18 @@ function loadScripts(paths) {
   let chain = Promise.resolve();
   for (let path of paths) {
     chain = chain.then(() => loadScript(path));
   }
   return chain;
 }
 
 function performChromiumSetup() {
-  // Make sure we are actually on Chromium.
-  if (!Mojo) {
+  // Make sure we are actually on Chromium with Mojo enabled.
+  if (typeof Mojo === 'undefined') {
     return;
   }
 
   // Load the Chromium-specific resources.
   let prefix = '/resources/chromium';
   let extra = [];
   const pathname = window.location.pathname;
   if (pathname.includes('/LayoutTests/') || pathname.includes('/web_tests/')) {