| 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/rand_util.h" | 5 #include "base/rand_util.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 8 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const char kGenericSubfolderName[] = "Subfolder Name"; | 59 const char kGenericSubfolderName[] = "Subfolder Name"; |
| 60 const char kValidPassphrase[] = "passphrase!"; | 60 const char kValidPassphrase[] = "passphrase!"; |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 class TwoClientBookmarksSyncTest : public SyncTest { | 64 class TwoClientBookmarksSyncTest : public SyncTest { |
| 65 public: | 65 public: |
| 66 TwoClientBookmarksSyncTest() : SyncTest(TWO_CLIENT) {} | 66 TwoClientBookmarksSyncTest() : SyncTest(TWO_CLIENT) {} |
| 67 virtual ~TwoClientBookmarksSyncTest() {} | 67 virtual ~TwoClientBookmarksSyncTest() {} |
| 68 | 68 |
| 69 virtual void TearDownInProcessBrowserTestFixture() override { | 69 void TearDownInProcessBrowserTestFixture() override { |
| 70 SyncTest::TearDownInProcessBrowserTestFixture(); | 70 SyncTest::TearDownInProcessBrowserTestFixture(); |
| 71 policy_provider_.Shutdown(); | 71 policy_provider_.Shutdown(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 // Needs to be deleted after all Profiles are deleted. | 75 // Needs to be deleted after all Profiles are deleted. |
| 76 policy::MockConfigurationPolicyProvider policy_provider_; | 76 policy::MockConfigurationPolicyProvider policy_provider_; |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(TwoClientBookmarksSyncTest); | 79 DISALLOW_COPY_AND_ASSIGN(TwoClientBookmarksSyncTest); |
| (...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 | 2124 |
| 2125 // Verify that the managed bookmark exists in the local model of the first | 2125 // Verify that the managed bookmark exists in the local model of the first |
| 2126 // Profile, and has a child node. | 2126 // Profile, and has a child node. |
| 2127 ASSERT_EQ(1, managed_node0->child_count()); | 2127 ASSERT_EQ(1, managed_node0->child_count()); |
| 2128 ASSERT_TRUE(managed_node0->IsVisible()); | 2128 ASSERT_TRUE(managed_node0->IsVisible()); |
| 2129 EXPECT_EQ(GURL("http://youtube.com/"), managed_node0->GetChild(0)->url()); | 2129 EXPECT_EQ(GURL("http://youtube.com/"), managed_node0->GetChild(0)->url()); |
| 2130 | 2130 |
| 2131 // Verify that the second Profile didn't get this node. | 2131 // Verify that the second Profile didn't get this node. |
| 2132 ASSERT_EQ(0, managed_node1->child_count()); | 2132 ASSERT_EQ(0, managed_node1->child_count()); |
| 2133 } | 2133 } |
| OLD | NEW |