| Index: ios/chrome/browser/web/visible_url_egtest.mm
|
| diff --git a/ios/chrome/browser/web/visible_url_egtest.mm b/ios/chrome/browser/web/visible_url_egtest.mm
|
| index 364fb6500ea6ef7aaefd7e47c4084b4ced723d21..f14423f2983af90ec487e12feb8bca1d32a3c541 100644
|
| --- a/ios/chrome/browser/web/visible_url_egtest.mm
|
| +++ b/ios/chrome/browser/web/visible_url_egtest.mm
|
| @@ -7,12 +7,14 @@
|
| #include "base/memory/ptr_util.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| +#include "ios/chrome/browser/experimental_flags.h"
|
| #include "ios/chrome/browser/ui/ui_util.h"
|
| #import "ios/chrome/test/app/chrome_test_util.h"
|
| #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
|
| #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
|
| #import "ios/chrome/test/earl_grey/chrome_matchers.h"
|
| #import "ios/chrome/test/earl_grey/chrome_test_case.h"
|
| +#import "ios/testing/earl_grey/disabled_test_macros.h"
|
| #import "ios/web/public/test/http_server.h"
|
| #include "ios/web/public/test/http_server_util.h"
|
| #include "ios/web/public/test/response_providers/html_response_provider.h"
|
| @@ -173,6 +175,10 @@
|
| // Tests that visible URL is always the same as last committed URL during
|
| // pending back and forward navigations.
|
| - (void)testBackForwardNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -219,6 +225,10 @@
|
| // Tests that visible URL is always the same as last committed URL during
|
| // pending navigations initialted from back history popover.
|
| - (void)testHistoryNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -248,6 +258,10 @@
|
| // Tests that stopping a pending Back navigation and reloading reloads committed
|
| // URL, not pending URL.
|
| - (void)testStoppingPendingBackNavigationAndReload {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -281,6 +295,10 @@
|
| // Tests that visible URL is always the same as last committed URL during
|
| // back forward navigations initiated with JS.
|
| - (void)testJSBackForwardNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -326,6 +344,10 @@
|
| // Tests that visible URL is always the same as last committed URL during go
|
| // navigations initiated with JS.
|
| - (void)testJSGoNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -372,6 +394,10 @@
|
| // Tests that visible URL is always the same as last committed URL during go
|
| // back navigation started with pending reload in progress.
|
| - (void)testBackNavigationWithPendingReload {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -410,6 +436,10 @@
|
| // back navigation initiated with pending renderer-initiated navigation in
|
| // progress.
|
| - (void)testBackNavigationWithPendingRendererInitiatedNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -440,6 +470,10 @@
|
| // renderer-initiated navigation started with pending back navigation in
|
| // progress.
|
| - (void)testRendererInitiatedNavigationWithPendingBackNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Purge web view caches and pause the server to make sure that tests can
|
| // verify omnibox state before server starts responding.
|
| PurgeCachedWebViewPages();
|
| @@ -470,6 +504,10 @@
|
| // Tests that visible URL is always the same as last committed URL if user
|
| // issues 2 go back commands.
|
| - (void)testDoubleBackNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Create 3rd entry in the history, to be able to go back twice.
|
| [ChromeEarlGrey loadURL:_testURL3];
|
|
|
| @@ -501,6 +539,10 @@
|
| // Tests that visible URL is always the same as last committed URL if page calls
|
| // window.history.back() twice.
|
| - (void)testDoubleBackJSNavigation {
|
| + if (!experimental_flags::IsPendingIndexNavigationEnabled()) {
|
| + EARL_GREY_TEST_SKIPPED(@"Pending Index Navigation experiment is disabled");
|
| + }
|
| +
|
| // Create 3rd entry in the history, to be able to go back twice.
|
| [ChromeEarlGrey loadURL:_testURL3];
|
|
|
|
|