| 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 25 matching lines...) Expand all Loading... |
| 36 #include "core/fetch/MockImageResourceClient.h" | 36 #include "core/fetch/MockImageResourceClient.h" |
| 37 #include "core/fetch/ResourceFetcher.h" | 37 #include "core/fetch/ResourceFetcher.h" |
| 38 #include "core/fetch/ResourcePtr.h" | 38 #include "core/fetch/ResourcePtr.h" |
| 39 #include "platform/SharedBuffer.h" | 39 #include "platform/SharedBuffer.h" |
| 40 #include "platform/testing/UnitTestHelpers.h" | 40 #include "platform/testing/UnitTestHelpers.h" |
| 41 #include "public/platform/Platform.h" | 41 #include "public/platform/Platform.h" |
| 42 #include "public/platform/WebURL.h" | 42 #include "public/platform/WebURL.h" |
| 43 #include "public/platform/WebURLResponse.h" | 43 #include "public/platform/WebURLResponse.h" |
| 44 #include "public/platform/WebUnitTestSupport.h" | 44 #include "public/platform/WebUnitTestSupport.h" |
| 45 | 45 |
| 46 using namespace blink; | |
| 47 | |
| 48 namespace blink { | 46 namespace blink { |
| 49 | 47 |
| 50 TEST(RawResourceTest, DontIgnoreAcceptForCacheReuse) | 48 TEST(RawResourceTest, DontIgnoreAcceptForCacheReuse) |
| 51 { | 49 { |
| 52 ResourceRequest jpegRequest; | 50 ResourceRequest jpegRequest; |
| 53 jpegRequest.setHTTPAccept("image/jpeg"); | 51 jpegRequest.setHTTPAccept("image/jpeg"); |
| 54 | 52 |
| 55 ResourcePtr<RawResource> jpegResource(new RawResource(jpegRequest, Resource:
:Raw)); | 53 ResourcePtr<RawResource> jpegResource(new RawResource(jpegRequest, Resource:
:Raw)); |
| 56 | 54 |
| 57 ResourceRequest pngRequest; | 55 ResourceRequest pngRequest; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 177 |
| 180 OwnPtr<DummyClient> dummyClient = adoptPtr(new DummyClient()); | 178 OwnPtr<DummyClient> dummyClient = adoptPtr(new DummyClient()); |
| 181 OwnPtr<RemovingClient> removingClient = adoptPtr(new RemovingClient(dummyCli
ent.get())); | 179 OwnPtr<RemovingClient> removingClient = adoptPtr(new RemovingClient(dummyCli
ent.get())); |
| 182 raw->addClient(dummyClient.get()); | 180 raw->addClient(dummyClient.get()); |
| 183 raw->addClient(removingClient.get()); | 181 raw->addClient(removingClient.get()); |
| 184 testing::runPendingTasks(); | 182 testing::runPendingTasks(); |
| 185 EXPECT_FALSE(raw->hasClients()); | 183 EXPECT_FALSE(raw->hasClients()); |
| 186 } | 184 } |
| 187 | 185 |
| 188 } // namespace blink | 186 } // namespace blink |
| OLD | NEW |