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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 char buffer[100 * 100 * 4]; 179 char buffer[100 * 100 * 4];
180 m_generator->decodeAndScale(m_segmentReader.get(), false, 0, imageInfo(), 180 m_generator->decodeAndScale(m_segmentReader.get(), false, 0, imageInfo(),
181 buffer, 100 * 4); 181 buffer, 100 * 4);
182 EXPECT_EQ(1, m_decodeRequestCount); 182 EXPECT_EQ(1, m_decodeRequestCount);
183 EXPECT_EQ(0, m_decodersDestroyed); 183 EXPECT_EQ(0, m_decodersDestroyed);
184 184
185 // LocalFrame can now be decoded completely. 185 // LocalFrame can now be decoded completely.
186 setFrameStatus(ImageFrame::FrameComplete); 186 setFrameStatus(ImageFrame::FrameComplete);
187 addNewData(); 187 addNewData();
188 std::unique_ptr<WebThread> thread = 188 std::unique_ptr<WebThread> thread =
189 wrapUnique(Platform::current()->createThread("DecodeThread")); 189 WTF::wrapUnique(Platform::current()->createThread("DecodeThread"));
190 thread->getWebTaskRunner()->postTask( 190 thread->getWebTaskRunner()->postTask(
191 BLINK_FROM_HERE, 191 BLINK_FROM_HERE,
192 crossThreadBind(&decodeThreadMain, m_generator, m_segmentReader)); 192 crossThreadBind(&decodeThreadMain, m_generator, m_segmentReader));
193 thread.reset(); 193 thread.reset();
194 EXPECT_EQ(2, m_decodeRequestCount); 194 EXPECT_EQ(2, m_decodeRequestCount);
195 EXPECT_EQ(1, m_decodersDestroyed); 195 EXPECT_EQ(1, m_decodersDestroyed);
196 196
197 // Decoder created again. 197 // Decoder created again.
198 m_generator->decodeAndScale(m_segmentReader.get(), false, 0, imageInfo(), 198 m_generator->decodeAndScale(m_segmentReader.get(), false, 0, imageInfo(),
199 buffer, 100 * 4); 199 buffer, 100 * 4);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // all the frame data, but not destroying the decoder. See comments in 254 // all the frame data, but not destroying the decoder. See comments in
255 // ImageFrameGenerator::tryToResumeDecode(). 255 // ImageFrameGenerator::tryToResumeDecode().
256 m_generator->decodeAndScale(m_segmentReader.get(), true, 2, imageInfo(), 256 m_generator->decodeAndScale(m_segmentReader.get(), true, 2, imageInfo(),
257 buffer, 100 * 4); 257 buffer, 100 * 4);
258 EXPECT_EQ(3, m_decodeRequestCount); 258 EXPECT_EQ(3, m_decodeRequestCount);
259 EXPECT_EQ(0, m_decodersDestroyed); 259 EXPECT_EQ(0, m_decodersDestroyed);
260 EXPECT_EQ(kNotFound, m_requestedClearExceptFrame); 260 EXPECT_EQ(kNotFound, m_requestedClearExceptFrame);
261 } 261 }
262 262
263 } // namespace blink 263 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698