Index: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/WebSelectorTest.cpp b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp |
similarity index 63% |
copy from third_party/WebKit/Source/web/tests/WebSelectorTest.cpp |
copy to third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp |
index 65ff5a4f7ecc04abc4bfed4fba3b01926c034efd..b4372e09e6a711b847ef865cb3e23697480747f2 100644 |
--- a/third_party/WebKit/Source/web/tests/WebSelectorTest.cpp |
+++ b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (C) 2013 Google Inc. All rights reserved. |
+ * Copyright (C) 2016 Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -28,29 +28,28 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#include "public/web/WebSelector.h" |
+#include "platform/image-decoders/ico/ICOImageDecoder.h" |
-#include "public/platform/WebString.h" |
+#include "platform/image-decoders/ImageDecoderTestHelpers.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace blink { |
-TEST(WebSelectorTest, Canonicalizes) |
-{ |
- EXPECT_EQ("h1, h2[style=\"foobar\"] span", canonicalizeSelector("h1,h2[style='foobar'] span").utf8()); |
- EXPECT_EQ("h1, h2[style=\"foobar\"] span", canonicalizeSelector("h1, h2[style=\"foobar\"] span").utf8()); |
-} |
+namespace { |
-TEST(WebSelectorTest, Checks) |
+PassOwnPtr<ImageDecoder> createDecoder() |
{ |
- EXPECT_EQ("", canonicalizeSelector("h1..h2").utf8()); |
- EXPECT_EQ("", canonicalizeSelector("h1..h2", WebSelectorTypeCompound).utf8()); |
+ return adoptPtr(new ICOImageDecoder(ImageDecoder::AlphaNotPremultiplied, ImageDecoder::GammaAndColorProfileApplied, ImageDecoder::noDecodedImageByteLimit)); |
} |
-TEST(WebSelectorTest, Restricts) |
+} // anonymous namespace |
+ |
+TEST(ICOImageDecoderTests, parseAndDecodeByteByByte) |
{ |
- EXPECT_EQ("", canonicalizeSelector("h1 span,h2", WebSelectorTypeCompound).utf8()); |
- EXPECT_EQ("h1, h2[style=\"foobar\"].cls", canonicalizeSelector("h1,h2[style=\"foobar\"].cls", WebSelectorTypeCompound).utf8()); |
+ testByteByByteDecode(&createDecoder, "/LayoutTests/fast/images/resources/2entries.ico", 2u, cAnimationNone); |
+ testByteByByteDecode(&createDecoder, "/LayoutTests/fast/events/resources/greenbox-3frames.cur", 3u, cAnimationNone); |
+ testByteByByteDecode(&createDecoder, "/LayoutTests/http/tests/favicon.ico", 1u, cAnimationNone); |
+ testByteByByteDecode(&createDecoder, "/LayoutTests/fast/images/resources/icon-without-and-bitmap.ico", 1u, cAnimationNone); |
} |
} // namespace blink |