Bug 1315152 - Temporarily change "Test PKCS11 Slot" in pkcs11testmodule.cpp to get MSVC builds working again on non-Western environments. draft
authorCykesiopka <cykesiopka.bmo@gmail.com>
Mon, 07 Nov 2016 20:59:17 +0900
changeset 439596 42f705a3800d626012c9235cdecbe2def80646a9
parent 438818 5e76768327660437bf3486554ad318e4b70276e1
child 439597 d201b4136a52f28cfc3f37fcbbb545c6a6fab99c
push id36057
push usermasayuki@d-toybox.com
push dateWed, 16 Nov 2016 11:17:12 +0000
bugs1315152
milestone53.0a1
Bug 1315152 - Temporarily change "Test PKCS11 Slot" in pkcs11testmodule.cpp to get MSVC builds working again on non-Western environments. MozReview-Commit-ID: LMHLQmRbfHo
security/manager/ssl/tests/unit/pkcs11testmodule/pkcs11testmodule.cpp
security/manager/ssl/tests/unit/test_pkcs11_module.js
security/manager/ssl/tests/unit/test_pkcs11_slot.js
--- a/security/manager/ssl/tests/unit/pkcs11testmodule/pkcs11testmodule.cpp
+++ b/security/manager/ssl/tests/unit/pkcs11testmodule/pkcs11testmodule.cpp
@@ -96,17 +96,17 @@ CK_RV Test_C_GetSlotList(CK_BBOOL limitT
     }
   }
 
   *pulCount = slotCount;
   return CKR_OK;
 }
 
 static const char TestSlotDescription[] = "Test PKCS11 Slot";
-static const char TestSlot2Description[] = "Test PKCS11 Slot 二";
+static const char TestSlot2Description[] = "Test PKCS11 Slot 2";
 
 CK_RV Test_C_GetSlotInfo(CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo)
 {
   if (!pInfo) {
     return CKR_ARGUMENTS_BAD;
   }
 
   switch (slotID) {
--- a/security/manager/ssl/tests/unit/test_pkcs11_module.js
+++ b/security/manager/ssl/tests/unit/test_pkcs11_module.js
@@ -70,17 +70,17 @@ function run_test() {
   // Check that listing the slots for the test module works.
   let slots = testModule.listSlots();
   let testModuleSlotNames = [];
   while (slots.hasMoreElements()) {
     let slot = slots.getNext().QueryInterface(Ci.nsIPKCS11Slot);
     testModuleSlotNames.push(slot.name);
   }
   testModuleSlotNames.sort();
-  const expectedSlotNames = ["Test PKCS11 Slot", "Test PKCS11 Slot 二"];
+  const expectedSlotNames = ["Test PKCS11 Slot", "Test PKCS11 Slot 2"];
   deepEqual(testModuleSlotNames, expectedSlotNames,
             "Actual and expected slot names should be equal");
 
   // Check that finding the test slot by name is possible, and that trying to
   // find a non-present slot fails.
   notEqual(testModule.findSlotByName("Test PKCS11 Slot"), null,
            "Test slot should be findable by name");
   throws(() => testModule.findSlotByName("Not Present"), /NS_ERROR_FAILURE/,
--- a/security/manager/ssl/tests/unit/test_pkcs11_slot.js
+++ b/security/manager/ssl/tests/unit/test_pkcs11_slot.js
@@ -9,21 +9,21 @@
 do_get_profile();
 
 function run_test() {
   loadPKCS11TestModule(false);
 
   let moduleDB = Cc["@mozilla.org/security/pkcs11moduledb;1"]
                    .getService(Ci.nsIPKCS11ModuleDB);
   let testModule = moduleDB.findModuleByName("PKCS11 Test Module");
-  let testSlot = testModule.findSlotByName("Test PKCS11 Slot 二");
+  let testSlot = testModule.findSlotByName("Test PKCS11 Slot 2");
 
-  equal(testSlot.name, "Test PKCS11 Slot 二",
+  equal(testSlot.name, "Test PKCS11 Slot 2",
         "Actual and expected name should match");
-  equal(testSlot.desc, "Test PKCS11 Slot 二",
+  equal(testSlot.desc, "Test PKCS11 Slot 2",
         "Actual and expected description should match");
   equal(testSlot.manID, "Test PKCS11 Manufacturer ID",
         "Actual and expected manufacturer ID should match");
   equal(testSlot.HWVersion, "0.0",
         "Actual and expected hardware version should match");
   equal(testSlot.FWVersion, "0.0",
         "Actual and expected firmware version should match");
   equal(testSlot.status, Ci.nsIPKCS11Slot.SLOT_READY,