SoftwareTesting:Tools:jsshHowTo: Difference between revisions

 
(5 intermediate revisions by the same user not shown)
Line 8: Line 8:


firefox 1.5 with jssh - built with mozconfig
firefox 1.5 with jssh - built with mozconfig
see [http://developer.mozilla.org/en/docs/Build_Documentation Build Documentation] for more details


<pre>. $topsrcdir/browser/config/mozconfig
<pre>. $topsrcdir/browser/config/mozconfig


mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=@topsrcdir@/../objdir/browser
mk_add_options MOZ_OBJDIR=@topsrcdir@/../objdir/browser
# mk_add_options MOZ_CO_MODULE=mozilla/js/tests
# mk_add_options MOZ_CO_MODULE=mozilla/js/tests
Line 30: Line 33:
checkout source via make
checkout source via make


<pre>make -f client.mk checkout</pre>
<pre>make -f client.mk checkout MOZ_CO_PROJECT=browser</pre>


add jssh extension to source
add jssh extension to source


<pre>cvs co -D 2006-04-15 mozilla/extensions/jsshcvs checkout: Updating mozilla/extensions/jssh</pre>
<pre>cvs co -D 2006-04-15 mozilla/extensions/jssh</pre>


modify the mozilla/browser/config/mozconfig file with the above extensions modifications.
modify the mozilla/browser/config/mozconfig file with the above extensions modifications.
Line 40: Line 43:
build the package
build the package


<pre>make client.mk build</pre>
<pre>make -f client.mk build</pre>


python test harness and jssh driver
python test harness and jssh driver
Line 46: Line 49:
[http://people.mozilla.org/~davel/test_harness_spike/ JSSH Test Harness Spike]
[http://people.mozilla.org/~davel/test_harness_spike/ JSSH Test Harness Spike]
[[Category:SoftwareTesting]]
[[Category:SoftwareTesting]]
==Patching==
To build on the lastest MOZILLA_1_8_BRANCH I had to make the following changes
<pre>
Index: nsJSSh.cpp
===================================================================
RCS file: /cvsroot/mozilla/extensions/jssh/nsJSSh.cpp,v
retrieving revision 1.3
diff -u -r1.3 nsJSSh.cpp
--- nsJSSh.cpp  31 Mar 2006 04:40:59 -0000  1.3
+++ nsJSSh.cpp  4 Feb 2007 19:14:32 -0000
@@ -40,10 +40,11 @@
#include "nsIJSRuntimeService.h"
#include "nsIServiceManager.h"
#include "nsIXPConnect.h"
+#include "nsMemory.h"
#include "nsIProxyObjectManager.h"
#include "nsIEventQueueService.h"
#include "nsIScriptSecurityManager.h"
-#include "nsDependentString.h"
+#include "nsServiceManagerUtils.h"
#include "nsIIOService.h"
#include "nsNetCID.h"
#include "nsIChannel.h"
Index: nsJSSh.h
===================================================================
RCS file: /cvsroot/mozilla/extensions/jssh/nsJSSh.h,v
retrieving revision 1.3
diff -u -r1.3 nsJSSh.h
--- nsJSSh.h  31 Mar 2006 04:40:59 -0000  1.3
+++ nsJSSh.h  4 Feb 2007 19:14:32 -0000
@@ -47,7 +47,7 @@
#include "nsIJSSh.h"
#include "nsIJSContextStack.h"
#include "nsIPrincipal.h"
-#include "nsString.h"
+#include "nsStringAPI.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIXPCScriptable.h"
Index: nsJSShServer.cpp
===================================================================
RCS file: /cvsroot/mozilla/extensions/jssh/nsJSShServer.cpp,v
retrieving revision 1.3
diff -u -r1.3 nsJSShServer.cpp
--- nsJSShServer.cpp  31 Mar 2006 04:40:59 -0000  1.3
+++ nsJSShServer.cpp  4 Feb 2007 19:14:32 -0000
@@ -40,6 +40,7 @@
#include "nsNetCID.h"
#include "nsISocketTransport.h"
#include "nsIComponentManager.h"
+#include "nsComponentManagerUtils.h"
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsIThread.h"
@@ -197,7 +198,7 @@
    mServerSocket->Close();
  mServerSocket = nsnull;
  mServerPort = 0;
-  mServerStartupURI.Truncate();
+  mServerStartupURI.SetLength(0);
  mServerLoopbackOnly = PR_FALSE;
  return NS_OK;
}
Index: nsJSShServer.h
===================================================================
RCS file: /cvsroot/mozilla/extensions/jssh/nsJSShServer.h,v
retrieving revision 1.3
diff -u -r1.3 nsJSShServer.h
--- nsJSShServer.h  31 Mar 2006 04:40:59 -0000  1.3
+++ nsJSShServer.h  4 Feb 2007 19:14:32 -0000
@@ -42,7 +42,7 @@
#include "nsIJSShServer.h"
#include "nsCOMPtr.h"
#include "nsIServerSocket.h"
-#include "nsString.h"
+#include "nsStringAPI.h"
class nsJSShServer : public nsIJSShServer
{
</pre>
8

edits