Bug 1217250 - Fix some IPDL tests that were broken by bug 1212027; r=froydnj
authorAaron Klotz <aklotz@mozilla.com>
Wed, 21 Oct 2015 20:44:34 -0400
changeset 304369 2353ad287e4dfe7018d54c5e223eee73d59663d0
parent 304368 b8ca53e9a3a02d9dcbaf7da16b6f0b3c36671743
child 304370 d26c5883da8e9ccf62722cf34f455bbf3a5be8f8
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1217250, 1212027
milestone44.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 1217250 - Fix some IPDL tests that were broken by bug 1212027; r=froydnj
ipc/ipdl/test/cxx/TestManyChildAllocs.cpp
ipc/ipdl/test/cxx/TestMultiMgrs.cpp
--- a/ipc/ipdl/test/cxx/TestManyChildAllocs.cpp
+++ b/ipc/ipdl/test/cxx/TestManyChildAllocs.cpp
@@ -71,17 +71,17 @@ bool TestManyChildAllocsChild::RecvGo()
 
         if (!child)
             fail("can't send ctor()");
 
         if (!child->SendHello())
             fail("can't send Hello()");
     }
 
-    size_t len = ManagedPTestManyChildAllocsSubChild().Length();
+    size_t len = ManagedPTestManyChildAllocsSubChild().Count();
     if (NALLOCS != len)
         fail("expected %lu kids, got %lu", NALLOCS, len);
 
     if (!SendDone())
         fail("can't send Done()");
 
     return true;
 }
--- a/ipc/ipdl/test/cxx/TestMultiMgrs.cpp
+++ b/ipc/ipdl/test/cxx/TestMultiMgrs.cpp
@@ -1,11 +1,12 @@
 #include "TestMultiMgrs.h"
 
 #include "IPDLUnitTests.h"      // fail etc.
+#include "mozilla/ipc/ProtocolUtils.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 //-----------------------------------------------------------------------------
 // parent
 
 void
@@ -65,27 +66,27 @@ TestMultiMgrsRightChild::RecvPTestMultiM
 {
     static_cast<TestMultiMgrsChild*>(Manager())->mBottomR = actor;
     return true;
 }
 
 bool
 TestMultiMgrsChild::RecvCheck()
 {
-    if (1 != ManagedPTestMultiMgrsLeftChild().Length())
+    if (1 != ManagedPTestMultiMgrsLeftChild().Count())
         fail("where's leftie?");
-    if (1 != ManagedPTestMultiMgrsRightChild().Length())
+    if (1 != ManagedPTestMultiMgrsRightChild().Count())
         fail("where's rightie?");
 
     TestMultiMgrsLeftChild* leftie =
         static_cast<TestMultiMgrsLeftChild*>(
-            ManagedPTestMultiMgrsLeftChild()[0]);
+            LoneManagedOrNull(ManagedPTestMultiMgrsLeftChild()));
     TestMultiMgrsRightChild* rightie =
         static_cast<TestMultiMgrsRightChild*>(
-            ManagedPTestMultiMgrsRightChild()[0]);
+            LoneManagedOrNull(ManagedPTestMultiMgrsRightChild()));
 
     if (!leftie->HasChild(mBottomL))
         fail("leftie didn't have a child it was supposed to!");
     if (leftie->HasChild(mBottomR))
         fail("leftie had rightie's child!");
 
     if (!rightie->HasChild(mBottomR))
         fail("rightie didn't have a child it was supposed to!");