chrome: Fix NavigationTest and ResourceRequestHandlerTest failures (see issue #2969)

This commit is contained in:
Marshall Greenblatt
2021-04-02 18:07:43 -04:00
parent 25701cfa6f
commit 09c6586480
3 changed files with 36 additions and 7 deletions

View File

@@ -1824,11 +1824,17 @@ class LoadNavTestHandler : public TestHandler {
EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType());
if (mode_ == LOAD || request->GetURL() == kLoadNav1) {
EXPECT_EQ(kTransitionExplicitLoad, request->GetTransitionType());
EXPECT_FALSE(user_gesture);
if (IsChromeRuntimeEnabled()) {
// With the Chrome runtime this is true on initial navigation via
// chrome::AddTabAt() and also true for clicked links.
EXPECT_TRUE(user_gesture);
} else {
EXPECT_FALSE(user_gesture);
}
} else {
EXPECT_EQ(ExpectedOpenURLTransitionType(), request->GetTransitionType());
if (mode_ == LEFT_CLICK) {
if (mode_ == LEFT_CLICK || IsChromeRuntimeEnabled()) {
EXPECT_TRUE(user_gesture);
} else {
EXPECT_FALSE(user_gesture);