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

Unified Diff: ios/chrome/browser/web/visible_url_egtest.mm

Issue 2759483002: Revert of Cleaned up old navigation code that did not use pending navigation item. (Closed)
Patch Set: Created 3 years, 9 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 | « ios/chrome/browser/tabs/tab.mm ('k') | ios/web/interstitials/web_interstitial_impl.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | ios/web/interstitials/web_interstitial_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698