| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/app_switches.h" | 5 #include "app/app_switches.h" |
| 6 #include "app/gfx/gl/gl_implementation.h" | 6 #include "app/gfx/gl/gl_implementation.h" |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 SimpleResourceLoaderBridge::Init(cache_path, cache_mode, layout_test_mode); | 172 SimpleResourceLoaderBridge::Init(cache_path, cache_mode, layout_test_mode); |
| 173 | 173 |
| 174 // Load ICU data tables | 174 // Load ICU data tables |
| 175 icu_util::Initialize(); | 175 icu_util::Initialize(); |
| 176 | 176 |
| 177 // Config the network module so it has access to a limited set of resources. | 177 // Config the network module so it has access to a limited set of resources. |
| 178 net::NetModule::SetResourceProvider(TestShell::NetResourceProvider); | 178 net::NetModule::SetResourceProvider(TestShell::NetResourceProvider); |
| 179 | 179 |
| 180 platform.InitializeGUI(); | 180 platform.InitializeGUI(); |
| 181 | 181 |
| 182 if (parsed_command_line.HasSwitch(test_shell::kEnableLegacyParser)) { | |
| 183 TestShell::disable_html5_parser(); | |
| 184 } | |
| 185 | |
| 186 TestShell::InitializeTestShell(layout_test_mode, allow_external_pages); | 182 TestShell::InitializeTestShell(layout_test_mode, allow_external_pages); |
| 187 | 183 |
| 188 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows)) | 184 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows)) |
| 189 TestShell::SetAllowScriptsToCloseWindows(); | 185 TestShell::SetAllowScriptsToCloseWindows(); |
| 190 | 186 |
| 191 // Disable user themes for layout tests so pixel tests are consistent. | 187 // Disable user themes for layout tests so pixel tests are consistent. |
| 192 #if defined(OS_WIN) | 188 #if defined(OS_WIN) |
| 193 TestShellWebTheme::Engine engine; | 189 TestShellWebTheme::Engine engine; |
| 194 #endif | 190 #endif |
| 195 if (classic_theme) | 191 if (classic_theme) |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 TestShell::ShutdownTestShell(); | 385 TestShell::ShutdownTestShell(); |
| 390 TestShell::CleanupLogging(); | 386 TestShell::CleanupLogging(); |
| 391 | 387 |
| 392 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 388 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
| 393 StatsTable::set_current(NULL); | 389 StatsTable::set_current(NULL); |
| 394 delete table; | 390 delete table; |
| 395 RemoveSharedMemoryFile(stats_filename); | 391 RemoveSharedMemoryFile(stats_filename); |
| 396 | 392 |
| 397 return 0; | 393 return 0; |
| 398 } | 394 } |
| OLD | NEW |