diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-02 16:42:15 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-02 16:42:15 +0000 |
commit | d49a6264617043a450e776984a76468b542ba411 (patch) | |
tree | 739da24590680b5c6e6e789db4d1b44e4ac8115a /webkit/tools/test_shell/test_shell_main.cc | |
parent | bcfad371249f11b922d3b7695286626331551b12 (diff) | |
download | chromium_src-d49a6264617043a450e776984a76468b542ba411.zip chromium_src-d49a6264617043a450e776984a76468b542ba411.tar.gz chromium_src-d49a6264617043a450e776984a76468b542ba411.tar.bz2 |
Initial pass at simple event tracing. I added a few traces to tcp_socket and test_shell to get an idea of what a simple trace might look like.
Here's a sample output line:
11:24:19.660604 0x1e278:0x1e24c BEGIN url.load [0x5 http://mail.google.com/mail/] <E:\src\cr\src\webkit\tools\test_shell\test_webview_delegate.cc:189>
format is:hh:mm:ss.us pid:tid TYPE NAME [id, extra] <file:line>
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_main.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 6117cda..0383424 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -23,10 +23,12 @@ #include "base/stack_container.h" #include "base/stats_table.h" #include "base/string_util.h" +#include "base/trace_event.h" #include "breakpad/src/client/windows/handler/exception_handler.h" #include "net/base/cookie_monster.h" #include "net/base/net_module.h" #include "net/http/http_cache.h" +#include "net/http/http_network_layer.h" #include "net/url_request/url_request_context.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/window_open_disposition.h" @@ -140,6 +142,14 @@ int main(int argc, char* argv[]) _set_abort_behavior(0, _WRITE_ABORT_MSG); } + if (parsed_command_line.HasSwitch(test_shell::kEnableTracing)) + base::TraceLog::StartTracing(); + + // Make the selection of network stacks early on before any consumers try to + // issue HTTP requests. + if (parsed_command_line.HasSwitch(test_shell::kUseNewHttp)) + net::HttpNetworkLayer::UseWinHttp(false); + bool layout_test_mode = parsed_command_line.HasSwitch(test_shell::kLayoutTests); |