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

Side by Side Diff: webkit/tools/test_shell/test_shell_gtk.cc

Issue 43030: Attempt to cleanup after ourselves on test shell timeout. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 // 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698