Chromium Code Reviews| 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 <stddef.h> | 5 #include <stddef.h> | 
| 6 | 6 | 
| 7 #include "base/macros.h" | 7 #include "base/macros.h" | 
| 8 #include "chrome/browser/sync/test/integration/printers_helper.h" | 8 #include "chrome/browser/sync/test/integration/printers_helper.h" | 
| 9 #include "chrome/browser/sync/test/integration/sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" | 
| 10 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h " | 10 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h " | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 AddPrinter(GetVerifierPrinterStore(), printers_helper::CreateTestPrinter(0)); | 46 AddPrinter(GetVerifierPrinterStore(), printers_helper::CreateTestPrinter(0)); | 
| 47 ASSERT_EQ(1, GetPrinterCount(0)); | 47 ASSERT_EQ(1, GetPrinterCount(0)); | 
| 48 ASSERT_EQ(1, GetVerifierPrinterCount()); | 48 ASSERT_EQ(1, GetVerifierPrinterCount()); | 
| 49 | 49 | 
| 50 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); | 50 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); | 
| 51 EXPECT_EQ(1, GetVerifierPrinterCount()); | 51 EXPECT_EQ(1, GetVerifierPrinterCount()); | 
| 52 EXPECT_TRUE(ProfileContainsSamePrintersAsVerifier(0)); | 52 EXPECT_TRUE(ProfileContainsSamePrintersAsVerifier(0)); | 
| 53 } | 53 } | 
| 54 | 54 | 
| 55 // Verify editing a printer doesn't add it. | 55 // Verify editing a printer doesn't add it. | 
| 56 // Flaky on ChromeOS. http://crbug.com/701999 | 56 IN_PROC_BROWSER_TEST_F(SingleClientPrintersSyncTest, EditPrinter) { | 
| 57 #if defined(OS_CHROMEOS) | |
| 58 #define MAYBE_EditPrinter DISABLED_EditPrinter | |
| 59 #else | |
| 60 #define MAYBE_EditPrinter EditPrinter | |
| 61 #endif | |
| 62 IN_PROC_BROWSER_TEST_F(SingleClientPrintersSyncTest, MAYBE_EditPrinter) { | |
| 63 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 57 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 
| 64 | 58 | 
| 59 // Wait for sync service initialization before proceeding. | |
| 
 
skym
2017/03/16 23:41:00
It concerns me that this is needed, and that you'r
 
skau
2017/03/18 00:04:55
I've moved it into SetupSync so it's used in the o
 
 | |
| 60 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); | |
| 61 | |
| 65 AddPrinter(GetPrinterStore(0), printers_helper::CreateTestPrinter(0)); | 62 AddPrinter(GetPrinterStore(0), printers_helper::CreateTestPrinter(0)); | 
| 66 AddPrinter(GetVerifierPrinterStore(), printers_helper::CreateTestPrinter(0)); | 63 AddPrinter(GetVerifierPrinterStore(), printers_helper::CreateTestPrinter(0)); | 
| 67 | 64 | 
| 68 ASSERT_TRUE( | 65 ASSERT_TRUE( | 
| 69 EditPrinterDescription(GetPrinterStore(0), 0, "Updated description")); | 66 EditPrinterDescription(GetPrinterStore(0), 0, "Updated description")); | 
| 70 | 67 | 
| 71 EXPECT_EQ(1, GetPrinterCount(0)); | 68 EXPECT_EQ(1, GetPrinterCount(0)); | 
| 72 EXPECT_EQ(1, GetVerifierPrinterCount()); | 69 EXPECT_EQ(1, GetVerifierPrinterCount()); | 
| 73 EXPECT_FALSE(ProfileContainsSamePrintersAsVerifier(0)); | 70 EXPECT_FALSE(ProfileContainsSamePrintersAsVerifier(0)); | 
| 74 } | 71 } | 
| (...skipping 17 matching lines...) Expand all Loading... | |
| 92 #define MAYBE_AddBeforeSetup AddBeforeSetup | 89 #define MAYBE_AddBeforeSetup AddBeforeSetup | 
| 93 #endif | 90 #endif | 
| 94 IN_PROC_BROWSER_TEST_F(SingleClientPrintersSyncTest, MAYBE_AddBeforeSetup) { | 91 IN_PROC_BROWSER_TEST_F(SingleClientPrintersSyncTest, MAYBE_AddBeforeSetup) { | 
| 95 ASSERT_TRUE(SetupClients()); | 92 ASSERT_TRUE(SetupClients()); | 
| 96 | 93 | 
| 97 AddPrinter(GetPrinterStore(0), printers_helper::CreateTestPrinter(0)); | 94 AddPrinter(GetPrinterStore(0), printers_helper::CreateTestPrinter(0)); | 
| 98 EXPECT_EQ(1, GetPrinterCount(0)); | 95 EXPECT_EQ(1, GetPrinterCount(0)); | 
| 99 | 96 | 
| 100 EXPECT_TRUE(SetupSync()) << "SetupSync() failed."; | 97 EXPECT_TRUE(SetupSync()) << "SetupSync() failed."; | 
| 101 } | 98 } | 
| OLD | NEW |