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

Side by Side Diff: chrome/test/perf/url_parse_perftest.cc

Issue 208029: Upstreamings parts of webkit.gyp (step 2) (Closed)
Patch Set: removed hash Created 11 years, 3 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
« no previous file with comments | « no previous file | webkit/config.gyp » ('j') | webkit/webcore.gyp » ('J')
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 "base/perftimer.h" 5 #include "base/perftimer.h"
6 #include "googleurl/src/gurl.h" 6 #include "googleurl/src/gurl.h"
7 #include "googleurl/src/url_canon.h" 7 #include "googleurl/src/url_canon.h"
8 #include "googleurl/src/url_canon_stdstring.h" 8 #include "googleurl/src/url_canon_stdstring.h"
9 #include "googleurl/src/url_parse.h" 9 #include "googleurl/src/url_parse.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 // TODO(darin): chrome code should not depend on WebCore innards 12 // TODO(darin): chrome code should not depend on WebCore innards
13 #if 0 13 #if 0
14 #pragma warning(push, 0) 14 #pragma warning(push, 0)
15 15
16 // This is because we have multiple headers called "CString.h" and KURL.cpp 16 // This is because we have multiple headers called "CString.h" and KURL.cpp
17 // can grab the wrong one. 17 // can grab the wrong one.
18 #include "webkit/third_party/WebCore/platform/CString.h" 18 #include "webkit/third_party/WebCore/platform/CString.h"
19 19
20 #undef USE_GOOGLE_URL_LIBRARY
21 #define KURL WebKitKURL 20 #define KURL WebKitKURL
22 #include "KURL.h" 21 #include "KURL.h"
23 #include "KURL.cpp" 22 #include "KURL.cpp"
24 #pragma warning(pop) 23 #pragma warning(pop)
25 24
26 TEST(URLParse, FullURL) { 25 TEST(URLParse, FullURL) {
27 const char url[] = "http://me:pass@host/foo/bar.html;param?query=yes#ref"; 26 const char url[] = "http://me:pass@host/foo/bar.html;param?query=yes#ref";
28 int url_len = static_cast<int>(strlen(url)); 27 int url_len = static_cast<int>(strlen(url));
29 28
30 url_parse::Parsed parsed; 29 url_parse::Parsed parsed;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 PerfTimeLogger timer_kurl("Typical_KURL_AMillion"); 140 PerfTimeLogger timer_kurl("Typical_KURL_AMillion");
142 for (int i = 0; i < 333333; i++) { // divide by 3 so we get 1M 141 for (int i = 0; i < 333333; i++) { // divide by 3 so we get 1M
143 WebCore::WebKitKURL kurl1(typical_url1); 142 WebCore::WebKitKURL kurl1(typical_url1);
144 WebCore::WebKitKURL kurl2(typical_url2); 143 WebCore::WebKitKURL kurl2(typical_url2);
145 WebCore::WebKitKURL kurl3(typical_url3); 144 WebCore::WebKitKURL kurl3(typical_url3);
146 } 145 }
147 timer_kurl.Done(); 146 timer_kurl.Done();
148 } 147 }
149 148
150 #endif 149 #endif
OLDNEW
« no previous file with comments | « no previous file | webkit/config.gyp » ('j') | webkit/webcore.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698