Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: Source/platform/graphics/ImageFrameGeneratorTest.cpp

Issue 476683002: Cleanup namespace usage in platform/graphics/[G-S]* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 EXPECT_EQ(1, m_frameBufferRequestCount); 214 EXPECT_EQ(1, m_frameBufferRequestCount);
215 EXPECT_EQ(0, m_decodersDestroyed); 215 EXPECT_EQ(0, m_decodersDestroyed);
216 ImageDecodingStore::instance()->unlockCache(m_generator.get(), tempImage); 216 ImageDecodingStore::instance()->unlockCache(m_generator.get(), tempImage);
217 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries()); 217 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries());
218 EXPECT_EQ(1, ImageDecodingStore::instance()->imageCacheEntries()); 218 EXPECT_EQ(1, ImageDecodingStore::instance()->imageCacheEntries());
219 EXPECT_EQ(1, ImageDecodingStore::instance()->decoderCacheEntries()); 219 EXPECT_EQ(1, ImageDecodingStore::instance()->decoderCacheEntries());
220 220
221 // LocalFrame can now be decoded completely. 221 // LocalFrame can now be decoded completely.
222 setFrameStatus(ImageFrame::FrameComplete); 222 setFrameStatus(ImageFrame::FrameComplete);
223 addNewData(); 223 addNewData();
224 OwnPtr<blink::WebThread> thread = adoptPtr(blink::Platform::current()->creat eThread("DecodeThread")); 224 OwnPtr<WebThread> thread = adoptPtr(Platform::current()->createThread("Decod eThread"));
225 thread->postTask(new Task(WTF::bind(&decodeThreadMain, m_generator.get()))); 225 thread->postTask(new Task(WTF::bind(&decodeThreadMain, m_generator.get())));
226 thread.clear(); 226 thread.clear();
227 227
228 EXPECT_EQ(2, m_frameBufferRequestCount); 228 EXPECT_EQ(2, m_frameBufferRequestCount);
229 EXPECT_EQ(1, m_decodersDestroyed); 229 EXPECT_EQ(1, m_decodersDestroyed);
230 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries()); 230 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries());
231 EXPECT_EQ(2, ImageDecodingStore::instance()->imageCacheEntries()); 231 EXPECT_EQ(2, ImageDecodingStore::instance()->imageCacheEntries());
232 EXPECT_EQ(0, ImageDecodingStore::instance()->decoderCacheEntries()); 232 EXPECT_EQ(0, ImageDecodingStore::instance()->decoderCacheEntries());
233 233
234 tempImage = m_generator->decodeAndScale(fullSize()); 234 tempImage = m_generator->decodeAndScale(fullSize());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // We have tested failures of all stages. This time all allocations 326 // We have tested failures of all stages. This time all allocations
327 // were successful. 327 // were successful.
328 EXPECT_TRUE(image); 328 EXPECT_TRUE(image);
329 break; 329 break;
330 } 330 }
331 EXPECT_FALSE(image); 331 EXPECT_FALSE(image);
332 } 332 }
333 } 333 }
334 334
335 } // namespace blink 335 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageFrameGenerator.cpp ('k') | Source/platform/graphics/ImageLayerChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698