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

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

Issue 2798823002: Rewrite references to "wtf/" to "platform/wtf/" in platform/graphics. (Closed)
Patch Set: Created 3 years, 8 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 17 matching lines...) Expand all
28 #include <memory> 28 #include <memory>
29 #include "platform/CrossThreadFunctional.h" 29 #include "platform/CrossThreadFunctional.h"
30 #include "platform/SharedBuffer.h" 30 #include "platform/SharedBuffer.h"
31 #include "platform/WebTaskRunner.h" 31 #include "platform/WebTaskRunner.h"
32 #include "platform/graphics/ImageDecodingStore.h" 32 #include "platform/graphics/ImageDecodingStore.h"
33 #include "platform/graphics/ImageFrameGenerator.h" 33 #include "platform/graphics/ImageFrameGenerator.h"
34 #include "platform/graphics/paint/PaintCanvas.h" 34 #include "platform/graphics/paint/PaintCanvas.h"
35 #include "platform/graphics/paint/PaintRecord.h" 35 #include "platform/graphics/paint/PaintRecord.h"
36 #include "platform/graphics/paint/PaintRecorder.h" 36 #include "platform/graphics/paint/PaintRecorder.h"
37 #include "platform/graphics/test/MockImageDecoder.h" 37 #include "platform/graphics/test/MockImageDecoder.h"
38 #include "platform/wtf/PassRefPtr.h"
39 #include "platform/wtf/PtrUtil.h"
40 #include "platform/wtf/RefPtr.h"
38 #include "public/platform/Platform.h" 41 #include "public/platform/Platform.h"
39 #include "public/platform/WebThread.h" 42 #include "public/platform/WebThread.h"
40 #include "public/platform/WebTraceLocation.h" 43 #include "public/platform/WebTraceLocation.h"
41 #include "testing/gtest/include/gtest/gtest.h" 44 #include "testing/gtest/include/gtest/gtest.h"
42 #include "third_party/skia/include/core/SkImage.h" 45 #include "third_party/skia/include/core/SkImage.h"
43 #include "third_party/skia/include/core/SkPixmap.h" 46 #include "third_party/skia/include/core/SkPixmap.h"
44 #include "third_party/skia/include/core/SkSurface.h" 47 #include "third_party/skia/include/core/SkSurface.h"
45 #include "wtf/PassRefPtr.h"
46 #include "wtf/PtrUtil.h"
47 #include "wtf/RefPtr.h"
48 48
49 namespace blink { 49 namespace blink {
50 50
51 namespace { 51 namespace {
52 52
53 // Raw data for a PNG file with 1x1 white pixels. 53 // Raw data for a PNG file with 1x1 white pixels.
54 const unsigned char whitePNG[] = { 54 const unsigned char whitePNG[] = {
55 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 55 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
56 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 56 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
57 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00, 57 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 SharedBuffer::create(m_data->data(), m_data->size()); 385 SharedBuffer::create(m_data->data(), m_data->size());
386 EXPECT_EQ(originalData->size(), m_data->size()); 386 EXPECT_EQ(originalData->size(), m_data->size());
387 m_lazyDecoder->setData(originalData, false); 387 m_lazyDecoder->setData(originalData, false);
388 RefPtr<SharedBuffer> newData = m_lazyDecoder->data(); 388 RefPtr<SharedBuffer> newData = m_lazyDecoder->data();
389 EXPECT_EQ(originalData->size(), newData->size()); 389 EXPECT_EQ(originalData->size(), newData->size());
390 EXPECT_EQ( 390 EXPECT_EQ(
391 0, std::memcmp(originalData->data(), newData->data(), newData->size())); 391 0, std::memcmp(originalData->data(), newData->data(), newData->size()));
392 } 392 }
393 393
394 } // namespace blink 394 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698