Bug 1290599 - Part 2: Fix the browser_toolbox_transport_events.js test r=jryans
authorJarda Snajdr <jsnajdr@gmail.com>
Thu, 11 Aug 2016 16:47:22 +0200
changeset 309132 a1ab21952abc
parent 309131 51600f3f15c2
child 309133 8fd2f35a58fa
push id31317
push userkwierso@gmail.com
push date2016-08-12 23:24 +0000
treeherderautoland@8fd2f35a58fa [default view] [failures only]
reviewersjryans
bugs1290599
milestone51.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 1290599 - Part 2: Fix the browser_toolbox_transport_events.js test r=jryans MozReview-Commit-ID: 3Ck8o29f93K
devtools/client/framework/test/browser_toolbox_transport_events.js
--- a/devtools/client/framework/test/browser_toolbox_transport_events.js
+++ b/devtools/client/framework/test/browser_toolbox_transport_events.js
@@ -1,13 +1,15 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
+"use strict";
+
 const { on, off } = require("sdk/event/core");
 const { DebuggerClient } = require("devtools/shared/client/main");
 
 function test() {
   gDevTools.on("toolbox-created", onToolboxCreated);
   on(DebuggerClient, "connect", onDebuggerClientConnect);
 
   addTab("about:blank").then(function () {
@@ -68,21 +70,21 @@ function onPacket1(eventId, packet) {
 }
 
 function onToolboxCreated(eventId, toolbox) {
   toolbox.target.makeRemote();
   let client = toolbox.target.client;
   let transport = client._transport;
 
   transport.on("send", send1);
-  transport.on("onPacket", onPacket1);
+  transport.on("packet", onPacket1);
 
   client.addOneTimeListener("closed", event => {
     transport.off("send", send1);
-    transport.off("onPacket", onPacket1);
+    transport.off("packet", onPacket1);
   });
 }
 
 // Listen to all debugger client object protocols.
 var sent2 = [];
 var received2 = [];
 
 function send2(eventId, packet) {
@@ -92,15 +94,15 @@ function send2(eventId, packet) {
 function onPacket2(eventId, packet) {
   received2.push(packet);
 }
 
 function onDebuggerClientConnect(client) {
   let transport = client._transport;
 
   transport.on("send", send2);
-  transport.on("onPacket", onPacket2);
+  transport.on("packet", onPacket2);
 
   client.addOneTimeListener("closed", event => {
     transport.off("send", send2);
-    transport.off("onPacket", onPacket2);
+    transport.off("packet", onPacket2);
   });
 }