| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 TestingPlatformSupport::TestingPlatformSupport() | 76 TestingPlatformSupport::TestingPlatformSupport() |
| 77 : TestingPlatformSupport(TestingPlatformSupport::Config()) | 77 : TestingPlatformSupport(TestingPlatformSupport::Config()) |
| 78 { | 78 { |
| 79 } | 79 } |
| 80 | 80 |
| 81 TestingPlatformSupport::TestingPlatformSupport(const Config& config) | 81 TestingPlatformSupport::TestingPlatformSupport(const Config& config) |
| 82 : m_config(config) | 82 : m_config(config) |
| 83 , m_oldPlatform(Platform::current()) | 83 , m_oldPlatform(Platform::current()) |
| 84 { | 84 { |
| 85 ASSERT(m_oldPlatform); |
| 85 Platform::setCurrentPlatformForTesting(this); | 86 Platform::setCurrentPlatformForTesting(this); |
| 86 } | 87 } |
| 87 | 88 |
| 88 TestingPlatformSupport::~TestingPlatformSupport() | 89 TestingPlatformSupport::~TestingPlatformSupport() |
| 89 { | 90 { |
| 90 Platform::setCurrentPlatformForTesting(m_oldPlatform); | 91 Platform::setCurrentPlatformForTesting(m_oldPlatform); |
| 91 } | 92 } |
| 92 | 93 |
| 93 WebDiscardableMemory* TestingPlatformSupport::allocateAndLockDiscardableMemory(s
ize_t bytes) | 94 WebDiscardableMemory* TestingPlatformSupport::allocateAndLockDiscardableMemory(s
ize_t bytes) |
| 94 { | 95 { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 { | 242 { |
| 242 return m_mockWebThread.get(); | 243 return m_mockWebThread.get(); |
| 243 } | 244 } |
| 244 | 245 |
| 245 TestingPlatformMockScheduler* TestingPlatformSupportWithMockScheduler::mockWebSc
heduler() | 246 TestingPlatformMockScheduler* TestingPlatformSupportWithMockScheduler::mockWebSc
heduler() |
| 246 { | 247 { |
| 247 return m_mockWebThread->mockWebScheduler(); | 248 return m_mockWebThread->mockWebScheduler(); |
| 248 } | 249 } |
| 249 | 250 |
| 250 } // namespace blink | 251 } // namespace blink |
| OLD | NEW |