diff --git a/mozilla/extensions/layout-debug/idl/nsIDebugObject.idl b/mozilla/extensions/layout-debug/idl/nsIDebugObject.idl index 52b563b0c2a..e3c9f83b520 100644 --- a/mozilla/extensions/layout-debug/idl/nsIDebugObject.idl +++ b/mozilla/extensions/layout-debug/idl/nsIDebugObject.idl @@ -48,7 +48,7 @@ interface nsIDebugObject : nsISupports * @param * @param */ - void DumpContent(in nsISupports aUrlToDump,in wstring aFilePath,in wstring aFileName); + void DumpContent(in nsISupports aUrlToDump,in wstring aFilePath,in wstring aFileName, in unsigned long aFlags); /** * Compares the contents of frame model files diff --git a/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.h b/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.h index 27218567566..0505bbac764 100644 --- a/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.h +++ b/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.h @@ -30,8 +30,8 @@ class NS_NO_VTABLE nsIDebugPlugin : public nsISupports { /* readonly attribute string version; */ NS_IMETHOD GetVersion(char * *aVersion) = 0; - /* void DumpLayout (in nsISupports aWindow, in wstring aFilePath, in wstring aFileName, [retval] out long aResult); */ - NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aResult) = 0; + /* void DumpLayout (in nsISupports aWindow, in wstring aFilePath, in wstring aFileName, in unsigned long aFlags, [retval] out long aResult); */ + NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags, PRInt32 *aResult) = 0; /* void StartDirectorySearch (in string aFilePath); */ NS_IMETHOD StartDirectorySearch(const char *aFilePath) = 0; @@ -47,7 +47,7 @@ class NS_NO_VTABLE nsIDebugPlugin : public nsISupports { /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIDEBUGPLUGIN \ NS_IMETHOD GetVersion(char * *aVersion); \ - NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aResult); \ + NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags, PRInt32 *aResult); \ NS_IMETHOD StartDirectorySearch(const char *aFilePath); \ NS_IMETHOD GetNextFileInDirectory(char **aFileName); \ NS_IMETHOD CompareLayoutFiles(const PRUnichar *aBasePath, const PRUnichar *aVerPath, const PRUnichar *aBaseFile, const PRUnichar *aVerFile, PRUint32 aFlags, PRInt32 *aResult); @@ -55,7 +55,7 @@ class NS_NO_VTABLE nsIDebugPlugin : public nsISupports { /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIDEBUGPLUGIN(_to) \ NS_IMETHOD GetVersion(char * *aVersion) { return _to GetVersion(aVersion); } \ - NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aResult) { return _to DumpLayout(aWindow, aFilePath, aFileName, aResult); } \ + NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags, PRInt32 *aResult) { return _to DumpLayout(aWindow, aFilePath, aFileName, aFlags, aResult); } \ NS_IMETHOD StartDirectorySearch(const char *aFilePath) { return _to StartDirectorySearch(aFilePath); } \ NS_IMETHOD GetNextFileInDirectory(char **aFileName) { return _to GetNextFileInDirectory(aFileName); } \ NS_IMETHOD CompareLayoutFiles(const PRUnichar *aBasePath, const PRUnichar *aVerPath, const PRUnichar *aBaseFile, const PRUnichar *aVerFile, PRUint32 aFlags, PRInt32 *aResult) { return _to CompareLayoutFiles(aBasePath, aVerPath, aBaseFile, aVerFile, aFlags, aResult); } @@ -63,7 +63,7 @@ class NS_NO_VTABLE nsIDebugPlugin : public nsISupports { /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIDEBUGPLUGIN(_to) \ NS_IMETHOD GetVersion(char * *aVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVersion(aVersion); } \ - NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->DumpLayout(aWindow, aFilePath, aFileName, aResult); } \ + NS_IMETHOD DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags, PRInt32 *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->DumpLayout(aWindow, aFilePath, aFileName, aFlags, aResult); } \ NS_IMETHOD StartDirectorySearch(const char *aFilePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartDirectorySearch(aFilePath); } \ NS_IMETHOD GetNextFileInDirectory(char **aFileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextFileInDirectory(aFileName); } \ NS_IMETHOD CompareLayoutFiles(const PRUnichar *aBasePath, const PRUnichar *aVerPath, const PRUnichar *aBaseFile, const PRUnichar *aVerFile, PRUint32 aFlags, PRInt32 *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareLayoutFiles(aBasePath, aVerPath, aBaseFile, aVerFile, aFlags, aResult); } @@ -103,8 +103,8 @@ NS_IMETHODIMP nsDebugPlugin::GetVersion(char * *aVersion) return NS_ERROR_NOT_IMPLEMENTED; } -/* void DumpLayout (in nsISupports aWindow, in wstring aFilePath, in wstring aFileName, [retval] out long aResult); */ -NS_IMETHODIMP nsDebugPlugin::DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aResult) +/* void DumpLayout (in nsISupports aWindow, in wstring aFilePath, in wstring aFileName, in unsigned long aFlags, [retval] out long aResult); */ +NS_IMETHODIMP nsDebugPlugin::DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags, PRInt32 *aResult) { return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.idl b/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.idl index 03dbb6e59d1..6ecc07295f1 100644 --- a/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.idl +++ b/mozilla/extensions/layout-debug/plugin/nsIDebugPlugin.idl @@ -25,7 +25,7 @@ [scriptable, uuid(482e1890-1fe5-11d5-9cf8-0060b0fbd8ac)] interface nsIDebugPlugin : nsISupports { readonly attribute string version; - void DumpLayout(in nsISupports aWindow,in wstring aFilePath,in wstring aFileName,[retval] out long aResult ); + void DumpLayout(in nsISupports aWindow,in wstring aFilePath,in wstring aFileName,in unsigned long aFlags,[retval] out long aResult ); void StartDirectorySearch(in string aFilePath); void GetNextFileInDirectory([retval] out string aFileName); void CompareLayoutFiles(in wstring aBasePath,in wstring aVerPath,in wstring aBaseFile,in wstring aVerFile,in unsigned long aFlags,[retval] out long aResult); diff --git a/mozilla/extensions/layout-debug/plugin/nsScriptablePeer.cpp b/mozilla/extensions/layout-debug/plugin/nsScriptablePeer.cpp index 89f0e071f4b..1d2829028ea 100644 --- a/mozilla/extensions/layout-debug/plugin/nsScriptablePeer.cpp +++ b/mozilla/extensions/layout-debug/plugin/nsScriptablePeer.cpp @@ -117,13 +117,14 @@ NS_IMETHODIMP nsScriptablePeer::GetVersion(char * *aVersion) return NS_OK; } -NS_IMETHODIMP nsScriptablePeer::DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aResult) +NS_IMETHODIMP nsScriptablePeer::DumpLayout(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, + PRUint32 aFlags, PRInt32 *aResult) { nsresult rv = NS_OK; PRBool retVal; if (mPlugin){ - mPlugin->OutPutLayoutFrames(aWindow,aFilePath,aFileName,&retVal); + mPlugin->OutPutLayoutFrames(aWindow,aFilePath,aFileName,aFlags,&retVal); if (retVal == NS_OK) { *aResult= 0; } else { diff --git a/mozilla/extensions/layout-debug/plugin/plugin.cpp b/mozilla/extensions/layout-debug/plugin/plugin.cpp index 2d500023bb3..42f227704c1 100644 --- a/mozilla/extensions/layout-debug/plugin/plugin.cpp +++ b/mozilla/extensions/layout-debug/plugin/plugin.cpp @@ -175,7 +175,7 @@ void nsPluginInstance::getVersion(char* *aVersion) //----------------------------------------------------- -void nsPluginInstance::OutPutLayoutFrames(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aRetVal) +void nsPluginInstance::OutPutLayoutFrames(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags , PRInt32 *aRetVal) { nsIDebugObject *theDebugObject=NULL; @@ -185,7 +185,7 @@ void nsPluginInstance::OutPutLayoutFrames(nsISupports *aWindow, const PRUnichar // get service using its contract id and use it to allocate the memory gServiceManager->GetServiceByContractID("@mozilla.org/debug/debugobject;1", NS_GET_IID(nsIDebugObject), (void **)&theDebugObject); if(theDebugObject){ - *aRetVal = theDebugObject->DumpContent(aWindow,aFilePath,aFileName); + *aRetVal = theDebugObject->DumpContent(aWindow,aFilePath,aFileName,aFlags); } } } diff --git a/mozilla/extensions/layout-debug/plugin/plugin.h b/mozilla/extensions/layout-debug/plugin/plugin.h index 575372855b5..52562118157 100644 --- a/mozilla/extensions/layout-debug/plugin/plugin.h +++ b/mozilla/extensions/layout-debug/plugin/plugin.h @@ -61,9 +61,9 @@ public: // locals void getVersion(char* *aVersion); - void OutPutLayoutFrames(nsISupports *aWindow,const PRUnichar *aFilePath, const PRUnichar *aFileName, PRInt32 *aRetVal); + void OutPutLayoutFrames(nsISupports *aWindow,const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags, PRInt32 *aRetVal); void CompareLayoutFrames(const PRUnichar *aBasePath, const PRUnichar *aVerPath, - const PRUnichar *aBaseFile, const PRUnichar *aVerFile, PRUint32 aFlags, PRInt32 *aRetVal); + const PRUnichar *aBaseFile, const PRUnichar *aVerFile, PRUint32 aFlags, PRInt32 *aRetVal); void StartDirectorySearch(const char *aFilePath); void GetNextFileInDirectory(char **aFilePath); nsIDebugPlugin* getScriptablePeer(); diff --git a/mozilla/extensions/layout-debug/plugin/test.html b/mozilla/extensions/layout-debug/plugin/test.html index 739be1882e8..528a35c209a 100644 --- a/mozilla/extensions/layout-debug/plugin/test.html +++ b/mozilla/extensions/layout-debug/plugin/test.html @@ -8,7 +8,7 @@
-

Example XPConnect Scriptable Debug Plug-in Regression Page

+

Example XPConnect Scriptable Debug Plug-in Regression Page


@@ -23,74 +23,162 @@ var verExt; var baseDir; var verDir; var testType; -var compare; +var changed = false; +var lb,mb,pb,sb,stb,tb; +var origLeft; +var origTop; +var origWidth; +var origHeight; +var dirType; +var curIndex; -function CompareFiles(baseDir,verDir,baselineFile,verFile) + +var myArray = new Array(9); + myArray[0] = "file:///S|/mozilla/layout/html/tests/table/dom"; + myArray[1] = "s:/regressiontests/"; + myArray[2] = "s:/regressiontests/"; + + myArray[3] = "file:///S|/mozilla/layout/html/tests/table/core"; + myArray[4] = "s:/regressiontests/"; + myArray[5] = "s:/regressiontests/"; + + myArray[6] = "file:///S|/mozilla/layout/html/tests/table/images"; + myArray[7] = "s:/regressiontests/"; + myArray[8] = "s:/regressiontests/"; + + + +//============================================================================= + + +function CompareFiles(aBaseDir,aVerDir,aBaselineFile,aVerFile) { - err = embed.CompareLayoutFiles(baseDir,verDir,baselineFile,verFile,1); + err = embed.CompareLayoutFiles(aBaseDir,aVerDir,aBaselineFile,aVerFile,1); if(err == 0) { - WriteOutput(baselineFile,false,true); + WriteOutput("File \" "+aVerFile + "\" PASSED",false,"success",true,true ); } else { - WriteOutput(baselineFile + " FAILED ",false,false); + WriteOutput("File \" "+aVerFile + "\" FAILED ",false,"failure",true,true ); } } +//============================================================================= -function WriteOutput( Text, Replace, Success ) +function ClearOutput() +{ + textarea = document.getElementById('output'); + textarea.innerHTML = ""; +} + +//============================================================================= + +function WriteOutput( aText, aReplace, aTextColor,aToStatus, aToOutPut ) { textarea = document.getElementById('output'); statusarea = document.getElementById('status'); - if(Success){ - statusarea.innerHTML = "" + Text +""; - } else { - statusarea.innerHTML = "" + Text + ""; + thecolor = ""; + if(aTextColor == "failure") + thecolor = ""; + if(aTextColor == "success") + thecolor = ""; + + if ( aToStatus ) { + statusarea.innerHTML = thecolor + aText +""; } - - if( Replace ) { - if(Success){ - textarea.innerHTML = "" + Text +""; + if (aToOutPut) { + if( aReplace ) { + textarea.innerHTML = thecolor + aText +""; } else { - textarea.innerHTML = "" + Text + ""; - } - } else { - if(Success){ - textarea.innerHTML = "" + textarea.innerHTML + "
" + Text+"
"; - } else { - textarea.innerHTML = "" + textarea.innerHTML + "
" + Text + "
"; + textarea.innerHTML = thecolor + textarea.innerHTML + "
" + aText +"
"; } } } -function placeWindows(outputWindow,newWindow) +//============================================================================= + +function RestoreWindow() { - height = window.screen.availHeight/2; - width = window.screen.availWidth; - top = window.screen.availTop; - left = window.screen.availLeft; - - outputWindow.focus(); - outputWindow.moveTo(left,top); - outputWindow.resizeTo(width,height); - - newWindow.resizeTo(width,height); - newWindow.moveTo(left,height); - - - outputWindow.focus(); - yamount = outputWindow.pageYOffset; - xamount = outputWindow.pageXOffset; - - outputWindow.scroll(-xamount,-yamount); + if (changed) { + window.moveTo(origLeft,origTop); + window.resizeTo(origWidth,origHeight); + window.locationbar.visible = lb; + window.menubar.visible = mb; + window.personalbar.visible = pb; + window.scrollbars.visible = sb; + window.statusbar.visible = stb; + window.toolbar.visible = tb; + outputWindow.moveTo(origLeft,origTop); + outputWindow.resizeTo(origWidth,origHeight); + changed = false; + } } +//============================================================================= -function DumpFrames1(firstTime,lastFile) +function placeWindows(aOutputWindow,aTestWindow) +{ + // save old values, get rid of chrome and move and resize the windows + if ( changed == false ) { + lb = aOutputWindow.locationbar.visible; + mb = aOutputWindow.menubar.visible; + pb = aOutputWindow.personalbar.visible; + sb = aOutputWindow.scrollbars.visible; + stb = aOutputWindow.statusbar.visible; + tb = aOutputWindow.toolbar.visible; + aOutputWindow.focus(); + origLeft = aOutputWindow.screen.left; + origTop = aOutputWindow.screen.top; + origWidth = aOutputWindow.outerWidth; + origHeight = aOutputWindow.outerHeight; + changed = true; + } + + aOutputWindow.locationbar.visible = false; + aOutputWindow.menubar.visible = false; + aOutputWindow.personalbar.visible = false; + aOutputWindow.scrollbars.visible = false; + aOutputWindow.statusbar.visible = false; + aOutputWindow.toolbar.visible = false; + aTestWindow.locationbar.visible = false; + aTestWindow.menubar.visible = false; + aTestWindow.personalbar.visible = false; + aTestWindow.scrollbars.visible = false; + aTestWindow.statusbar.visible = false; + aTestWindow.toolbar.visible = false; + + + top = window.screen.availTop; + left = window.screen.availLeft; + height = window.screen.availHeight; + width = window.screen.availWidth; + if (height > 1000) { + height = 800; + } else { + height = height - 200; + } + if (width > 800) { + width = 800; + } + + // size the window to the largest possible + aTestWindow.moveTo(left,200); + aTestWindow.resizeTo(width,height); + + aOutputWindow.focus(); + + aOutputWindow.moveTo(left,top); + aOutputWindow.resizeTo(width,200); + aOutputWindow.scroll(0,1000); +} + +//============================================================================= + +function DumpFrames1(aFirstTime,aLastFile) { outputWindow = window; @@ -98,36 +186,68 @@ function DumpFrames1(firstTime,lastFile) placeWindows(outputWindow,newWindow); +WriteOutput( "Starting Tests",true,"normal",true,false ); +WriteOutput( "1",false,"normal",false,true ); +WriteOutput( "2",false,"normal" ,false,true ); +WriteOutput( "3",false,"failure" ,false,true ); +WriteOutput( "4",false,"success" ,false,true ); +WriteOutput( "5",false,"normal" ,false,true ); +WriteOutput( "6",false,"success" ,false,true ); +WriteOutput( "7",false,"success" ,false,true ); +WriteOutput( "asf",false,"normal" ,false,true ); +WriteOutput( "7",false,"failure" ,false,true ); +WriteOutput( "asdf",false,"success" ,false,true ); +WriteOutput( "wre",false,"normal" ,false,true ); +WriteOutput( "wfw",false,"success" ,false,true ); +WriteOutput( "jhgj",false,"success" ,false,true ); +WriteOutput( "gjghj",false,"normal" ,false,true ); +WriteOutput( "rtj",false,"failure" ,false,true ); - - - -WriteOutput( "Starting Tests",true,true ); -WriteOutput( "1",false,true ); -WriteOutput( "2",false,true ); -WriteOutput( "3",false,false ); -WriteOutput( "4",false,true ); -WriteOutput( "5",false,false ); -WriteOutput( "6",false,true ); -WriteOutput( "7",false,true ); -WriteOutput( "asf",false,false ); -WriteOutput( "7",false,true ); -WriteOutput( "asdf",false,false ); -WriteOutput( "wre",false,true ); -WriteOutput( "wfw",false,true ); -WriteOutput( "jhgj",false,false ); -WriteOutput( "gjghj",false,true ); -WriteOutput( "rtj",false,false ); +RestoreWindow(); } +//============================================================================= -function DumpFrames(firstTime,lastFile) +function ShowDirectories() { -var loadingFlag; - if (firstTime == true) { - WriteOutput( "Starting Tests",true,true ); + for(i=0;i<(myArray.length);i+=3){ + WriteOutput( myArray[i], false, "normal" ,false,true ); + } + +} + +//============================================================================= + +function runTests() +{ + + if (document.getElementById('sd').checked ) { + // single directory + dirType = 1; + } else { + // directory list + dirType = 2; + } + + // three buttons we use to check the kind of test we run (rb rv rvc) + if (document.getElementById('rb').checked ) { + // baseline + testType = 1; + } else if (document.getElementById('rv').checked ) { + // verify + testType = 2; + } else if (document.getElementById('rvc').checked ) { + // verify and compare + testType = 3; + } else if (document.getElementById('rc').checked ) { + testType = 4; + } + + if ( dirType == 1 ) { + ClearOutput(); + WriteOutput( "Starting Single Directory Tests",true,"normal",true,false ); // first verify all the fields are set up correctly fileDirectory = document.TestForm.RegTestDir.value; @@ -135,22 +255,55 @@ var loadingFlag; verExt = document.TestForm.verExt.value; baseDir = document.TestForm.baseDir.value; verDir = document.TestForm.verDir.value; - testType = document.getElementById('bl').checked; - if(testType){ - // never compare if doing baseline - compare = false; - } else { - // get the checkbox value - compare = document.getElementById('comp').checked; - } - //var filedirectory = "file:///S|/mozilla/layout/html/tests/table/dom"; + DumpFrames(true,0,testType); + } else if (dirType == 2) { + ClearOutput(); + WriteOutput( "Starting Directory Tests",true,"normal",true,false ); + curIndex = 0; + DumpDirectoryies(testType,0); + } +} + +//============================================================================= + +function DumpDirectoryies(aTestType) +{ + + if ( curIndex == 0) { + WriteOutput( "Starting Tests",true,"normal",true,false ); + } + + if ( curIndex < myArray.length ) { + fileDirectory = myArray[curIndex]; + baseDir = myArray[curIndex+1]; + verDir = myArray[curIndex+2]; + baseExt = document.TestForm.baseExt.value; + verExt = document.TestForm.verExt.value; + WriteOutput( "New Directory" , false, "normal" ,true, true ); + DumpFrames(true,0,aTestType); + } else { + // all completed + theWindow.close(); + RestoreWindow(); + } +} + +//============================================================================= + +function DumpFrames(firstTime,lastFile,aTestType) +{ +var loadingFlag; + + if (firstTime == true) { + ClearOutput(); + WriteOutput( "Starting Tests",true,"normal",true,false ); + embed.StartDirectorySearch(fileDirectory); filename=embed.GetNextFileInDirectory(); - if( filename != null) { - outputWindow = window; - theWindow = window.open(filename); + if ( filename != null) { outputWindow = window; + theWindow = window.open(filename,0); placeWindows(outputWindow,theWindow); } started = true; @@ -163,117 +316,168 @@ var loadingFlag; var startindex = filename.lastIndexOf("/"); var outputfilename = filename.slice(startindex+1,filename.length); - if (testType) { - // if checked..since we check the baseline radio button.. this is baseline + if (aTestType==1) { + // baseline outputfilename = outputfilename.replace (".html",baseExt); - loading = embed.DumpLayout(theWindow,baseDir,outputfilename); - } else { + loading = embed.DumpLayout(theWindow,baseDir,outputfilename,0); + } else if ((aTestType==2)|| (aTestType==3) ) { + // verify outputfilename = outputfilename.replace (".html",verExt); - loading = embed.DumpLayout(theWindow,verDir,outputfilename); + loading = embed.DumpLayout(theWindow,verDir,outputfilename,0); + } else if (aTestType==4) { + // just compare + outputfilename = outputfilename.replace (".html",verExt); + loading = 0; } if (loading != 0) { - setTimeout("DumpFrames(false,filename)",1000); + testtype = aTestType; + setTimeout("DumpFrames(false,filename,testtype)",1000); break; } else { - if(compare){ + if ( aTestType<4 ){ + WriteOutput("Writing File " + "\""+outputfilename+"\"",false,"success",true,true ); + } + + if ( (aTestType==3) || (aTestType==4) ){ baseline = outputfilename.replace (verExt,baseExt); CompareFiles(baseDir,verDir,baseline,outputfilename); } filename=embed.GetNextFileInDirectory(); - if( filename != null) { + if ( filename != null) { theWindow.location = filename; } else { // all complete - theWindow.close(); + if (dirType == 1) { + theWindow.close(); + RestoreWindow(); + } else { + curIndex+=3; + DumpDirectoryies(aTestType); + } } } } } +//============================================================================= + +
-

OUTPUT IDLE

-
-
-
+ - + - - - - - - - + + + + + + + + + + +
- Regression Directory - - -
- BaseLine Extension - - - - Verify Extension - - + + + + + + + + + + + + + + + + + + + + +
+ + Run Regression on a Single Directory +
+ Regression Directory + + +
+ BaseLine Extension + + + + Verify Extension + + +
+ BaseLine Output Directory + + + + Verify Output Directory + + +
+ + + + + +
+ + Run Regression using the directory list + + +
+
+ + + + + - - - - - - - - - - - - - - - - - -
+ Run Baseline + + + Run Verify + + + Run Verify with Compare + + + Run Compare + + -
- BaseLine Output Directory - - - - Verify Output Directory - - -
- Run Baseline - - -
- Run Verify - - - - Compare Now - - - - - - -
- -
+
+ + + +
+ + + + + +

OUTPUT IDLE

+
+
diff --git a/mozilla/extensions/layout-debug/src/nsDebugObject.cpp b/mozilla/extensions/layout-debug/src/nsDebugObject.cpp index 33e711eea61..d89ea7f8946 100644 --- a/mozilla/extensions/layout-debug/src/nsDebugObject.cpp +++ b/mozilla/extensions/layout-debug/src/nsDebugObject.cpp @@ -67,7 +67,7 @@ static NS_DEFINE_IID(kIFrameUtilIID, NS_IFRAME_UTIL_IID); /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ nsDebugObject::nsDebugObject() { @@ -76,7 +76,7 @@ nsDebugObject::nsDebugObject() /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ nsDebugObject::~nsDebugObject() { @@ -85,10 +85,10 @@ nsDebugObject::~nsDebugObject() /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ NS_IMETHODIMP -nsDebugObject::DumpContent(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName) +nsDebugObject::DumpContent(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags) { nsresult result = NS_ERROR_NOT_AVAILABLE; PRUint32 busyFlags; @@ -96,7 +96,6 @@ PRBool stillLoading; nsCOMPtr theInternWindow(do_QueryInterface(aWindow)); if (theInternWindow) { - nsCOMPtr presShell; if (theInternWindow != nsnull) { nsIFrameDebug* fdbg; @@ -121,11 +120,17 @@ PRBool stillLoading; outputPath.AssignWithConversion(aFilePath); outputPath.AppendWithConversion(aFileName); char* filePath = ToNewCString(outputPath); + PRBool dumpStyle=PR_FALSE; + + if(aFlags){ + dumpStyle = PR_TRUE; + } FILE* fp = fopen(filePath, "wt"); presShell->GetPresContext(&thePC); - fdbg->DumpRegressionData(thePC, fp, 0, PR_TRUE); + + fdbg->DumpRegressionData(thePC, fp, 0, dumpStyle); fclose(fp); delete filePath; result = NS_OK; // the document is now loaded, and the frames are dumped. @@ -139,7 +144,7 @@ PRBool stillLoading; /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ NS_IMETHODIMP nsDebugObject::CompareFrameModels(const PRUnichar *aBasePath, const PRUnichar *aVerifyPath, diff --git a/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp b/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp index 33e711eea61..d89ea7f8946 100644 --- a/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp +++ b/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp @@ -67,7 +67,7 @@ static NS_DEFINE_IID(kIFrameUtilIID, NS_IFRAME_UTIL_IID); /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ nsDebugObject::nsDebugObject() { @@ -76,7 +76,7 @@ nsDebugObject::nsDebugObject() /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ nsDebugObject::~nsDebugObject() { @@ -85,10 +85,10 @@ nsDebugObject::~nsDebugObject() /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ NS_IMETHODIMP -nsDebugObject::DumpContent(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName) +nsDebugObject::DumpContent(nsISupports *aWindow, const PRUnichar *aFilePath, const PRUnichar *aFileName, PRUint32 aFlags) { nsresult result = NS_ERROR_NOT_AVAILABLE; PRUint32 busyFlags; @@ -96,7 +96,6 @@ PRBool stillLoading; nsCOMPtr theInternWindow(do_QueryInterface(aWindow)); if (theInternWindow) { - nsCOMPtr presShell; if (theInternWindow != nsnull) { nsIFrameDebug* fdbg; @@ -121,11 +120,17 @@ PRBool stillLoading; outputPath.AssignWithConversion(aFilePath); outputPath.AppendWithConversion(aFileName); char* filePath = ToNewCString(outputPath); + PRBool dumpStyle=PR_FALSE; + + if(aFlags){ + dumpStyle = PR_TRUE; + } FILE* fp = fopen(filePath, "wt"); presShell->GetPresContext(&thePC); - fdbg->DumpRegressionData(thePC, fp, 0, PR_TRUE); + + fdbg->DumpRegressionData(thePC, fp, 0, dumpStyle); fclose(fp); delete filePath; result = NS_OK; // the document is now loaded, and the frames are dumped. @@ -139,7 +144,7 @@ PRBool stillLoading; /** --------------------------------------------------- * See documentation in nsDebugObject.h - * @update 6/21/00 dwc + * @update 5/16/02 dwc */ NS_IMETHODIMP nsDebugObject::CompareFrameModels(const PRUnichar *aBasePath, const PRUnichar *aVerifyPath,