Changeset 64615 in webkit
- Timestamp:
- Aug 3, 2010 6:53:29 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r64614 r64615 1 2010-08-03 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 [DRT/Chromium] Implement --testshell-startup-dialog 6 https://bugs.webkit.org/show_bug.cgi?id=40616 7 8 * DumpRenderTree/chromium/DumpRenderTree.cpp: 9 (main): Check --testshell-startup-dialog, and call openStartUpDialog() 10 if it is specfied. 11 * DumpRenderTree/chromium/TestShell.h: 12 Declare openStartUpDialog(). 13 * DumpRenderTree/chromium/TestShellGtk.cpp: 14 (openStartupDialog): 15 * DumpRenderTree/chromium/TestShellMac.mm: 16 (openStartupDialog): 17 * DumpRenderTree/chromium/TestShellWin.cpp: 18 (openStartupDialog): 19 1 20 2010-08-03 Kent Tamura <tkent@chromium.org> 2 21 -
trunk/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp
r64463 r64615 37 37 using namespace std; 38 38 39 void platformInit();40 41 39 static const char optionComplexText[] = "--complex-text"; 42 40 static const char optionDumpAllPixels[] = "--dump-all-pixels"; … … 49 47 static const char optionTestShell[] = "--test-shell"; 50 48 static const char optionAllowExternalPages[] = "--allow-external-pages"; 49 static const char optionStartupDialog[] = "--testshell-startup-dialog"; 51 50 52 51 static void runTest(TestShell& shell, TestParams& params, const string& testName, bool testShellMode) … … 92 91 bool testShellMode = false; 93 92 bool allowExternalPages = false; 93 bool startupDialog = false; 94 94 for (int i = 1; i < argc; ++i) { 95 95 string argument(argv[i]); … … 108 108 } else if (argument == optionAllowExternalPages) 109 109 allowExternalPages = true; 110 else if (argument == optionStartupDialog) 111 startupDialog = true; 110 112 else if (argument.size() && argument[0] == '-') 111 113 fprintf(stderr, "Unknown option: %s\n", argv[i]); … … 117 119 return EXIT_FAILURE; 118 120 } 121 122 if (startupDialog) 123 openStartupDialog(); 119 124 120 125 { // Explicit scope for the TestShell instance. -
trunk/WebKitTools/DumpRenderTree/chromium/TestShell.h
r64463 r64615 186 186 187 187 void platformInit(int*, char***); 188 void openStartupDialog(); 188 189 189 190 #endif // TestShell_h -
trunk/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp
r64463 r64615 195 195 setupFontconfig(); 196 196 } 197 198 void openStartupDialog() 199 { 200 GtkWidget* dialog = gtk_message_dialog_new( 201 0, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "Attach to me?"); 202 gtk_window_set_title(GTK_WINDOW(dialog), "DumpRenderTree"); 203 gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop. 204 gtk_widget_destroy(dialog); 205 } -
trunk/WebKitTools/DumpRenderTree/chromium/TestShellMac.mm
r64463 r64615 128 128 { 129 129 } 130 131 void openStartupDialog() 132 { 133 // FIXME: This code doesn't work. Need NSApplication event loop? 134 NSAlert* alert = [[[NSAlert alloc] init] autorelease]; 135 alert.messageText = @"Attach to me?"; 136 alert.informativeText = @"This would probably be a good time to attach your debugger."; 137 [alert addButtonWithTitle:@"OK"]; 138 [alert runModal]; 139 } -
trunk/WebKitTools/DumpRenderTree/chromium/TestShellWin.cpp
r64463 r64615 150 150 // We don't need to release the font explicitly. 151 151 } 152 153 void openStartupDialog() 154 { 155 ::MessageBox(0, L"Attach to me?", L"DumpRenderTree", MB_OK); 156 }
Note: See TracChangeset
for help on using the changeset viewer.