OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/gcm_driver/instance_id/instance_id_driver.h" | 5 #include "components/gcm_driver/instance_id/instance_id_driver.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <cmath> | 9 #include <cmath> |
| 10 |
8 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
11 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
12 #include "components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h" | 16 #include "components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h" |
13 #include "components/gcm_driver/instance_id/instance_id.h" | 17 #include "components/gcm_driver/instance_id/instance_id.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
15 | 19 |
16 namespace instance_id { | 20 namespace instance_id { |
17 | 21 |
18 namespace { | 22 namespace { |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 GetToken(instance_id, kAuthorizedEntity1, kScope2, options); | 351 GetToken(instance_id, kAuthorizedEntity1, kScope2, options); |
348 EXPECT_FALSE(new_token1.empty()); | 352 EXPECT_FALSE(new_token1.empty()); |
349 EXPECT_NE(token1, new_token1); | 353 EXPECT_NE(token1, new_token1); |
350 | 354 |
351 // The other token is not affected by the deletion. | 355 // The other token is not affected by the deletion. |
352 EXPECT_EQ(token2, | 356 EXPECT_EQ(token2, |
353 GetToken(instance_id, kAuthorizedEntity2, kScope1, options)); | 357 GetToken(instance_id, kAuthorizedEntity2, kScope1, options)); |
354 } | 358 } |
355 | 359 |
356 } // instance_id | 360 } // instance_id |
OLD | NEW |