[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tkent at chromium.org tkent at chromium.org
Wed Dec 22 11:41:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 06007bdb3cb87931f3ce0950ae257f87da74d02c
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 4 01:53:29 2010 +0000

    2010-08-03  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            [DRT/Chromium] Implement --testshell-startup-dialog
            https://bugs.webkit.org/show_bug.cgi?id=40616
    
            * DumpRenderTree/chromium/DumpRenderTree.cpp:
            (main): Check --testshell-startup-dialog, and call openStartUpDialog()
            if it is specfied.
            * DumpRenderTree/chromium/TestShell.h:
              Declare openStartUpDialog().
            * DumpRenderTree/chromium/TestShellGtk.cpp:
            (openStartupDialog):
            * DumpRenderTree/chromium/TestShellMac.mm:
            (openStartupDialog):
            * DumpRenderTree/chromium/TestShellWin.cpp:
            (openStartupDialog):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64615 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ec5525d..2c05ac5 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,25 @@
 
         Reviewed by Dimitri Glazkov.
 
+        [DRT/Chromium] Implement --testshell-startup-dialog
+        https://bugs.webkit.org/show_bug.cgi?id=40616
+
+        * DumpRenderTree/chromium/DumpRenderTree.cpp:
+        (main): Check --testshell-startup-dialog, and call openStartUpDialog()
+        if it is specfied.
+        * DumpRenderTree/chromium/TestShell.h:
+          Declare openStartUpDialog().
+        * DumpRenderTree/chromium/TestShellGtk.cpp:
+        (openStartupDialog):
+        * DumpRenderTree/chromium/TestShellMac.mm:
+        (openStartupDialog):
+        * DumpRenderTree/chromium/TestShellWin.cpp:
+        (openStartupDialog):
+
+2010-08-03  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
         [DRT/Chromium] Remove dependency of base/md5.h
         https://bugs.webkit.org/show_bug.cgi?id=43403
 
diff --git a/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp
index 2885cf6..726e412 100644
--- a/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -36,8 +36,6 @@
 
 using namespace std;
 
-void platformInit();
-
 static const char optionComplexText[] = "--complex-text";
 static const char optionDumpAllPixels[] = "--dump-all-pixels";
 static const char optionNotree[] = "--notree";
@@ -48,6 +46,7 @@ static const char optionTree[] = "--tree";
 static const char optionPixelTestsWithName[] = "--pixel-tests=";
 static const char optionTestShell[] = "--test-shell";
 static const char optionAllowExternalPages[] = "--allow-external-pages";
+static const char optionStartupDialog[] = "--testshell-startup-dialog";
 
 static void runTest(TestShell& shell, TestParams& params, const string& testName, bool testShellMode)
 {
@@ -91,6 +90,7 @@ int main(int argc, char* argv[])
     bool serverMode = false;
     bool testShellMode = false;
     bool allowExternalPages = false;
+    bool startupDialog = false;
     for (int i = 1; i < argc; ++i) {
         string argument(argv[i]);
         if (argument == "-")
@@ -107,6 +107,8 @@ int main(int argc, char* argv[])
             serverMode = true;
         } else if (argument == optionAllowExternalPages)
             allowExternalPages = true;
+        else if (argument == optionStartupDialog)
+            startupDialog = true;
         else if (argument.size() && argument[0] == '-')
             fprintf(stderr, "Unknown option: %s\n", argv[i]);
         else
@@ -117,6 +119,9 @@ int main(int argc, char* argv[])
         return EXIT_FAILURE;
     }
 
+    if (startupDialog)
+        openStartupDialog();
+
     { // Explicit scope for the TestShell instance.
         TestShell shell(testShellMode);
         shell.setAllowExternalPages(allowExternalPages);
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.h b/WebKitTools/DumpRenderTree/chromium/TestShell.h
index 0615552..47261a3 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.h
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.h
@@ -185,5 +185,6 @@ private:
 };
 
 void platformInit(int*, char***);
+void openStartupDialog();
 
 #endif // TestShell_h
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp b/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp
index a9d374c..56ee618 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp
@@ -194,3 +194,12 @@ void platformInit(int* argc, char*** argv)
 
     setupFontconfig();
 }
+
+void openStartupDialog()
+{
+    GtkWidget* dialog = gtk_message_dialog_new(
+        0, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "Attach to me?");
+    gtk_window_set_title(GTK_WINDOW(dialog), "DumpRenderTree");
+    gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop.
+    gtk_widget_destroy(dialog);
+}
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShellMac.mm b/WebKitTools/DumpRenderTree/chromium/TestShellMac.mm
index 19cfd07..71d990e 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShellMac.mm
+++ b/WebKitTools/DumpRenderTree/chromium/TestShellMac.mm
@@ -127,3 +127,13 @@ void TestShell::waitTestFinished()
 void platformInit(int*, char***)
 {
 }
+
+void openStartupDialog()
+{
+    // FIXME: This code doesn't work. Need NSApplication event loop?
+    NSAlert* alert = [[[NSAlert alloc] init] autorelease];
+    alert.messageText = @"Attach to me?";
+    alert.informativeText = @"This would probably be a good time to attach your debugger.";
+    [alert addButtonWithTitle:@"OK"];
+    [alert runModal];
+}
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShellWin.cpp b/WebKitTools/DumpRenderTree/chromium/TestShellWin.cpp
index 72f800c..0d818c4 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShellWin.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShellWin.cpp
@@ -149,3 +149,8 @@ void platformInit(int*, char***)
     }
     // We don't need to release the font explicitly.
 }
+
+void openStartupDialog()
+{
+    ::MessageBox(0, L"Attach to me?", L"DumpRenderTree", MB_OK);
+}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list