Show
Ignore:
Timestamp:
07/16/08 15:55:52 (5 months ago)
Author:
bhenderson
Message:

Added a thirty second hard timeout.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/bhenderson-browser_automation/BrowserAutomation/Automation.cs

    r1675 r1698  
    1313    { 
    1414        private static IE ie; 
     15        private static Firefox firefox; 
    1516 
    1617        /// <summary> 
     
    2829                    ie = new IE(args[1]); 
    2930                } 
     31                if (args[0].Equals("firefox")) 
     32                { 
     33                    firefox = new Firefox(args[1]); 
     34                } 
    3035            } 
    3136        } 
  • honeyclient/branches/exp/bhenderson-browser_automation/BrowserAutomation/BrowserAutomation.csproj

    r1675 r1698  
    4646  </ItemGroup> 
    4747  <ItemGroup> 
     48    <Compile Include="Firefox.cs" /> 
    4849    <Compile Include="IE.cs" /> 
    4950    <Compile Include="Automation.cs" /> 
     
    5152  </ItemGroup> 
    5253  <ItemGroup> 
     54    <COMReference Include="MOZILLACONTROLLib"> 
     55      <Guid>{1339B53E-3453-11D2-93B9-000000000000}</Guid> 
     56      <VersionMajor>1</VersionMajor> 
     57      <VersionMinor>0</VersionMinor> 
     58      <Lcid>0</Lcid> 
     59      <WrapperTool>tlbimp</WrapperTool> 
     60      <Isolated>False</Isolated> 
     61    </COMReference> 
    5362    <COMReference Include="SHDocVw"> 
    5463      <Guid>{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}</Guid> 
  • honeyclient/branches/exp/bhenderson-browser_automation/BrowserAutomation/IE.cs

    r1675 r1698  
    2222        private int navigateCounter; 
    2323        private bool completed; 
     24        private DateTime startTime; 
     25        private TimeSpan duration; 
    2426 
    2527        /// <summary> 
     
    5557                    internetExplorer.Visible = true; 
    5658                    internetExplorer.Navigate(url, ref o, ref o, ref o, ref o); 
    57                     url = null;                       
     59                    url = null; 
     60                    startTime = DateTime.Now; 
    5861                } 
    5962 
    60                 if (completed && (unfinishedDownloads == 0) && !internetExplorer.Busy) 
     63                duration = DateTime.Now - startTime; 
     64 
     65                if(duration.Seconds >= 30) 
    6166                { 
    62                     Thread.Sleep(2000); 
     67                    ieThread.Abort(); 
     68                } 
     69                else 
     70                { 
    6371                    if (completed && (unfinishedDownloads == 0) && !internetExplorer.Busy) 
    6472                    { 
    65                         Thread.Sleep(10000); 
    66                         internetExplorer.Quit(); 
    67                         ieThread.Abort(); 
     73                        Thread.Sleep(2000); 
     74                        if (completed && (unfinishedDownloads == 0) && !internetExplorer.Busy) 
     75                        { 
     76                            Thread.Sleep(10000); 
     77                            internetExplorer.Quit(); 
     78                            ieThread.Abort(); 
     79                        } 
    6880                    } 
    6981                } 
  • honeyclient/branches/exp/bhenderson-browser_automation/BrowserAutomation/obj/Debug/BrowserAutomation.csproj.FileListAbsolute.txt

    r1675 r1698  
    77D:\Work\HoneyClient\BrowserAutomation\BrowserAutomation\obj\Debug\BrowserAutomation.exe 
    88D:\Work\HoneyClient\BrowserAutomation\BrowserAutomation\obj\Debug\BrowserAutomation.pdb 
     9D:\Work\HoneyClient\BrowserAutomation\BrowserAutomation\obj\Debug\Interop.MOZILLACONTROLLib.dll 
     10D:\Work\HoneyClient\BrowserAutomation\BrowserAutomation\bin\Debug\Interop.MOZILLACONTROLLib.dll