OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/i18n/number_formatting.h" | 5 #include "base/i18n/number_formatting.h" |
6 #include "base/memory/scoped_vector.h" | 6 #include "base/memory/scoped_vector.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/sessions/session_service.h" | 8 #include "chrome/browser/sessions/session_service.h" |
9 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 9 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
11 #include "chrome/browser/sync/test/integration/typed_urls_helper.h" | 11 #include "chrome/browser/sync/test/integration/typed_urls_helper.h" |
12 #include "components/history/core/browser/history_types.h" | 12 #include "components/history/core/browser/history_types.h" |
13 | 13 |
14 using typed_urls_helper::AddUrlToHistory; | 14 using typed_urls_helper::AddUrlToHistory; |
15 using typed_urls_helper::AwaitCheckAllProfilesHaveSameURLsAsVerifier; | 15 using typed_urls_helper::AwaitCheckAllProfilesHaveSameURLsAsVerifier; |
16 using typed_urls_helper::GetTypedUrlsFromClient; | 16 using typed_urls_helper::GetTypedUrlsFromClient; |
17 | 17 |
18 class MultipleClientTypedUrlsSyncTest : public SyncTest { | 18 class MultipleClientTypedUrlsSyncTest : public SyncTest { |
19 public: | 19 public: |
20 MultipleClientTypedUrlsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} | 20 MultipleClientTypedUrlsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} |
21 virtual ~MultipleClientTypedUrlsSyncTest() {} | 21 virtual ~MultipleClientTypedUrlsSyncTest() {} |
22 | 22 |
23 virtual bool TestUsesSelfNotifications() OVERRIDE { | 23 virtual bool TestUsesSelfNotifications() override { |
24 return false; | 24 return false; |
25 } | 25 } |
26 | 26 |
27 private: | 27 private: |
28 DISALLOW_COPY_AND_ASSIGN(MultipleClientTypedUrlsSyncTest); | 28 DISALLOW_COPY_AND_ASSIGN(MultipleClientTypedUrlsSyncTest); |
29 }; | 29 }; |
30 | 30 |
31 // TCM: 3728323 | 31 // TCM: 3728323 |
32 IN_PROC_BROWSER_TEST_F(MultipleClientTypedUrlsSyncTest, AddToOne) { | 32 IN_PROC_BROWSER_TEST_F(MultipleClientTypedUrlsSyncTest, AddToOne) { |
33 const base::string16 kHistoryUrl( | 33 const base::string16 kHistoryUrl( |
(...skipping 26 matching lines...) Expand all Loading... |
60 AddUrlToHistory(i, new_url); | 60 AddUrlToHistory(i, new_url); |
61 | 61 |
62 urls = GetTypedUrlsFromClient(i); | 62 urls = GetTypedUrlsFromClient(i); |
63 ASSERT_EQ(1U, urls.size()); | 63 ASSERT_EQ(1U, urls.size()); |
64 ASSERT_EQ(new_url, urls[0].url()); | 64 ASSERT_EQ(new_url, urls[0].url()); |
65 } | 65 } |
66 | 66 |
67 // Verify that all clients have all urls. | 67 // Verify that all clients have all urls. |
68 ASSERT_TRUE(AwaitCheckAllProfilesHaveSameURLsAsVerifier()); | 68 ASSERT_TRUE(AwaitCheckAllProfilesHaveSameURLsAsVerifier()); |
69 } | 69 } |
OLD | NEW |