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

Unified Diff: content/child/background_sync/background_sync_type_converters_unittest.cc

Issue 1960843002: [OnionSoup] Move background_sync.mojom from //content to //third_party/WebKit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address dcheng@'s comment Created 4 years, 7 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
« no previous file with comments | « content/child/background_sync/background_sync_type_converters.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/background_sync/background_sync_type_converters_unittest.cc
diff --git a/content/child/background_sync/background_sync_type_converters_unittest.cc b/content/child/background_sync/background_sync_type_converters_unittest.cc
index 15270478f50517fa4976e4e2d207cc8d6bd0bb73..b822bdf53ffde9fc6099c395e05575e5177bb258 100644
--- a/content/child/background_sync/background_sync_type_converters_unittest.cc
+++ b/content/child/background_sync/background_sync_type_converters_unittest.cc
@@ -13,53 +13,52 @@ namespace {
TEST(BackgroundSyncTypeConverterTest, TestBlinkToMojoNetworkStateConversions) {
ASSERT_EQ(blink::WebSyncRegistration::NetworkStateAny,
ConvertTo<blink::WebSyncRegistration::NetworkState>(
- content::mojom::BackgroundSyncNetworkState::ANY));
+ blink::mojom::BackgroundSyncNetworkState::ANY));
ASSERT_EQ(blink::WebSyncRegistration::NetworkStateAvoidCellular,
ConvertTo<blink::WebSyncRegistration::NetworkState>(
- content::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR));
+ blink::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR));
ASSERT_EQ(blink::WebSyncRegistration::NetworkStateOnline,
ConvertTo<blink::WebSyncRegistration::NetworkState>(
- content::mojom::BackgroundSyncNetworkState::ONLINE));
+ blink::mojom::BackgroundSyncNetworkState::ONLINE));
}
TEST(BackgroundSyncTypeConverterTest, TestMojoToBlinkNetworkStateConversions) {
- ASSERT_EQ(content::mojom::BackgroundSyncNetworkState::ANY,
- ConvertTo<content::mojom::BackgroundSyncNetworkState>(
+ ASSERT_EQ(blink::mojom::BackgroundSyncNetworkState::ANY,
+ ConvertTo<blink::mojom::BackgroundSyncNetworkState>(
blink::WebSyncRegistration::NetworkStateAny));
- ASSERT_EQ(content::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR,
- ConvertTo<content::mojom::BackgroundSyncNetworkState>(
+ ASSERT_EQ(blink::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR,
+ ConvertTo<blink::mojom::BackgroundSyncNetworkState>(
blink::WebSyncRegistration::NetworkStateAvoidCellular));
- ASSERT_EQ(content::mojom::BackgroundSyncNetworkState::ONLINE,
- ConvertTo<content::mojom::BackgroundSyncNetworkState>(
+ ASSERT_EQ(blink::mojom::BackgroundSyncNetworkState::ONLINE,
+ ConvertTo<blink::mojom::BackgroundSyncNetworkState>(
blink::WebSyncRegistration::NetworkStateOnline));
}
TEST(BackgroundSyncTypeConverterTest, TestDefaultBlinkToMojoConversion) {
blink::WebSyncRegistration in;
- content::mojom::SyncRegistrationPtr out =
- ConvertTo<content::mojom::SyncRegistrationPtr>(in);
+ blink::mojom::SyncRegistrationPtr out =
+ ConvertTo<blink::mojom::SyncRegistrationPtr>(in);
ASSERT_EQ(blink::WebSyncRegistration::UNREGISTERED_SYNC_ID, out->id);
ASSERT_EQ("", out->tag);
- ASSERT_EQ(content::mojom::BackgroundSyncNetworkState::ONLINE,
+ ASSERT_EQ(blink::mojom::BackgroundSyncNetworkState::ONLINE,
out->network_state);
}
TEST(BackgroundSyncTypeConverterTest, TestFullBlinkToMojoConversion) {
blink::WebSyncRegistration in(
7, "BlinkToMojo", blink::WebSyncRegistration::NetworkStateAvoidCellular);
- content::mojom::SyncRegistrationPtr out =
- ConvertTo<content::mojom::SyncRegistrationPtr>(in);
+ blink::mojom::SyncRegistrationPtr out =
+ ConvertTo<blink::mojom::SyncRegistrationPtr>(in);
ASSERT_EQ(7, out->id);
ASSERT_EQ("BlinkToMojo", out->tag);
- ASSERT_EQ(content::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR,
+ ASSERT_EQ(blink::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR,
out->network_state);
}
TEST(BackgroundSyncTypeConverterTest, TestDefaultMojoToBlinkConversion) {
- content::mojom::SyncRegistrationPtr in(
- content::mojom::SyncRegistration::New());
+ blink::mojom::SyncRegistrationPtr in(blink::mojom::SyncRegistration::New());
std::unique_ptr<blink::WebSyncRegistration> out =
ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(in);
@@ -69,12 +68,10 @@ TEST(BackgroundSyncTypeConverterTest, TestDefaultMojoToBlinkConversion) {
}
TEST(BackgroundSyncTypeConverterTest, TestFullMojoToBlinkConversion) {
- content::mojom::SyncRegistrationPtr in(
- content::mojom::SyncRegistration::New());
+ blink::mojom::SyncRegistrationPtr in(blink::mojom::SyncRegistration::New());
in->id = 41;
in->tag = mojo::String("MojoToBlink");
- in->network_state =
- content::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR;
+ in->network_state = blink::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR;
std::unique_ptr<blink::WebSyncRegistration> out =
ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(in);
« no previous file with comments | « content/child/background_sync/background_sync_type_converters.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698