| 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 "webkit/tools/test_shell/test_shell.h" | 5 #include "webkit/tools/test_shell/test_shell.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <fontconfig/fontconfig.h> | 9 #include <fontconfig/fontconfig.h> |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 void TestShell::SizeTo(int width, int height) { | 393 void TestShell::SizeTo(int width, int height) { |
| 394 gtk_window_resize(GTK_WINDOW(m_mainWnd), width, | 394 gtk_window_resize(GTK_WINDOW(m_mainWnd), width, |
| 395 height + top_chrome_height_); | 395 height + top_chrome_height_); |
| 396 } | 396 } |
| 397 | 397 |
| 398 static void AlarmHandler(int signatl) { | 398 static void AlarmHandler(int signatl) { |
| 399 // If the alarm alarmed, kill the process since we have a really bad hang. | 399 // If the alarm alarmed, kill the process since we have a really bad hang. |
| 400 puts("#TEST_TIMED_OUT\n"); | 400 puts("#TEST_TIMED_OUT\n"); |
| 401 puts("#EOF\n"); | 401 puts("#EOF\n"); |
| 402 fflush(stdout); | 402 fflush(stdout); |
| 403 TestShell::ShutdownTestShell(); |
| 403 exit(0); | 404 exit(0); |
| 404 } | 405 } |
| 405 | 406 |
| 406 void TestShell::WaitTestFinished() { | 407 void TestShell::WaitTestFinished() { |
| 407 DCHECK(!test_is_pending_) << "cannot be used recursively"; | 408 DCHECK(!test_is_pending_) << "cannot be used recursively"; |
| 408 | 409 |
| 409 test_is_pending_ = true; | 410 test_is_pending_ = true; |
| 410 | 411 |
| 411 // Install an alarm signal handler that will kill us if we time out. | 412 // Install an alarm signal handler that will kill us if we time out. |
| 412 signal(SIGALRM, AlarmHandler); | 413 signal(SIGALRM, AlarmHandler); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 StringPiece res; | 663 StringPiece res; |
| 663 g_resource_data_pack->Get(resource_id, &res); | 664 g_resource_data_pack->Get(resource_id, &res); |
| 664 return res.as_string(); | 665 return res.as_string(); |
| 665 } | 666 } |
| 666 | 667 |
| 667 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 668 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
| 668 return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); | 669 return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); |
| 669 } | 670 } |
| 670 | 671 |
| 671 } // namespace webkit_glue | 672 } // namespace webkit_glue |
| OLD | NEW |