| OLD | NEW |
| 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 | 654 |
| 655 // Resource created by parser on the second fetcher | 655 // Resource created by parser on the second fetcher |
| 656 FetchRequest fetchRequest2 = FetchRequest(url, FetchInitiatorInfo()); | 656 FetchRequest fetchRequest2 = FetchRequest(url, FetchInitiatorInfo()); |
| 657 Resource* newResource2 = MockResource::fetch(fetchRequest2, fetcher2); | 657 Resource* newResource2 = MockResource::fetch(fetchRequest2, fetcher2); |
| 658 Persistent<MockResourceClient> client2 = new MockResourceClient(newResource2); | 658 Persistent<MockResourceClient> client2 = new MockResourceClient(newResource2); |
| 659 EXPECT_NE(resource, newResource2); | 659 EXPECT_NE(resource, newResource2); |
| 660 EXPECT_FALSE(fetcher2->isFetching()); | 660 EXPECT_FALSE(fetcher2->isFetching()); |
| 661 Platform::current()->getURLLoaderMockFactory()->serveAsynchronousRequests(); | 661 Platform::current()->getURLLoaderMockFactory()->serveAsynchronousRequests(); |
| 662 } | 662 } |
| 663 | 663 |
| 664 TEST_F(ResourceFetcherTest, ContentTypeDataURL) { |
| 665 ResourceFetcher* fetcher = ResourceFetcher::create(context()); |
| 666 FetchRequest fetchRequest = |
| 667 FetchRequest(KURL(ParsedURLString, "data:text/testmimetype,foo"), |
| 668 FetchInitiatorInfo()); |
| 669 Resource* resource = MockResource::fetch(fetchRequest, fetcher); |
| 670 ASSERT_TRUE(resource); |
| 671 EXPECT_EQ(ResourceStatus::Cached, resource->getStatus()); |
| 672 EXPECT_EQ("text/testmimetype", resource->response().mimeType()); |
| 673 EXPECT_EQ("text/testmimetype", resource->response().httpContentType()); |
| 674 } |
| 675 |
| 664 } // namespace blink | 676 } // namespace blink |
| OLD | NEW |