OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/chromeos/arc/page_transition_util.h" | 5 #include "components/arc/intent_helper/page_transition_util.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "ui/base/page_transition_types.h" | 7 #include "ui/base/page_transition_types.h" |
8 | 8 |
9 namespace arc { | 9 namespace arc { |
10 | 10 |
11 // Tests that ShouldIgnoreNavigation returns false only for | 11 // Tests that ShouldIgnoreNavigation returns false only for |
12 // PAGE_TRANSITION_LINK. | 12 // PAGE_TRANSITION_LINK. |
13 TEST(PageTransitionUtilTest, TestShouldIgnoreNavigationWithCoreTypes) { | 13 TEST(PageTransitionUtilTest, TestShouldIgnoreNavigationWithCoreTypes) { |
14 EXPECT_FALSE(ShouldIgnoreNavigation(ui::PAGE_TRANSITION_LINK, false)); | 14 EXPECT_FALSE(ShouldIgnoreNavigation(ui::PAGE_TRANSITION_LINK, false)); |
15 EXPECT_FALSE(ShouldIgnoreNavigation(ui::PAGE_TRANSITION_LINK, true)); | 15 EXPECT_FALSE(ShouldIgnoreNavigation(ui::PAGE_TRANSITION_LINK, true)); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 ui::PAGE_TRANSITION_FROM_API), | 131 ui::PAGE_TRANSITION_FROM_API), |
132 false)); | 132 false)); |
133 EXPECT_TRUE(ShouldIgnoreNavigation( | 133 EXPECT_TRUE(ShouldIgnoreNavigation( |
134 ui::PageTransitionFromInt(ui::PAGE_TRANSITION_FORM_SUBMIT | | 134 ui::PageTransitionFromInt(ui::PAGE_TRANSITION_FORM_SUBMIT | |
135 ui::PAGE_TRANSITION_SERVER_REDIRECT | | 135 ui::PAGE_TRANSITION_SERVER_REDIRECT | |
136 ui::PAGE_TRANSITION_FROM_API), | 136 ui::PAGE_TRANSITION_FROM_API), |
137 true)); | 137 true)); |
138 } | 138 } |
139 | 139 |
140 } // namespace arc | 140 } // namespace arc |
OLD | NEW |