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

Unified Diff: components/arc/intent_helper/page_transition_util_unittest.cc

Issue 2562993002: Disallow [in]equality operator for PageTransition (Closed)
Patch Set: Disallow [in]equality operator for PageTransition Created 4 years 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 | « chrome/browser/net/net_error_tab_helper.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/intent_helper/page_transition_util_unittest.cc
diff --git a/components/arc/intent_helper/page_transition_util_unittest.cc b/components/arc/intent_helper/page_transition_util_unittest.cc
index 79f1e785d448bb86588d728f4cae1cb22a1e3013..cc6d5d3619f23c3be43715e7b364314b683dcf9f 100644
--- a/components/arc/intent_helper/page_transition_util_unittest.cc
+++ b/components/arc/intent_helper/page_transition_util_unittest.cc
@@ -49,9 +49,9 @@ TEST(PageTransitionUtilTest, TestShouldIgnoreNavigationWithCoreTypes) {
EXPECT_TRUE(ShouldIgnoreNavigation(ui::PAGE_TRANSITION_KEYWORD_GENERATED,
true, true));
- static_assert(
- ui::PAGE_TRANSITION_KEYWORD_GENERATED == ui::PAGE_TRANSITION_LAST_CORE,
- "Not all core transition types are covered here");
+ static_assert(static_cast<int32_t>(ui::PAGE_TRANSITION_KEYWORD_GENERATED) ==
+ static_cast<int32_t>(ui::PAGE_TRANSITION_LAST_CORE),
+ "Not all core transition types are covered here");
}
// Tests that ShouldIgnoreNavigation returns true when no qualifiers except
@@ -173,15 +173,15 @@ TEST(PageTransitionUtilTest, TestShouldIgnoreNavigationWithClientRedirect) {
TEST(PageTransitionUtilTest, TestMaskOutPageTransition) {
ui::PageTransition page_transition = ui::PageTransitionFromInt(
ui::PAGE_TRANSITION_LINK | ui::PAGE_TRANSITION_CLIENT_REDIRECT);
- EXPECT_EQ(ui::PAGE_TRANSITION_LINK,
- MaskOutPageTransition(page_transition,
- ui::PAGE_TRANSITION_CLIENT_REDIRECT));
+ EXPECT_EQ(static_cast<int>(ui::PAGE_TRANSITION_LINK),
+ static_cast<int>(MaskOutPageTransition(
+ page_transition, ui::PAGE_TRANSITION_CLIENT_REDIRECT)));
page_transition = ui::PageTransitionFromInt(
ui::PAGE_TRANSITION_LINK | ui::PAGE_TRANSITION_SERVER_REDIRECT);
- EXPECT_EQ(ui::PAGE_TRANSITION_LINK,
- MaskOutPageTransition(page_transition,
- ui::PAGE_TRANSITION_SERVER_REDIRECT));
+ EXPECT_EQ(static_cast<int>(ui::PAGE_TRANSITION_LINK),
+ static_cast<int>(MaskOutPageTransition(
+ page_transition, ui::PAGE_TRANSITION_SERVER_REDIRECT)));
}
// Test mixed variants between |allow_form_submit| and |allow_client_redirect|.
« no previous file with comments | « chrome/browser/net/net_error_tab_helper.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698