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 // Creates an instance of the test_shell. | 5 // Creates an instance of the test_shell. |
6 | 6 |
7 #include <stdlib.h> // required by _set_abort_behavior | 7 #include <stdlib.h> // required by _set_abort_behavior |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <commctrl.h> | 10 #include <commctrl.h> |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 std::wstring dir( | 250 std::wstring dir( |
251 parsed_command_line.GetSwitchValue(test_shell::kCrashDumps)); | 251 parsed_command_line.GetSwitchValue(test_shell::kCrashDumps)); |
252 new google_breakpad::ExceptionHandler(dir, 0, &MinidumpCallback, 0, true); | 252 new google_breakpad::ExceptionHandler(dir, 0, &MinidumpCallback, 0, true); |
253 } | 253 } |
254 | 254 |
255 std::wstring js_flags = | 255 std::wstring js_flags = |
256 parsed_command_line.GetSwitchValue(test_shell::kJavaScriptFlags); | 256 parsed_command_line.GetSwitchValue(test_shell::kJavaScriptFlags); |
257 // Test shell always exposes the GC. | 257 // Test shell always exposes the GC. |
258 CommandLine::AppendSwitch(&js_flags, L"expose-gc"); | 258 CommandLine::AppendSwitch(&js_flags, L"expose-gc"); |
259 webkit_glue::SetJavaScriptFlags(js_flags); | 259 webkit_glue::SetJavaScriptFlags(js_flags); |
| 260 // Also expose GCController to JavaScript. |
| 261 webkit_glue::SetShouldExposeGCController(true); |
260 | 262 |
261 // load and initialize the stats table. | 263 // load and initialize the stats table. |
262 StatsTable *table = new StatsTable(kStatsFile, kStatsFileThreads, kStatsFileCo
unters); | 264 StatsTable *table = new StatsTable(kStatsFile, kStatsFileThreads, kStatsFileCo
unters); |
263 StatsTable::set_current(table); | 265 StatsTable::set_current(table); |
264 | 266 |
265 TestShell* shell; | 267 TestShell* shell; |
266 if (TestShell::CreateNewWindow(uri, &shell)) { | 268 if (TestShell::CreateNewWindow(uri, &shell)) { |
267 if (record_mode || playback_mode) { | 269 if (record_mode || playback_mode) { |
268 // Move the window to the upper left corner for consistent | 270 // Move the window to the upper left corner for consistent |
269 // record/playback mode. For automation, we want this to work | 271 // record/playback mode. For automation, we want this to work |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 361 |
360 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 362 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
361 StatsTable::set_current(NULL); | 363 StatsTable::set_current(NULL); |
362 delete table; | 364 delete table; |
363 | 365 |
364 #ifdef _CRTDBG_MAP_ALLOC | 366 #ifdef _CRTDBG_MAP_ALLOC |
365 _CrtDumpMemoryLeaks(); | 367 _CrtDumpMemoryLeaks(); |
366 #endif | 368 #endif |
367 return 0; | 369 return 0; |
368 } | 370 } |
OLD | NEW |