| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014, Google Inc. All rights reserved. | 2 * Copyright (c) 2014, 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "core/fetch/FetchContext.h" | 31 #include "core/fetch/FetchContext.h" |
| 32 #include "core/fetch/ImageResource.h" | 32 #include "core/fetch/ImageResource.h" |
| 33 #include "core/fetch/MemoryCache.h" | 33 #include "core/fetch/MemoryCache.h" |
| 34 #include "core/fetch/RawResource.h" | 34 #include "core/fetch/RawResource.h" |
| 35 #include "core/fetch/Resource.h" | 35 #include "core/fetch/Resource.h" |
| 36 #include "core/fetch/ResourceFetcher.h" | 36 #include "core/fetch/ResourceFetcher.h" |
| 37 #include "platform/network/ResourceRequest.h" | 37 #include "platform/network/ResourceRequest.h" |
| 38 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
| 39 #include "wtf/OwnPtr.h" | |
| 40 #include "wtf/RefPtr.h" | 39 #include "wtf/RefPtr.h" |
| 41 | 40 |
| 42 namespace blink { | 41 namespace blink { |
| 43 | 42 |
| 44 // An URL for the original request. | 43 // An URL for the original request. |
| 45 const char kResourceURL[] = "http://resource.com/"; | 44 const char kResourceURL[] = "http://resource.com/"; |
| 46 | 45 |
| 47 // The origin time of our first request. | 46 // The origin time of our first request. |
| 48 const char kOriginalRequestDateAsString[] = "Thu, 25 May 1977 18:30:00 GMT"; | 47 const char kOriginalRequestDateAsString[] = "Thu, 25 May 1977 18:30:00 GMT"; |
| 49 const double kOriginalRequestDateAsDouble = 233433000.; | 48 const double kOriginalRequestDateAsDouble = 233433000.; |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 firstResource->finish(); | 561 firstResource->finish(); |
| 563 memoryCache()->add(firstResource); | 562 memoryCache()->add(firstResource); |
| 564 | 563 |
| 565 advanceClock(500.); | 564 advanceClock(500.); |
| 566 | 565 |
| 567 Resource* fetched = fetch(); | 566 Resource* fetched = fetch(); |
| 568 EXPECT_EQ(firstResource, fetched); | 567 EXPECT_EQ(firstResource, fetched); |
| 569 } | 568 } |
| 570 | 569 |
| 571 } // namespace blink | 570 } // namespace blink |
| OLD | NEW |