| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "chrome/browser/sync/test/integration/printers_helper.h" | 9 #include "chrome/browser/sync/test/integration/printers_helper.h" |
| 10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 std::string valid_message = "YAY! More recent changes win!"; | 122 std::string valid_message = "YAY! More recent changes win!"; |
| 123 ASSERT_TRUE(EditPrinterDescription(GetPrinterStore(0), 0, valid_message)); | 123 ASSERT_TRUE(EditPrinterDescription(GetPrinterStore(0), 0, valid_message)); |
| 124 | 124 |
| 125 // Conflict resolution shoud run here. | 125 // Conflict resolution shoud run here. |
| 126 ASSERT_TRUE(PrintersMatchChecker().Wait()); | 126 ASSERT_TRUE(PrintersMatchChecker().Wait()); |
| 127 // The more recent update should win. | 127 // The more recent update should win. |
| 128 EXPECT_EQ(valid_message, GetPrinterStore(1)->GetPrinters()[0]->description()); | 128 EXPECT_EQ(valid_message, GetPrinterStore(1)->GetPrinters()[0]->description()); |
| 129 } | 129 } |
| 130 | 130 |
| 131 IN_PROC_BROWSER_TEST_F(TwoClientPrintersSyncTest, SimpleMerge) { | 131 // crbug.com/689662 |
| 132 #if defined(OS_CHROMEOS) |
| 133 #define MAYBE_SimpleMerge DISABLED_SimpleMerge |
| 134 #else |
| 135 #define MAYBE_SimpleMerge SimpleMerge |
| 136 #endif |
| 137 IN_PROC_BROWSER_TEST_F(TwoClientPrintersSyncTest, MAYBE_SimpleMerge) { |
| 132 ASSERT_TRUE(SetupClients()); | 138 ASSERT_TRUE(SetupClients()); |
| 133 base::RunLoop().RunUntilIdle(); | 139 base::RunLoop().RunUntilIdle(); |
| 134 | 140 |
| 135 // Store 0 has the even printers | 141 // Store 0 has the even printers |
| 136 AddPrinter(GetPrinterStore(0), CreateTestPrinter(0)); | 142 AddPrinter(GetPrinterStore(0), CreateTestPrinter(0)); |
| 137 AddPrinter(GetPrinterStore(0), CreateTestPrinter(2)); | 143 AddPrinter(GetPrinterStore(0), CreateTestPrinter(2)); |
| 138 | 144 |
| 139 // Store 1 has the odd printers | 145 // Store 1 has the odd printers |
| 140 AddPrinter(GetPrinterStore(1), CreateTestPrinter(1)); | 146 AddPrinter(GetPrinterStore(1), CreateTestPrinter(1)); |
| 141 AddPrinter(GetPrinterStore(1), CreateTestPrinter(3)); | 147 AddPrinter(GetPrinterStore(1), CreateTestPrinter(3)); |
| 142 | 148 |
| 143 ASSERT_TRUE(SetupSync()); | 149 ASSERT_TRUE(SetupSync()); |
| 144 | 150 |
| 145 // Stores should contain the same values now. | 151 // Stores should contain the same values now. |
| 146 EXPECT_EQ(4, GetPrinterCount(0)); | 152 EXPECT_EQ(4, GetPrinterCount(0)); |
| 147 EXPECT_TRUE(AllProfilesContainSamePrinters()); | 153 EXPECT_TRUE(AllProfilesContainSamePrinters()); |
| 148 } | 154 } |
| 149 | 155 |
| 150 } // namespace | 156 } // namespace |
| OLD | NEW |