| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 transient_state.outer_window_size().width()); | 156 transient_state.outer_window_size().width()); |
| 157 EXPECT_EQ(window_bounds_.height(), | 157 EXPECT_EQ(window_bounds_.height(), |
| 158 transient_state.outer_window_size().height()); | 158 transient_state.outer_window_size().height()); |
| 159 EXPECT_EQ(kObfuscatedGaiaId, fingerprint->metadata().obfuscated_gaia_id()); | 159 EXPECT_EQ(kObfuscatedGaiaId, fingerprint->metadata().obfuscated_gaia_id()); |
| 160 EXPECT_EQ(kAltitude, location.altitude()); | 160 EXPECT_EQ(kAltitude, location.altitude()); |
| 161 EXPECT_EQ(kLatitude, location.latitude()); | 161 EXPECT_EQ(kLatitude, location.latitude()); |
| 162 EXPECT_EQ(kLongitude, location.longitude()); | 162 EXPECT_EQ(kLongitude, location.longitude()); |
| 163 EXPECT_EQ(kAccuracy, location.accuracy()); | 163 EXPECT_EQ(kAccuracy, location.accuracy()); |
| 164 EXPECT_EQ(kGeolocationTime, location.time_in_ms()); | 164 EXPECT_EQ(kGeolocationTime, location.time_in_ms()); |
| 165 | 165 |
| 166 message_loop_.Quit(); | 166 message_loop_.QuitWhenIdle(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 protected: | 169 protected: |
| 170 // Constants defining bounds in the screen coordinate system that are passed | 170 // Constants defining bounds in the screen coordinate system that are passed |
| 171 // verbatim to the fingerprinter code and should be serialized into the | 171 // verbatim to the fingerprinter code and should be serialized into the |
| 172 // resulting protocol buffer. Declared as class members because gfx::Rect is | 172 // resulting protocol buffer. Declared as class members because gfx::Rect is |
| 173 // not a POD type, so it cannot be statically initialized. | 173 // not a POD type, so it cannot be statically initialized. |
| 174 const gfx::Rect window_bounds_; | 174 const gfx::Rect window_bounds_; |
| 175 const gfx::Rect content_bounds_; | 175 const gfx::Rect content_bounds_; |
| 176 const gfx::Rect screen_bounds_; | 176 const gfx::Rect screen_bounds_; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 base::TimeDelta::FromDays(1), // Ought to be longer than any test run. | 213 base::TimeDelta::FromDays(1), // Ought to be longer than any test run. |
| 214 base::Bind(&AutofillRiskFingerprintTest::GetFingerprintTestCallback, | 214 base::Bind(&AutofillRiskFingerprintTest::GetFingerprintTestCallback, |
| 215 base::Unretained(this))); | 215 base::Unretained(this))); |
| 216 | 216 |
| 217 // Wait for the callback to be called. | 217 // Wait for the callback to be called. |
| 218 message_loop_.Run(); | 218 message_loop_.Run(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace risk | 221 } // namespace risk |
| 222 } // namespace autofill | 222 } // namespace autofill |
| OLD | NEW |