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

Unified Diff: chrome/browser/resources/settings/route.js

Issue 2671493002: MD Settings: Fix some tests that break when run in Vulcanized mode. (Closed)
Patch Set: Undo Created 3 years, 11 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
Index: chrome/browser/resources/settings/route.js
diff --git a/chrome/browser/resources/settings/route.js b/chrome/browser/resources/settings/route.js
index c5b132cb30f0527340e2b1ceef28dc609f8d2ab0..2a779415dc417941ebe88b694984dc9629abaec3 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -302,6 +302,13 @@ cr.define('settings', function() {
}
};
+ function resetRouteForTesting() {
+ initializeRouteFromUrlCalled_ = false;
+ lastRouteChangeWasPopstate_ = false;
+ currentRoute_ = Route.BASIC;
+ currentQueryParameters_ = new URLSearchParams();
+ }
+
/**
* Helper function to set the current route and notify all observers.
* @param {!settings.Route} route
@@ -386,6 +393,7 @@ cr.define('settings', function() {
RouteObserverBehavior: RouteObserverBehavior,
getRouteForPath: getRouteForPath,
initializeRouteFromUrl: initializeRouteFromUrl,
+ resetRouteForTesting: resetRouteForTesting,
getCurrentRoute: getCurrentRoute,
getQueryParameters: getQueryParameters,
lastRouteChangeWasPopstate: lastRouteChangeWasPopstate,
« no previous file with comments | « chrome/browser/resources/settings/prefs/prefs.js ('k') | chrome/browser/resources/settings/settings_ui/settings_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698