Bug 1398601 - Fix devtools browser_gcli_async test r=tromey
authorTed Campbell <tcampbell@mozilla.com>
Wed, 13 Sep 2017 14:20:28 -0400
changeset 430218 62d3e87c505cfcdfc4d7cb19f1a06191e724bddf
parent 430217 1ef5858d537ca65f88278b6d140905fe4fa292fe
child 430219 354b9d0b210193cffbc146b037c598bc31fa9401
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstromey
bugs1398601
milestone57.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 1398601 - Fix devtools browser_gcli_async test r=tromey This test has encoding issues that accidently worked before. The mockCommands.js file was loaded under two different encodings, but previously the cache would always return the first encoding. MozReview-Commit-ID: GE9BFy2RkqL
devtools/client/commandline/test/browser_gcli_async.js
devtools/client/commandline/test/head.js
--- a/devtools/client/commandline/test/browser_gcli_async.js
+++ b/devtools/client/commandline/test/browser_gcli_async.js
@@ -47,17 +47,17 @@ exports.testBasic = function (options) {
       check: {
         input:  "tsslow ",
         hints:         "Shalom",
         markup: "VVVVVVV",
         cursor: 7,
         current: "hello",
         status: "ERROR",
         predictions: [
-          "Shalom", "Namasté", "Hallo", "Dydd-da", "Chào", "Hej",
+          "Shalom", "Namast\u{00E9}", "Hallo", "Dydd-da", "Ch\u{00E0}o", "Hej",
           "Saluton", "Sawubona"
         ],
         unassigned: [ ],
         args: {
           command: { name: "tsslow" },
           hello: {
             arg: "",
             status: "INCOMPLETE"
@@ -69,17 +69,17 @@ exports.testBasic = function (options) {
       setup:    "tsslow S",
       check: {
         input:  "tsslow S",
         hints:          "halom",
         markup: "VVVVVVVI",
         cursor: 8,
         current: "hello",
         status: "ERROR",
-        predictions: [ "Shalom", "Saluton", "Sawubona", "Namasté" ],
+        predictions: [ "Shalom", "Saluton", "Sawubona", "Namast\u{00E9}" ],
         unassigned: [ ],
         args: {
           command: { name: "tsslow" },
           hello: {
             arg: " S",
             status: "INCOMPLETE"
           },
         }
--- a/devtools/client/commandline/test/head.js
+++ b/devtools/client/commandline/test/head.js
@@ -12,17 +12,17 @@ const TEST_BASE_HTTPS = "https://example
 
 var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
 var { console } = require("resource://gre/modules/Console.jsm");
 var flags = require("devtools/shared/flags");
 
 // Import the GCLI test helper
 var testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
 Services.scriptloader.loadSubScript(testDir + "/helpers.js", this);
-Services.scriptloader.loadSubScript(testDir + "/mockCommands.js", this);
+Services.scriptloader.loadSubScript(testDir + "/mockCommands.js", this, "UTF-8");
 
 flags.testing = true;
 SimpleTest.registerCleanupFunction(() => {
   flags.testing = false;
 });
 
 function whenDelayedStartupFinished(aWindow, aCallback) {
   Services.obs.addObserver(function observer(aSubject, aTopic) {