Bug 1317400 - Part 4: Fix other tests. r=till
authorTooru Fujisawa <arai_a@mac.com>
Sat, 04 Mar 2017 20:37:14 +0900
changeset 375043 8f67f1b9a60116970d7cbb689ec610710cdab9b2
parent 375042 9c0990f1b73b188c82fd712c55a0d3c19af7ee52
child 375044 88471e975cc350b28cc8ea651dbe7033db697ccd
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1317400
milestone54.0a1
Bug 1317400 - Part 4: Fix other tests. r=till
mobile/android/components/extensions/test/mochitest/test_ext_tabs_captureVisibleTab.html
testing/web-platform/tests/webstorage/storage_string_conversion.html
toolkit/modules/tests/xpcshell/test_Log.js
--- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_captureVisibleTab.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_captureVisibleTab.html
@@ -140,17 +140,17 @@ add_task(function* testCaptureVisibleTab
 });
 
 add_task(function* testCaptureVisibleTabPermissions() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
-    background() {
+    background: function() {
       browser.test.assertEq(undefined, browser.tabs.captureVisibleTab,
                             'Extension without "<all_urls>" permission should not have access to captureVisibleTab');
       browser.test.notifyPass("captureVisibleTabPermissions");
     },
   });
 
   yield extension.startup();
 
--- a/testing/web-platform/tests/webstorage/storage_string_conversion.html
+++ b/testing/web-platform/tests/webstorage/storage_string_conversion.html
@@ -17,30 +17,30 @@
 
         assert_equals(storage.length, 0);
 
         storage.a = null;
         assert_equals(storage.a, "null");
         storage.b = 0;
         assert_equals(storage.b, "0");
         storage.c = function(){};
-        assert_equals(storage.c, "function (){}");
+        assert_equals(storage.c, "function(){}");
 
         storage.setItem('d', null);
         assert_equals(storage.d, "null");
         storage.setItem('e', 0);
         assert_equals(storage.e, "0");
         storage.setItem('f', function(){});
-        assert_equals(storage.f, "function (){}");
+        assert_equals(storage.f, "function(){}");
 
         storage['g'] = null;
         assert_equals(storage.g, "null");
         storage['h'] = 0;
         assert_equals(storage.h, "0");
         storage['i'] = function(){};
-        assert_equals(storage.f, "function (){}");
+        assert_equals(storage.f, "function(){}");
 
     }, name + " only stores strings");
 });
 
 </script>
 </body>
 </html>
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ b/toolkit/modules/tests/xpcshell/test_Log.js
@@ -376,22 +376,22 @@ add_task(function* log_message_with_para
   ob.toJSON = function() {return {sneaky: "value"}};
   do_check_eq(formatMessage("JSON is ${sub}", {sub: ob}),
               'JSON is {"sneaky":"value"}');
 
   // Fall back to .toSource() if JSON.stringify() fails on an object.
   ob = function() {};
   ob.toJSON = function() {throw "oh noes JSON"};
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
-              "Fail is (function () {})");
+              "Fail is (function() {})");
 
   // Fall back to .toString if both .toJSON and .toSource fail.
   ob.toSource = function() {throw "oh noes SOURCE"};
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
-              "Fail is function () {}");
+              "Fail is function() {}");
 
   // Fall back to '[object]' if .toJSON, .toSource and .toString fail.
   ob.toString = function() {throw "oh noes STRING"};
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
               "Fail is [object]");
 
   // If params are passed but there are no substitution in the text
   // we JSON format and append the entire parameters object.
@@ -446,17 +446,17 @@ add_task(function* log_message_with_para
   str = formatMessage(null, new String("String in place of params"));
   do_check_eq(str, "String in place of params");
 
   // We use object.valueOf() internally; make sure a broken valueOf() method
   // doesn't cause the logger to fail.
   /* eslint-disable object-shorthand */
   let vOf = {a: 1, valueOf: function() {throw "oh noes valueOf"}};
   do_check_eq(formatMessage("Broken valueOf ${}", vOf),
-              'Broken valueOf ({a:1, valueOf:(function () {throw "oh noes valueOf"})})');
+              'Broken valueOf ({a:1, valueOf:(function() {throw "oh noes valueOf"})})');
   /* eslint-enable object-shorthand */
 
   // Test edge cases of bad data to formatter:
   // If 'params' is not an object, format it as a basic type.
   do_check_eq(formatMessage("non-object no subst", 1),
               "non-object no subst: 1");
   do_check_eq(formatMessage("non-object all subst ${}", 2),
               "non-object all subst 2");