| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "core/fetch/RawResource.h" | 31 #include "core/fetch/RawResource.h" |
| 32 | 32 |
| 33 #include "core/fetch/MemoryCache.h" | 33 #include "core/fetch/MemoryCache.h" |
| 34 #include "core/fetch/ResourceFetcher.h" | 34 #include "core/fetch/ResourceFetcher.h" |
| 35 #include "platform/SharedBuffer.h" | 35 #include "platform/SharedBuffer.h" |
| 36 #include "platform/testing/UnitTestHelpers.h" | 36 #include "platform/testing/UnitTestHelpers.h" |
| 37 #include "public/platform/Platform.h" | 37 #include "public/platform/Platform.h" |
| 38 #include "public/platform/WebURL.h" | 38 #include "public/platform/WebURL.h" |
| 39 #include "public/platform/WebURLResponse.h" | 39 #include "public/platform/WebURLResponse.h" |
| 40 #include "public/platform/WebUnitTestSupport.h" | |
| 41 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
| 42 | 41 |
| 43 namespace blink { | 42 namespace blink { |
| 44 | 43 |
| 45 TEST(RawResourceTest, DontIgnoreAcceptForCacheReuse) | 44 TEST(RawResourceTest, DontIgnoreAcceptForCacheReuse) |
| 46 { | 45 { |
| 47 ResourceRequest jpegRequest; | 46 ResourceRequest jpegRequest; |
| 48 jpegRequest.setHTTPAccept("image/jpeg"); | 47 jpegRequest.setHTTPAccept("image/jpeg"); |
| 49 | 48 |
| 50 RawResource* jpegResource(RawResource::create(jpegRequest, Resource::Raw)); | 49 RawResource* jpegResource(RawResource::create(jpegRequest, Resource::Raw)); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 285 |
| 287 OwnPtr<DummyClient> dummyClient = adoptPtr(new DummyClient()); | 286 OwnPtr<DummyClient> dummyClient = adoptPtr(new DummyClient()); |
| 288 OwnPtr<RemovingClient> removingClient = adoptPtr(new RemovingClient(dummyCli
ent.get())); | 287 OwnPtr<RemovingClient> removingClient = adoptPtr(new RemovingClient(dummyCli
ent.get())); |
| 289 raw->addClient(dummyClient.get()); | 288 raw->addClient(dummyClient.get()); |
| 290 raw->addClient(removingClient.get()); | 289 raw->addClient(removingClient.get()); |
| 291 testing::runPendingTasks(); | 290 testing::runPendingTasks(); |
| 292 EXPECT_FALSE(raw->hasClientsOrObservers()); | 291 EXPECT_FALSE(raw->hasClientsOrObservers()); |
| 293 } | 292 } |
| 294 | 293 |
| 295 } // namespace blink | 294 } // namespace blink |
| OLD | NEW |