| 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..4d595b44de0bc6f72baf0bc4c4c09dcb3bf4fc21 100644
|
| --- a/chrome/test/data/webui/settings/route_tests.js
|
| +++ b/chrome/test/data/webui/settings/route_tests.js
|
| @@ -157,4 +157,25 @@ 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/'));
|
| +
|
| + if (cr.isChromeOS) {
|
| + // Path with a dash.
|
| + assertEquals(
|
| + settings.Route.KEYBOARD,
|
| + settings.getRouteForPath('/keyboard-overlay/'));
|
| + }
|
| + });
|
| });
|
|
|