Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp

Issue 1785483003: Make sure that s_platform is non-null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/testing/RunAllTests.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/RunAllTests.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698