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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp

Issue 2797983002: Rewrite references to "wtf/" to "platform/wtf/" in platform/loader. (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) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "platform/loader/testing/MockFetchContext.h" 49 #include "platform/loader/testing/MockFetchContext.h"
50 #include "platform/loader/testing/MockResource.h" 50 #include "platform/loader/testing/MockResource.h"
51 #include "platform/loader/testing/MockResourceClient.h" 51 #include "platform/loader/testing/MockResourceClient.h"
52 #include "platform/scheduler/test/fake_web_task_runner.h" 52 #include "platform/scheduler/test/fake_web_task_runner.h"
53 #include "platform/testing/TestingPlatformSupport.h" 53 #include "platform/testing/TestingPlatformSupport.h"
54 #include "platform/testing/URLTestHelpers.h" 54 #include "platform/testing/URLTestHelpers.h"
55 #include "platform/testing/UnitTestHelpers.h" 55 #include "platform/testing/UnitTestHelpers.h"
56 #include "platform/testing/weburl_loader_mock.h" 56 #include "platform/testing/weburl_loader_mock.h"
57 #include "platform/testing/weburl_loader_mock_factory_impl.h" 57 #include "platform/testing/weburl_loader_mock_factory_impl.h"
58 #include "platform/weborigin/KURL.h" 58 #include "platform/weborigin/KURL.h"
59 #include "platform/wtf/Allocator.h"
60 #include "platform/wtf/PtrUtil.h"
61 #include "platform/wtf/Vector.h"
59 #include "public/platform/Platform.h" 62 #include "public/platform/Platform.h"
60 #include "public/platform/WebCachePolicy.h" 63 #include "public/platform/WebCachePolicy.h"
61 #include "public/platform/WebURLLoader.h" 64 #include "public/platform/WebURLLoader.h"
62 #include "public/platform/WebURLLoaderMockFactory.h" 65 #include "public/platform/WebURLLoaderMockFactory.h"
63 #include "public/platform/WebURLResponse.h" 66 #include "public/platform/WebURLResponse.h"
64 #include "testing/gtest/include/gtest/gtest.h" 67 #include "testing/gtest/include/gtest/gtest.h"
65 #include "wtf/Allocator.h"
66 #include "wtf/PtrUtil.h"
67 #include "wtf/Vector.h"
68 68
69 namespace blink { 69 namespace blink {
70 70
71 namespace { 71 namespace {
72 72
73 constexpr char kTestResourceFilename[] = "white-1x1.png"; 73 constexpr char kTestResourceFilename[] = "white-1x1.png";
74 constexpr char kTestResourceMimeType[] = "image/png"; 74 constexpr char kTestResourceMimeType[] = "image/png";
75 constexpr int kTestResourceSize = 103; // size of white-1x1.png 75 constexpr int kTestResourceSize = 103; // size of white-1x1.png
76 76
77 void registerMockedURLLoadWithCustomResponse(const KURL& url, 77 void registerMockedURLLoadWithCustomResponse(const KURL& url,
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 FetchRequest(KURL(ParsedURLString, "data:text/testmimetype,foo"), 667 FetchRequest(KURL(ParsedURLString, "data:text/testmimetype,foo"),
668 FetchInitiatorInfo()); 668 FetchInitiatorInfo());
669 Resource* resource = MockResource::fetch(fetchRequest, fetcher); 669 Resource* resource = MockResource::fetch(fetchRequest, fetcher);
670 ASSERT_TRUE(resource); 670 ASSERT_TRUE(resource);
671 EXPECT_EQ(ResourceStatus::Cached, resource->getStatus()); 671 EXPECT_EQ(ResourceStatus::Cached, resource->getStatus());
672 EXPECT_EQ("text/testmimetype", resource->response().mimeType()); 672 EXPECT_EQ("text/testmimetype", resource->response().mimeType());
673 EXPECT_EQ("text/testmimetype", resource->response().httpContentType()); 673 EXPECT_EQ("text/testmimetype", resource->response().httpContentType());
674 } 674 }
675 675
676 } // namespace blink 676 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698