| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 // From blink::Platform: | 113 // From blink::Platform: |
| 114 virtual double currentTime() | 114 virtual double currentTime() |
| 115 { | 115 { |
| 116 return kOriginalRequestDateAsDouble + m_elapsedSeconds; | 116 return kOriginalRequestDateAsDouble + m_elapsedSeconds; |
| 117 } | 117 } |
| 118 | 118 |
| 119 // These blink::Platform methods must be overriden to make a usable obje
ct. | 119 // These blink::Platform methods must be overriden to make a usable obje
ct. |
| 120 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t
length) { ASSERT_NOT_REACHED(); } | |
| 121 virtual const unsigned char* getTraceCategoryEnabledFlag(const char* cat
egoryName) | 120 virtual const unsigned char* getTraceCategoryEnabledFlag(const char* cat
egoryName) |
| 122 { | 121 { |
| 123 return &kAConstUnsignedCharZero; | 122 return &kAConstUnsignedCharZero; |
| 124 } | 123 } |
| 125 | 124 |
| 126 double m_elapsedSeconds; | 125 double m_elapsedSeconds; |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 virtual void SetUp() | 128 virtual void SetUp() |
| 130 { | 129 { |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 firstResource->setResponse(fresh200Response); | 534 firstResource->setResponse(fresh200Response); |
| 536 memoryCache()->add(firstResource.get()); | 535 memoryCache()->add(firstResource.get()); |
| 537 | 536 |
| 538 advanceClock(500.); | 537 advanceClock(500.); |
| 539 | 538 |
| 540 ResourcePtr<Resource> fetched = fetch(); | 539 ResourcePtr<Resource> fetched = fetch(); |
| 541 EXPECT_EQ(firstResource, fetched); | 540 EXPECT_EQ(firstResource, fetched); |
| 542 } | 541 } |
| 543 | 542 |
| 544 } // namespace | 543 } // namespace |
| OLD | NEW |