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

Unified Diff: Source/core/fetch/RawResourceTest.cpp

Issue 85623006: Don't ignore Accept: header for cache/XHR dedupe purposes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add RawResourceTest Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/RawResource.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/RawResourceTest.cpp
diff --git a/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp b/Source/core/fetch/RawResourceTest.cpp
similarity index 65%
copy from Source/core/animation/AnimatableStrokeDasharrayListTest.cpp
copy to Source/core/fetch/RawResourceTest.cpp
index 6a2756d25040771c09241881346e7a2c0904890b..b61c7e6325e57c082afaf3c122c5687d254717c1 100644
--- a/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp
+++ b/Source/core/fetch/RawResourceTest.cpp
@@ -29,32 +29,37 @@
*/
#include "config.h"
-#include "core/animation/AnimatableStrokeDasharrayList.h"
+#include "core/fetch/RawResource.h"
-#include "core/svg/SVGLength.h"
-
-#include <gtest/gtest.h>
+#include "core/fetch/ImageResourceClient.h"
+#include "core/fetch/MemoryCache.h"
+#include "core/fetch/MockImageResourceClient.h"
+#include "core/fetch/ResourceFetcher.h"
+#include "core/fetch/ResourcePtr.h"
+#include "core/loader/DocumentLoader.h"
+#include "core/testing/DummyPageHolder.h"
+#include "core/testing/UnitTestHelpers.h"
+#include "platform/SharedBuffer.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebURL.h"
+#include "public/platform/WebURLResponse.h"
+#include "public/platform/WebUnitTestSupport.h"
using namespace WebCore;
namespace {
-TEST(AnimationAnimatableStrokeDasharrayListTest, EqualTo)
+TEST(RawResourceTest, DontIgnoreAcceptForCacheReuse)
{
- Vector<SVGLength> vectorA(4);
- Vector<SVGLength> vectorB(4);
- RefPtr<AnimatableStrokeDasharrayList> listA = AnimatableStrokeDasharrayList::create(vectorA);
- RefPtr<AnimatableStrokeDasharrayList> listB = AnimatableStrokeDasharrayList::create(vectorB);
- EXPECT_TRUE(listA->equals(listB.get()));
-
- TrackExceptionState exceptionState;
- vectorB[3].newValueSpecifiedUnits(LengthTypePX, 50, exceptionState);
- listB = AnimatableStrokeDasharrayList::create(vectorB);
- EXPECT_FALSE(listA->equals(listB.get()));
-
- vectorB = Vector<SVGLength>(5);
- listB = AnimatableStrokeDasharrayList::create(vectorB);
- EXPECT_FALSE(listA->equals(listB.get()));
+ ResourceRequest jpegRequest;
+ jpegRequest.setHTTPAccept("image/jpeg");
+
+ RawResource jpegResource(jpegRequest, Resource::Raw);
+
+ ResourceRequest pngRequest;
+ pngRequest.setHTTPAccept("image/png");
+
+ ASSERT_FALSE(jpegResource.canReuse(pngRequest));
}
} // namespace
« no previous file with comments | « Source/core/fetch/RawResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698