OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <malloc.h> | 5 #include <malloc.h> |
6 #include "sandbox/sandbox_poc/pocdll/exports.h" | 6 #include "sandbox/win/sandbox_poc/pocdll/exports.h" |
7 #include "sandbox/sandbox_poc/pocdll/utils.h" | 7 #include "sandbox/win/sandbox_poc/pocdll/utils.h" |
8 | 8 |
9 // This file contains the tests used to verify if it's possible to DOS or crash | 9 // This file contains the tests used to verify if it's possible to DOS or crash |
10 // the machine. All tests that can impact the stability of the machine should | 10 // the machine. All tests that can impact the stability of the machine should |
11 // be in this file. | 11 // be in this file. |
12 | 12 |
13 // Sleeps forever. this function is used to be the | 13 // Sleeps forever. this function is used to be the |
14 // entry point for the threads created by the thread bombing function. | 14 // entry point for the threads created by the thread bombing function. |
15 // This function never returns. | 15 // This function never returns. |
16 DWORD WINAPI MyThreadBombimgFunction(void *param) { | 16 DWORD WINAPI MyThreadBombimgFunction(void *param) { |
17 UNREFERENCED_PARAMETER(param); | 17 UNREFERENCED_PARAMETER(param); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // "output" is the stream used for logging. | 187 // "output" is the stream used for logging. |
188 void POCDLL_API TestCloseHWND(HANDLE log) { | 188 void POCDLL_API TestCloseHWND(HANDLE log) { |
189 HandleToFile handle2file; | 189 HandleToFile handle2file; |
190 FILE *output = handle2file.Translate(log, "w"); | 190 FILE *output = handle2file.Translate(log, "w"); |
191 | 191 |
192 ::EnumWindows(EnumWindowCallback, PtrToLong(output)); | 192 ::EnumWindows(EnumWindowCallback, PtrToLong(output)); |
193 // TODO(nsylvain): find a way to know when the enum is finished | 193 // TODO(nsylvain): find a way to know when the enum is finished |
194 // before returning. | 194 // before returning. |
195 ::Sleep(3000); | 195 ::Sleep(3000); |
196 } | 196 } |
OLD | NEW |