OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "platform/graphics/skia/NativeImageSkia.h" | 39 #include "platform/graphics/skia/NativeImageSkia.h" |
40 #include "platform/weborigin/KURL.h" | 40 #include "platform/weborigin/KURL.h" |
41 #include "third_party/skia/include/core/SkBitmap.h" | 41 #include "third_party/skia/include/core/SkBitmap.h" |
42 #include "wtf/OwnPtr.h" | 42 #include "wtf/OwnPtr.h" |
43 #include "wtf/PassOwnPtr.h" | 43 #include "wtf/PassOwnPtr.h" |
44 #include "wtf/PassRefPtr.h" | 44 #include "wtf/PassRefPtr.h" |
45 #include "wtf/RefPtr.h" | 45 #include "wtf/RefPtr.h" |
46 | 46 |
47 #include <gtest/gtest.h> | 47 #include <gtest/gtest.h> |
48 | 48 |
49 using namespace WebCore; | 49 using namespace blink; |
50 | 50 |
51 namespace { | 51 namespace { |
52 | 52 |
53 class TestImage : public Image { | 53 class TestImage : public Image { |
54 public: | 54 public: |
55 | 55 |
56 static PassRefPtr<TestImage> create(const IntSize& size) | 56 static PassRefPtr<TestImage> create(const IntSize& size) |
57 { | 57 { |
58 return adoptRef(new TestImage(size)); | 58 return adoptRef(new TestImage(size)); |
59 } | 59 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 OwnPtr<DragImage> testImage = | 160 OwnPtr<DragImage> testImage = |
161 DragImage::create(url, testLabel, fontDescription, deviceScaleFactor); | 161 DragImage::create(url, testLabel, fontDescription, deviceScaleFactor); |
162 OwnPtr<DragImage> expectedImage = | 162 OwnPtr<DragImage> expectedImage = |
163 DragImage::create(url, expectedLabel, fontDescription, deviceScaleFactor
); | 163 DragImage::create(url, expectedLabel, fontDescription, deviceScaleFactor
); |
164 | 164 |
165 EXPECT_EQ(testImage->size().width(), expectedImage->size().width()); | 165 EXPECT_EQ(testImage->size().width(), expectedImage->size().width()); |
166 } | 166 } |
167 | 167 |
168 } // anonymous namespace | 168 } // anonymous namespace |
OLD | NEW |