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

Side by Side Diff: chrome/browser/autofill/risk/fingerprint_browsertest.cc

Issue 191093002: Simplify the user agent code some more since after r255534 it's not affected by the site's URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "components/autofill/content/browser/risk/fingerprint.h" 5 #include "components/autofill/content/browser/risk/fingerprint.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/port.h" 9 #include "base/port.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/common/chrome_content_client.h"
11 #include "chrome/test/base/in_process_browser_test.h" 12 #include "chrome/test/base/in_process_browser_test.h"
12 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" 13 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h"
13 #include "content/public/browser/geolocation_provider.h" 14 #include "content/public/browser/geolocation_provider.h"
14 #include "content/public/browser/gpu_data_manager.h" 15 #include "content/public/browser/gpu_data_manager.h"
15 #include "content/public/common/geoposition.h" 16 #include "content/public/common/geoposition.h"
16 #include "content/public/test/test_utils.h" 17 #include "content/public/test/test_utils.h"
17 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
19 #include "third_party/WebKit/public/platform/WebRect.h" 20 #include "third_party/WebKit/public/platform/WebRect.h"
20 #include "third_party/WebKit/public/platform/WebScreenInfo.h" 21 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 blink::WebScreenInfo screen_info; 194 blink::WebScreenInfo screen_info;
194 screen_info.depth = kScreenColorDepth; 195 screen_info.depth = kScreenColorDepth;
195 screen_info.rect = blink::WebRect(screen_bounds_); 196 screen_info.rect = blink::WebRect(screen_bounds_);
196 screen_info.availableRect = blink::WebRect(available_screen_bounds_); 197 screen_info.availableRect = blink::WebRect(available_screen_bounds_);
197 198
198 internal::GetFingerprintInternal( 199 internal::GetFingerprintInternal(
199 kObfuscatedGaiaId, window_bounds_, content_bounds_, screen_info, 200 kObfuscatedGaiaId, window_bounds_, content_bounds_, screen_info,
200 "25.0.0.123", kCharset, kAcceptLanguages, base::Time::Now(), 201 "25.0.0.123", kCharset, kAcceptLanguages, base::Time::Now(),
201 g_browser_process->GetApplicationLocale(), 202 g_browser_process->GetApplicationLocale(),
202 base::TimeDelta::FromDays(1), // Ought to be longer than any test run. 203 base::TimeDelta::FromDays(1), // Ought to be longer than any test run.
204 GetUserAgent(),
203 base::Bind(&AutofillRiskFingerprintTest::GetFingerprintTestCallback, 205 base::Bind(&AutofillRiskFingerprintTest::GetFingerprintTestCallback,
204 base::Unretained(this))); 206 base::Unretained(this)));
205 207
206 // Wait for the callback to be called. 208 // Wait for the callback to be called.
207 message_loop_.Run(); 209 message_loop_.Run();
208 } 210 }
209 211
210 } // namespace risk 212 } // namespace risk
211 } // namespace autofill 213 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698