Bug 1103588 - Part 3: Replace deprecated String#contains warning with an expression closure warning in sharedWorker_sharedWorker.js test. r=bz
authorChris Peterson <cpeterson@mozilla.com>
Sat, 09 Apr 2016 15:58:20 -0700
changeset 330821 a4cd474335e4f6b4e6a299e20f9b27fc164caa4a
parent 330820 28e0d6720135c0bd7153db04418e9ca82d814bf7
child 330822 6891e4414ffaa50352ffdbab21997a6c431e0cae
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1103588
milestone48.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 1103588 - Part 3: Replace deprecated String#contains warning with an expression closure warning in sharedWorker_sharedWorker.js test. r=bz
dom/workers/test/sharedWorker_sharedWorker.js
--- a/dom/workers/test/sharedWorker_sharedWorker.js
+++ b/dom/workers/test/sharedWorker_sharedWorker.js
@@ -67,20 +67,20 @@ onconnect = function(event) {
   }
   if (!(event.ports[0] == event.source)) {
     throw new Error("'connect' event source property is incorrect!");
   }
   if (event.data) {
     throw new Error("'connect' event has data: " + event.data);
   }
 
-  // "".contains("") should trigger a warning in debug builds, but NOT fire
-  // error events at us.  If we ever actually remove contains() we'll need
-  // something else to test this case.
-  "".contains("");
+  // The expression closures should trigger a warning in debug builds, but NOT
+  // fire error events at us. If we ever actually remove expression closures
+  // (in bug 1083458), we'll need something else to test this case.
+  (function() "Expected console warning: expression closures are deprecated");
 
   event.ports[0].onmessage = function(event) {
     if (!(event instanceof MessageEvent)) {
       throw new Error("'message' event is not a MessageEvent!");
     }
     if (!("ports" in event)) {
       throw new Error("'message' event doesn't have a 'ports' property!");
     }