예제 #1
0
void MemoryCacheCorrectnessTestHelper::TearDown() {
  memoryCache()->evictResources();

  // Yield the ownership of the global memory cache back.
  replaceMemoryCacheForTesting(m_globalMemoryCache.release());

  setTimeFunctionsForTesting(m_originalTimeFunction);
}
예제 #2
0
void MemoryCacheCorrectnessTestHelper::SetUp() {
  // Save the global memory cache to restore it upon teardown.
  m_globalMemoryCache = replaceMemoryCacheForTesting(MemoryCache::create());

  m_fetcher = ResourceFetcher::create(
      MockFetchContext::create(MockFetchContext::kShouldNotLoadNewResource));

  s_timeElapsed = 0.0;
  m_originalTimeFunction = setTimeFunctionsForTesting(returnMockTime);
}
 virtual void SetUp()
 {
     s_timeElapsed = 0.0;
     m_originalTimeFunction = setTimeFunctionsForTesting(returnMockTime);
 }
 virtual void TearDown()
 {
     setTimeFunctionsForTesting(m_originalTimeFunction);
 }
예제 #5
0
 void TearDown() override {
   setTimeFunctionsForTesting(m_originalTimeFunction);
 }