| Index: chrome/test/data/webui/settings/route_tests.js
|
| diff --git a/chrome/test/data/webui/settings/route_tests.js b/chrome/test/data/webui/settings/route_tests.js
|
| index eb5b01d1e1c553c139232c4e9b0d43e5e15f2f06..32e13d1f571686e0326f338ab0ab516ca0c48a44 100644
|
| --- a/chrome/test/data/webui/settings/route_tests.js
|
| +++ b/chrome/test/data/webui/settings/route_tests.js
|
| @@ -157,4 +157,31 @@ suite('route', function() {
|
| assertFalse(settings.lastRouteChangeWasPopstate());
|
| });
|
| });
|
| +
|
| + test('getRouteForPath trailing slashes', function() {
|
| + assertEquals(settings.Route.BASIC, settings.getRouteForPath('/'));
|
| + assertEquals(null, settings.getRouteForPath('//'));
|
| +
|
| + // Simple path.
|
| + assertEquals(settings.Route.PEOPLE, settings.getRouteForPath('/people/'));
|
| + assertEquals(settings.Route.PEOPLE, settings.getRouteForPath('/people'));
|
| +
|
| + // Path with a slash.
|
| + assertEquals(
|
| + settings.Route.SITE_SETTINGS_COOKIES,
|
| + settings.getRouteForPath('/content/cookies'));
|
| + assertEquals(
|
| + settings.Route.SITE_SETTINGS_COOKIES,
|
| + settings.getRouteForPath('/content/cookies/'));
|
| +
|
| + if (cr.isChromeOS) {
|
| + // Path with a dash.
|
| + assertEquals(
|
| + settings.Route.KEYBOARD,
|
| + settings.getRouteForPath('/keyboard-overlay'));
|
| + assertEquals(
|
| + settings.Route.KEYBOARD,
|
| + settings.getRouteForPath('/keyboard-overlay/'));
|
| + }
|
| + });
|
| });
|
|
|