| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 // From blink::Platform: | 143 // From blink::Platform: |
| 144 virtual double currentTime() | 144 virtual double currentTime() |
| 145 { | 145 { |
| 146 return kOriginalRequestDateAsDouble + m_elapsedSeconds; | 146 return kOriginalRequestDateAsDouble + m_elapsedSeconds; |
| 147 } | 147 } |
| 148 | 148 |
| 149 // These blink::Platform methods must be overriden to make a usable obje
ct. | 149 // These blink::Platform methods must be overriden to make a usable obje
ct. |
| 150 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t
length) { ASSERT_NOT_REACHED(); } | 150 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t
length) |
| 151 { |
| 152 RELEASE_ASSERT_NOT_REACHED(); |
| 153 } |
| 151 virtual const unsigned char* getTraceCategoryEnabledFlag(const char* cat
egoryName) | 154 virtual const unsigned char* getTraceCategoryEnabledFlag(const char* cat
egoryName) |
| 152 { | 155 { |
| 153 return &kAConstUnsignedCharZero; | 156 return &kAConstUnsignedCharZero; |
| 154 } | 157 } |
| 155 | 158 |
| 156 blink::Platform* m_platform; // Not owned. | 159 blink::Platform* m_platform; // Not owned. |
| 157 double m_elapsedSeconds; | 160 double m_elapsedSeconds; |
| 158 }; | 161 }; |
| 159 | 162 |
| 160 virtual void SetUp() | 163 virtual void SetUp() |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 firstResource->setResponse(fresh200Response); | 577 firstResource->setResponse(fresh200Response); |
| 575 memoryCache()->add(firstResource.get()); | 578 memoryCache()->add(firstResource.get()); |
| 576 | 579 |
| 577 advanceClock(500.); | 580 advanceClock(500.); |
| 578 | 581 |
| 579 ResourcePtr<Resource> fetched = fetch(); | 582 ResourcePtr<Resource> fetched = fetch(); |
| 580 EXPECT_EQ(firstResource, fetched); | 583 EXPECT_EQ(firstResource, fetched); |
| 581 } | 584 } |
| 582 | 585 |
| 583 } // namespace blink | 586 } // namespace blink |
| OLD | NEW |