summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-07 17:16:57 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-07 17:16:57 +0000
commit2657565eff4ffe083f39ded18bdea6cfbdcc2da7 (patch)
tree9942f73d4108a4eacd0b828623cb76cdf0d60bba /chrome/test
parent8aff32fa5b195d30c37a9f3a1cd5f115bf8d83b1 (diff)
downloadchromium_src-2657565eff4ffe083f39ded18bdea6cfbdcc2da7.zip
chromium_src-2657565eff4ffe083f39ded18bdea6cfbdcc2da7.tar.gz
chromium_src-2657565eff4ffe083f39ded18bdea6cfbdcc2da7.tar.bz2
Moved the sync_integration_test in chrome.gypi so that they will build on all platforms.
Patch by Brian Lum (brianlum at google.com) Original Review: http://codereview.chromium.org/526016 Review URL: http://codereview.chromium.org/523113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/live_sync/bookmark_model_verifier.cc2
-rw-r--r--chrome/test/live_sync/live_bookmarks_sync_test.cc7
-rw-r--r--chrome/test/live_sync/profile_sync_service_test_harness.cc2
-rw-r--r--chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc25
-rw-r--r--chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc97
5 files changed, 116 insertions, 17 deletions
diff --git a/chrome/test/live_sync/bookmark_model_verifier.cc b/chrome/test/live_sync/bookmark_model_verifier.cc
index c1ac92d..a9a41a9 100644
--- a/chrome/test/live_sync/bookmark_model_verifier.cc
+++ b/chrome/test/live_sync/bookmark_model_verifier.cc
@@ -163,6 +163,7 @@ const BookmarkNode* BookmarkModelVerifier::AddNonEmptyGroup(
url.append(".com");
const BookmarkNode* child_nofavicon_bm =
AddURL(model, bm_folder, child_index, child_bm_title, GURL(url));
+ EXPECT_TRUE(child_nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring child_bmfolder_title(bm_folder->GetTitle());
@@ -170,6 +171,7 @@ const BookmarkNode* BookmarkModelVerifier::AddNonEmptyGroup(
child_bmfolder_title.append(IntToWString(index));
const BookmarkNode* child_bm_folder =
AddGroup(model, bm_folder, child_index, child_bmfolder_title);
+ EXPECT_TRUE(child_bm_folder != NULL);
}
}
return bm_folder;
diff --git a/chrome/test/live_sync/live_bookmarks_sync_test.cc b/chrome/test/live_sync/live_bookmarks_sync_test.cc
index 8d16edc..15913cb 100644
--- a/chrome/test/live_sync/live_bookmarks_sync_test.cc
+++ b/chrome/test/live_sync/live_bookmarks_sync_test.cc
@@ -68,7 +68,7 @@ const BookmarkNode* LiveBookmarksSyncTest::GetByUniqueURL(BookmarkModel* m,
const GURL& url) {
std::vector<const BookmarkNode*> nodes;
m->GetNodesByURL(url, &nodes);
- EXPECT_EQ(1, nodes.size());
+ EXPECT_EQ(1U, nodes.size());
return nodes[0];
}
@@ -86,6 +86,11 @@ void LiveBookmarksSyncTest::SetUpInProcessBrowserTestFixture() {
net::RuleBasedHostResolverProc* resolver =
new net::RuleBasedHostResolverProc(host_resolver());
resolver->AllowDirectLookup("*.google.com");
+ // Allow direct lookup of thawte.com. On Linux, we use Chromium's nss
+ // implementation which uses ocsp.thawte.com for certificate verification.
+ // Without this, running the test case on Linux causes an error as we make an
+ // external DNS lookup of "ocsp.thawte.com".
+ resolver->AllowDirectLookup("*.thawte.com");
mock_host_resolver_override_.reset(
new net::ScopedDefaultHostResolverProc(resolver));
}
diff --git a/chrome/test/live_sync/profile_sync_service_test_harness.cc b/chrome/test/live_sync/profile_sync_service_test_harness.cc
index 50f0aca..74b8928 100644
--- a/chrome/test/live_sync/profile_sync_service_test_harness.cc
+++ b/chrome/test/live_sync/profile_sync_service_test_harness.cc
@@ -81,7 +81,7 @@ class ConflictTimeoutEvent
: public base::RefCountedThreadSafe<ConflictTimeoutEvent> {
public:
explicit ConflictTimeoutEvent(ProfileSyncServiceTestHarness* caller)
- : caller_(caller), did_run_(false) {
+ : did_run_(false), caller_(caller) {
}
// The entry point to the class from PostDelayedTask.
diff --git a/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc b/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc
index 5e81e23..0ccacad 100644
--- a/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc
+++ b/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc
@@ -49,13 +49,13 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, Sanity) {
const BookmarkNode* tier1_a = verifier->AddGroup(m, top, 0, L"tier1_a");
const BookmarkNode* tier1_b = verifier->AddGroup(m, top, 1, L"tier1_b");
const BookmarkNode* t1au0 = verifier->AddURL(m, tier1_a, 0, L"tier1_a_url0",
- GURL(L"http://mail.google.com"));
+ GURL("http://mail.google.com"));
const BookmarkNode* t1au1 = verifier->AddURL(m, tier1_a, 1, L"tier1_a_url1",
- GURL(L"http://www.pandora.com"));
+ GURL("http://www.pandora.com"));
const BookmarkNode* t1au2 = verifier->AddURL(
- m, tier1_a, 2, L"tier1_a_url2", GURL(L"http://www.facebook.com"));
+ m, tier1_a, 2, L"tier1_a_url2", GURL("http://www.facebook.com"));
const BookmarkNode* t1bu0 = verifier->AddURL(m, tier1_b, 0, L"tier1_b_url0",
- GURL(L"http://www.nhl.com"));
+ GURL("http://www.nhl.com"));
ASSERT_TRUE(SetupSync()) << "Failed to SetupSync";
// SetupSync returns after init, which means got_zero_updates, which means
@@ -88,13 +88,14 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, Sanity) {
// -> tier1_a_url0
const BookmarkNode* bar = m->GetBookmarkBarNode();
const BookmarkNode* cnn =
- verifier->AddURL(m, bar, 0, L"CNN", GURL(L"http://www.cnn.com"));
+ verifier->AddURL(m, bar, 0, L"CNN", GURL("http://www.cnn.com"));
+ ASSERT_TRUE(cnn != NULL);
verifier->Move(m, tier1_a, bar, 1); // 1 should be the end at this point.
ASSERT_TRUE(client()->AwaitSyncCycleCompletion("Bookmark moved."));
verifier->ExpectMatch(m);
const BookmarkNode* porsche = verifier->AddURL(
- m, bar, 2, L"Porsche", GURL(L"http://www.porsche.com"));
+ m, bar, 2, L"Porsche", GURL("http://www.porsche.com"));
// Rearrange stuff in tier1_a.
EXPECT_EQ(tier1_a, t1au2->GetParent());
EXPECT_EQ(tier1_a, t1au1->GetParent());
@@ -106,12 +107,14 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, Sanity) {
EXPECT_EQ(1, t1au0->GetParent()->IndexOfChild(t1au0));
verifier->Move(m, t1au0, bar, bar->GetChildCount());
const BookmarkNode* boa = verifier->AddURL(m, bar, bar->GetChildCount(),
- L"Bank of America", GURL(L"https://www.bankofamerica.com"));
+ L"Bank of America", GURL("https://www.bankofamerica.com"));
+ ASSERT_TRUE(boa != NULL);
verifier->Move(m, t1au0, top, top->GetChildCount());
const BookmarkNode* bubble = verifier->AddURL(m, bar, bar->GetChildCount(),
- L"Seattle Bubble", GURL(L"http://seattlebubble.com"));
+ L"Seattle Bubble", GURL("http://seattlebubble.com"));
+ ASSERT_TRUE(bubble != NULL);
const BookmarkNode* wired = verifier->AddURL(m, bar, 2, L"Wired News",
- GURL(L"http://www.wired.com"));
+ GURL("http://www.wired.com"));
const BookmarkNode* tier2_b = verifier->AddGroup(m, tier1_b, 0, L"tier2_b");
verifier->Move(m, t1bu0, tier2_b, 0);
verifier->Move(m, porsche, bar, 0);
@@ -127,9 +130,9 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, Sanity) {
const BookmarkNode* tier3_b = verifier->AddGroup(m, tier2_b, 1, L"tier3_b");
const BookmarkNode* leafs = verifier->AddURL(
m, tier1_a, 0, L"Toronto Maple Leafs",
- GURL(L"http://mapleleafs.nhl.com"));
+ GURL("http://mapleleafs.nhl.com"));
const BookmarkNode* wynn = verifier->AddURL(
- m, bar, 1, L"Wynn", GURL(L"http://www.wynnlasvegas.com"));
+ m, bar, 1, L"Wynn", GURL("http://www.wynnlasvegas.com"));
verifier->Move(m, wynn, tier3_b, 0);
verifier->Move(m, leafs, tier3_b, 0);
diff --git a/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc b/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc
index 736833c..8994d63 100644
--- a/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc
+++ b/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc
@@ -159,7 +159,7 @@ class LiveSyncTestPrePopulatedHistory1K
PathService::Get(chrome::DIR_USER_DATA, &dest_user_data_dir);
dest_user_data_dir = dest_user_data_dir.Append(
FILE_PATH_LITERAL("Default"));
- file_util::CreateDirectoryW(dest_user_data_dir);
+ file_util::CreateDirectory(dest_user_data_dir);
FilePath sync_data_source;
PathService::Get(base::DIR_SOURCE_ROOT, &sync_data_source);
sync_data_source = sync_data_source.Append(FILE_PATH_LITERAL("chrome"));
@@ -177,7 +177,7 @@ class LiveSyncTestPrePopulatedHistory1K
FilePath source_file = sync_data.Next();
while (!source_file.empty()) {
FilePath dest_file = dest_user_data_dir.Append(source_file.BaseName());
- ASSERT_TRUE(file_util::CopyFileW(source_file, dest_file));
+ ASSERT_TRUE(file_util::CopyFile(source_file, dest_file));
source_file = sync_data.Next();
}
}
@@ -300,12 +300,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, Sanity) {
{
const BookmarkNode* google_one = verifier->AddURL(model_one, bbn_one, 0,
L"Google", google_url);
+ ASSERT_TRUE(google_one != NULL);
// To make this test deterministic, we wait here so there is no race to
// decide which bookmark actually gets position 0.
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
const BookmarkNode* yahoo_two = verifier->AddURL(model_two, bbn_two, 0,
L"Yahoo", GURL("http://www.yahoo.com"));
+ ASSERT_TRUE(yahoo_two != NULL);
}
ASSERT_TRUE(client2()->AwaitMutualSyncCycleCompletion(client1()));
verifier->ExpectMatch(model_one);
@@ -319,6 +321,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, Sanity) {
verifier->SetTitle(model_one, bbn_one->GetChild(0), L"Yahoo!!");
const BookmarkNode* cnn_one = verifier->AddURL(model_one,
bbn_one, 1, L"CNN", GURL("http://www.cnn.com"));
+ ASSERT_TRUE(cnn_one != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -327,6 +330,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, Sanity) {
{
const BookmarkNode* facebook_two = verifier->AddURL(model_two,
bbn_two, 0, L"Facebook", GURL("http://www.facebook.com"));
+ ASSERT_TRUE(facebook_two != NULL);
}
// AwaitMutualSyncCycleCompletion blocks the calling object before the
@@ -383,6 +387,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
{
const BookmarkNode* google = verifier->AddURL(model_one, bbn_one, 0,
title, initial_url);
+ ASSERT_TRUE(google != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
@@ -474,6 +479,7 @@ IN_PROC_BROWSER_TEST_F(LiveSyncTestPrePopulatedHistory1K,
{
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one, bbn_one, 0,
L"Welcome to Facebook! | Facebook", GURL("http://www.facebook.com"));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -499,6 +505,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
// Let's add first bookmark folder to client1
const BookmarkNode* new_folder_one =
verifier->AddGroup(model_one, bbn_one, 0, L"TestFolder");
+ ASSERT_TRUE(new_folder_one != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -523,6 +530,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
{
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one, bbn_one, 0,
L"TestBookmark", GURL("http://www.nofaviconurl.com"));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -545,8 +553,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
{
const BookmarkNode* ftp_bm = verifier->AddURL(model_one, bbn_one, 0,
L"FTPBookmark", GURL("ftp://ftp.testbookmark.com"));
+ ASSERT_TRUE(ftp_bm != NULL);
const BookmarkNode* file_bm = verifier->AddURL(model_one, bbn_one, 1,
L"FileBookmark", GURL("file:///"));
+ ASSERT_TRUE(file_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -575,6 +585,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* test_bm1 = verifier->AddURL(
model_one, new_folder_one, 0,
L"BM Test", GURL("http://www.bmtest.com"));
+ ASSERT_TRUE(test_bm1 != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
@@ -605,6 +616,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
for (int index = 0; index < 10; index++) {
wstring title(L"TestBookmark");
@@ -614,6 +626,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, other_bm_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -646,6 +659,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"BB - TestBMFolder");
@@ -664,6 +678,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder, index, child_title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
}
}
@@ -677,6 +692,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, other_bm_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -701,8 +717,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
{
const BookmarkNode* google_bm = verifier->AddURL(model_one, bbn_one, 0,
L"Google", GURL("http://www.google.com"));
+ ASSERT_TRUE(google_bm != NULL);
const BookmarkNode* google_news_bm = verifier->AddURL(model_one, bbn_one, 1,
L"Google", GURL("http://www.google.com/news"));
+ ASSERT_TRUE(google_news_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -860,12 +878,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, test_bm_folder, index,
title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"Test BMFolder - ChildTestBMFolder");
title.append(IntToWString(index));
const BookmarkNode* bm_folder =
verifier->AddGroup(model_one, test_bm_folder, index, title);
+ ASSERT_TRUE(bm_folder != NULL);
}
}
@@ -908,6 +928,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
// Let's add first bookmark folder under parent_bm_folder.
@@ -926,12 +947,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, test_bm_folder, index,
title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"Test BMFolder - ChildTestBMFolder");
title.append(IntToWString(index));
const BookmarkNode* bm_folder =
verifier->AddGroup(model_one, test_bm_folder, index, title);
+ ASSERT_TRUE(bm_folder != NULL);
}
}
@@ -996,6 +1019,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
{
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one, bbn_one, 0,
L"TestBookmark", GURL("http://www.nofaviconurl.com"));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1033,6 +1057,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* nofavicon_bm = verifier->AddURL(
model_one, bbn_one, index,
title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1073,6 +1098,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, bm_folder_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1114,6 +1140,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* nofavicon_bm = verifier->AddURL(
model_one, bm_folder_one,
index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1155,6 +1182,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, bm_folder_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1195,6 +1223,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, bm_folder_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1225,6 +1254,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
// Let's add first bookmark folder to client1
const BookmarkNode* bm_folder_one =
verifier->AddGroup(model_one, bbn_one, 0, L"TestFolder");
+ ASSERT_TRUE(bm_folder_one != NULL);
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1250,12 +1280,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
BookmarkModel* model_two = profile2()->GetBookmarkModel();
const BookmarkNode* bbn_one = model_one->GetBookmarkBarNode();
const BookmarkNode* other_bm_one = model_one->other_node();
+ ASSERT_TRUE(other_bm_one != NULL);
verifier->ExpectMatch(model_one);
verifier->ExpectMatch(model_two);
// Let's add first bookmark folder to client1
const BookmarkNode* bm_folder_one =
verifier->AddGroup(model_one, bbn_one, 0, L"TestFolder");
+ ASSERT_TRUE(bm_folder_one != NULL);
// Let's add some bookmarks(without favicon)
for (int index = 1; index < 15; index++) {
int random_int = base::RandInt(1, 100);
@@ -1268,12 +1300,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one, bbn_one,
index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"BB - TestBMFolder");
title.append(IntToWString(index));
const BookmarkNode* bm_folder = verifier->AddGroup(model_one, bbn_one,
index, title);
+ ASSERT_TRUE(bm_folder != NULL);
}
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
@@ -1298,13 +1332,16 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
BookmarkModel* model_one = profile1()->GetBookmarkModel();
BookmarkModel* model_two = profile2()->GetBookmarkModel();
const BookmarkNode* bbn_one = model_one->GetBookmarkBarNode();
+ ASSERT_TRUE(bbn_one != NULL);
const BookmarkNode* other_bm_one = model_one->other_node();
+ ASSERT_TRUE(other_bm_one != NULL);
verifier->ExpectMatch(model_one);
verifier->ExpectMatch(model_two);
// Let's add bookmark and bookmark folder to client1
const BookmarkNode* yahoo = verifier->AddURL(model_one, bbn_one, 0,
L"Yahoo!", GURL("http://www.yahoo.com"));
+ ASSERT_TRUE(yahoo != NULL);
const BookmarkNode* bm_folder_one =
verifier->AddGroup(model_one, bbn_one, 1, L"TestFolder");
// Let's add some bookmarks(without favicon) and folders to
@@ -1320,12 +1357,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one, bbn_one,
index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"BB - TestBMFolder");
title.append(IntToWString(index));
const BookmarkNode* bm_folder = verifier->AddGroup(model_one, bbn_one,
index, title);
+ ASSERT_TRUE(bm_folder != NULL);
}
}
@@ -1338,6 +1377,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1363,12 +1403,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
BookmarkModel* model_two = profile2()->GetBookmarkModel();
const BookmarkNode* bbn_one = model_one->GetBookmarkBarNode();
const BookmarkNode* other_bm_one = model_one->other_node();
+ ASSERT_TRUE(other_bm_one != NULL);
verifier->ExpectMatch(model_one);
verifier->ExpectMatch(model_two);
// Let's add bookmark and bookmark folder to client1
const BookmarkNode* yahoo = verifier->AddURL(model_one, bbn_one, 0,
L"Yahoo", GURL("http://www.yahoo.com"));
+ ASSERT_TRUE(yahoo != NULL);
const BookmarkNode* bm_folder_one =
verifier->AddGroup(model_one, bbn_one, 1, L"TestFolder");
// Let's add some bookmarks(without favicon) and folders to
@@ -1384,12 +1426,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one, bbn_one,
index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"BB - TestBMFolder");
title.append(IntToWString(index));
const BookmarkNode* bm_folder = verifier->AddGroup(model_one, bbn_one,
index, title);
+ ASSERT_TRUE(bm_folder != NULL);
}
}
@@ -1406,6 +1450,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"Level2 - TestBMFolder");
@@ -1427,12 +1472,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
l2_bm_folder, index2, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"Level3 - TestBMFolder");
title.append(IntToWString(index));
const BookmarkNode* l3_bm_folder =
verifier->AddGroup(model_one, l2_bm_folder, index2, title);
+ ASSERT_TRUE(l3_bm_folder != NULL);
}
} // end inner for loop
}
@@ -1478,6 +1525,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
// Let's add first bookmark folder under parent_bm_folder.
@@ -1496,12 +1544,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, test_bm_folder, index, title,
GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
} else {
// Remaining % of time - Add Bookmark folders
wstring title(L"Test BMFolder - ChildTestBMFolder");
title.append(IntToWString(index));
const BookmarkNode* bm_folder =
verifier->AddGroup(model_one, test_bm_folder, index, title);
+ ASSERT_TRUE(bm_folder != NULL);
}
}
@@ -1534,9 +1584,11 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* bm_a = verifier->AddURL(
model_one, bbn_one, 0, L"Bookmark A",
GURL("http://www.nofaviconurla.com"));
+ ASSERT_TRUE(bm_a != NULL);
const BookmarkNode* bm_b = verifier->AddURL(
model_one, bbn_one, 1, L"Bookmark B",
GURL("http://www.nofaviconurlb.com"));
+ ASSERT_TRUE(bm_b != NULL);
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1573,6 +1625,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
@@ -1598,17 +1651,18 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
BookmarkModel* model_two = profile2()->GetBookmarkModel();
const BookmarkNode* bbn_one = model_one->GetBookmarkBarNode();
const BookmarkNode* other_bm_one = model_one->other_node();
+ ASSERT_TRUE(other_bm_one != NULL);
verifier->ExpectMatch(model_one);
verifier->ExpectMatch(model_two);
// Let's add bookmark and bookmark folder to client1
const BookmarkNode* yahoo = verifier->AddURL(model_one, bbn_one, 0,
L"Yahoo", GURL("http://www.yahoo.com"));
+ ASSERT_TRUE(yahoo != NULL);
const BookmarkNode* bm_folder_one =
verifier->AddGroup(model_one, bbn_one, 1, L"TestFolder");
// Let's add some bookmarks(without favicon) to bookmark bar
for (int index = 2; index < 10; index++) {
- int random_int = base::RandInt(1, 100);
wstring title(L"BB - TestBookmark");
title.append(IntToWString(index));
string url("http://www.nofaviconurl");
@@ -1616,6 +1670,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one, bbn_one,
index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1642,17 +1697,18 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
BookmarkModel* model_two = profile2()->GetBookmarkModel();
const BookmarkNode* bbn_one = model_one->GetBookmarkBarNode();
const BookmarkNode* other_bm_one = model_one->other_node();
+ ASSERT_TRUE(other_bm_one != NULL);
verifier->ExpectMatch(model_one);
verifier->ExpectMatch(model_two);
// Let's add bookmark and bookmark folder to client1
const BookmarkNode* yahoo = verifier->AddURL(model_one, bbn_one, 0,
L"Yahoo", GURL("http://www.yahoo.com"));
+ ASSERT_TRUE(yahoo != NULL);
const BookmarkNode* bm_folder_one =
verifier->AddGroup(model_one, bbn_one, 1, L"TestFolder");
// Let's add some bookmarks(without favicon) to bm_folder_one
for (int index = 0; index < 10; index++) {
- int random_int = base::RandInt(1, 100);
wstring title(L"BB - TestBookmark");
title.append(IntToWString(index));
string url("http://www.nofaviconurl");
@@ -1660,6 +1716,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1713,6 +1770,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm =
verifier->AddURL(model_one, child_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
@@ -1750,12 +1808,15 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* bm_a = verifier->AddURL(
model_one, parent_folder, 0, L"Bookmark A",
GURL("http://www.nofaviconurl-a.com"));
+ ASSERT_TRUE(bm_a != NULL);
const BookmarkNode* bm_b = verifier->AddURL(
model_one, parent_folder, 1, L"Bookmark B",
GURL("http://www.nofaviconurl-b.com"));
+ ASSERT_TRUE(bm_b != NULL);
const BookmarkNode* bm_c = verifier->AddURL(
model_one, parent_folder, 2, L"Bookmark C",
GURL("http://www.nofaviconurl-c.com"));
+ ASSERT_TRUE(bm_c != NULL);
const BookmarkNode* child_folder =
verifier->AddGroup(model_one, parent_folder, 3, L"Test Child BMFolder");
@@ -1763,18 +1824,23 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* bm_d = verifier->AddURL(
model_one, child_folder, 0, L"Bookmark D",
GURL("http://www.nofaviconurl-d.com"));
+ ASSERT_TRUE(bm_d != NULL);
const BookmarkNode* bm_e = verifier->AddURL(
model_one, child_folder, 1, L"Bookmark E",
GURL("http://www.nofaviconurl-e.com"));
+ ASSERT_TRUE(bm_e != NULL);
const BookmarkNode* bm_f = verifier->AddURL(
model_one, child_folder, 2, L"Bookmark F",
GURL("http://www.nofaviconurl-f.com"));
+ ASSERT_TRUE(bm_f != NULL);
const BookmarkNode* bm_g = verifier->AddURL(
model_one, child_folder, 3, L"Bookmark G",
GURL("http://www.nofaviconurl-g.com"));
+ ASSERT_TRUE(bm_g != NULL);
const BookmarkNode* bm_h = verifier->AddURL(
model_one, child_folder, 4, L"Bookmark H",
GURL("http://www.nofaviconurl-h.com"));
+ ASSERT_TRUE(bm_h != NULL);
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -1819,6 +1885,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
wstring title(L"Test BMFolder-");
title.append(IntToWString(level));
@@ -1888,6 +1955,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
wstring title(L"Test BMFolder-");
title.append(IntToWString(level));
@@ -1960,6 +2028,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
wstring title(L"Test BMFolder-");
title.append(IntToWString(level));
@@ -2016,6 +2085,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
wstring title(L"Test BMFolder-");
title.append(IntToWString(level));
@@ -2039,6 +2109,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
my_bm_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
// Let's wait until all the changes populate to another client.
@@ -2083,6 +2154,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
bm_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
wstring title(L"Test BMFolder-");
title.append(IntToWString(level));
@@ -2106,6 +2178,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm = verifier->AddURL(model_one,
my_bm_folder, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm != NULL);
}
// Let's wait until all the changes populate to another client.
@@ -2140,8 +2213,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
const BookmarkNode* bm_folder_a =
verifier->AddNonEmptyGroup(model_one, bbn_one, 0, L"TestBMFolderA", 10);
+ ASSERT_TRUE(bm_folder_a != NULL);
const BookmarkNode* bm_folder_b =
verifier->AddNonEmptyGroup(model_one, bbn_one, 1, L"TestBMFolderB", 10);
+ ASSERT_TRUE(bm_folder_b != NULL);
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
verifier->ExpectMatch(model_one);
@@ -2173,6 +2248,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
title.append(IntToWString(index));
const BookmarkNode* child_bm_folder = verifier->AddNonEmptyGroup(
model_one, bbn_one, index, title, 10);
+ ASSERT_TRUE(child_bm_folder != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletion(client2()));
@@ -2221,13 +2297,17 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
{
const BookmarkNode* bm_foo1 = model_one->AddURL(
bbn_one, 0, L"Foo1", GURL("http://www.foo1.com"));
+ ASSERT_TRUE(bm_foo1 != NULL);
const BookmarkNode* bm_foo3 = model_two->AddURL(
bbn_two, 0, L"Foo3", GURL("http://www.foo3.com"));
+ ASSERT_TRUE(bm_foo3 != NULL);
const BookmarkNode* bm_foo2 = model_one->AddURL(
bbn_one, 1, L"Foo2", GURL("http://www.foo2.com"));
+ ASSERT_TRUE(bm_foo2 != NULL);
const BookmarkNode* bm_foo4 = model_two->AddURL(
bbn_two, 1, L"Foo4", GURL("http://www.foo4.com"));
+ ASSERT_TRUE(bm_foo4 != NULL);
}
ASSERT_TRUE(client1()->AwaitMutualSyncCycleCompletionWithConflict(client2()));
@@ -2289,8 +2369,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm_client1 =
model_one->AddURL(bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client1 != NULL);
const BookmarkNode* nofavicon_bm_client2 =
model_two->AddURL(bbn_two, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client2 != NULL);
}
// Let's add some different bookmarks (without favicon) to client1.
@@ -2302,6 +2384,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm_client1 =
model_one->AddURL(bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client1 != NULL);
}
// Let's add some different bookmarks (without favicon) to client2.
@@ -2313,6 +2396,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm_client2 =
model_two->AddURL(bbn_two, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client2 != NULL);
}
// Set up sync on both clients.
@@ -2354,8 +2438,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm_client1 =
model_one->AddURL(bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client1 != NULL);
const BookmarkNode* nofavicon_bm_client2 =
model_two->AddURL(bbn_two, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client2 != NULL);
}
// Let's add some different bookmarks (without favicon) to client2.
@@ -2367,6 +2453,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm_client2 =
model_two->AddURL(bbn_two, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client2 != NULL);
}
// Set up sync on both clients.
@@ -2408,8 +2495,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
url.append(".com");
const BookmarkNode* nofavicon_bm_client1 =
model_one->AddURL(bbn_one, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client1 != NULL);
const BookmarkNode* nofavicon_bm_client2 =
model_two->AddURL(bbn_two, index, title, GURL(url));
+ ASSERT_TRUE(nofavicon_bm_client2 != NULL);
}
// Set up sync on both clients.