Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7787)

Unified Diff: chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc

Issue 1062013003: [Sync] Sync the chrome://history page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
index 0d6c1da3ff1b49b9ced6ea7d581a9306d82e761d..6860df3c84f71e51684226d2c1c49e09183f40e2 100644
--- a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/typed_urls_helper.h"
+#include "chrome/common/url_constants.h"
#include "components/history/core/browser/history_types.h"
#include "components/sessions/session_types.h"
#include "sync/util/time.h"
@@ -16,10 +17,12 @@
using sessions_helper::CheckInitialState;
using sessions_helper::GetLocalWindows;
using sessions_helper::GetSessionData;
+using sessions_helper::ModelAssociatorHasTabWithUrl;
using sessions_helper::OpenTabAndGetLocalWindows;
using sessions_helper::ScopedWindowMap;
using sessions_helper::SessionWindowMap;
using sessions_helper::SyncedSessionVector;
+using sessions_helper::WaitForTabsToLoad;
using sessions_helper::WindowsMatch;
using sync_integration_test_util::AwaitCommitActivityCompletion;
using typed_urls_helper::GetUrlFromClient;
@@ -33,14 +36,7 @@ class SingleClientSessionsSyncTest : public SyncTest {
DISALLOW_COPY_AND_ASSIGN(SingleClientSessionsSyncTest);
};
-// Timeout on Windows, see http://crbug.com/99819
-#if defined(OS_WIN)
-#define MAYBE_Sanity DISABLED_Sanity
-#else
-#define MAYBE_Sanity Sanity
-#endif
-
-IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, MAYBE_Sanity) {
+IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, Sanity) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(CheckInitialState(0));
@@ -63,6 +59,25 @@ IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, MAYBE_Sanity) {
ASSERT_TRUE(WindowsMatch(*old_windows.Get(), *new_windows.Get()));
}
+IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, ChromeHistory) {
+ ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
+
+ ASSERT_TRUE(CheckInitialState(0));
+
+ // Add a new session to client 0 and wait for it to sync.
+ ScopedWindowMap old_windows;
+ ASSERT_TRUE(OpenTabAndGetLocalWindows(0,
+ GURL(chrome::kChromeUIHistoryURL),
+ old_windows.GetMutable()));
+ std::vector<GURL> urls;
+ urls.push_back(GURL(chrome::kChromeUIHistoryURL));
+ ASSERT_TRUE(WaitForTabsToLoad(0, urls));
+
+ // Verify the chrome history page synced.
+ ASSERT_TRUE(ModelAssociatorHasTabWithUrl(0,
+ GURL(chrome::kChromeUIHistoryURL)));
+}
+
IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, TimestampMatchesHistory) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";

Powered by Google App Engine
This is Rietveld 408576698