OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** @fileoverview Suite of tests for Settings navigational transitions. */ | 5 /** @fileoverview Suite of tests for Settings navigational transitions. */ |
6 | 6 |
7 GEN_INCLUDE(['settings_page_browsertest.js']); | 7 GEN_INCLUDE(['settings_page_browsertest.js']); |
8 | 8 |
9 /** | 9 /** |
10 * @constructor | 10 * @constructor |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 return subpage; | 397 return subpage; |
398 }).then(function(subpage) { | 398 }).then(function(subpage) { |
399 // Close the subpage. | 399 // Close the subpage. |
400 return self.testCloseSubpage(section, subpage); | 400 return self.testCloseSubpage(section, subpage); |
401 }); | 401 }); |
402 }); | 402 }); |
403 }); | 403 }); |
404 | 404 |
405 mocha.run(); | 405 mocha.run(); |
406 }); | 406 }); |
| 407 |
| 408 TEST_F('SettingsTransitionsBrowserTest', 'Navigation', function() { |
| 409 var self = this; |
| 410 testing.Test.disableAnimationsAndTransitions(); |
| 411 |
| 412 suite('Navigation', function() { |
| 413 test('navigate between basic and advanced subpages', function(done) { |
| 414 var basic = self.getPage('basic'); |
| 415 var advanced; |
| 416 var section; |
| 417 |
| 418 assertEquals(settings.Route.BASIC, basic.currentRoute); |
| 419 settings.navigateTo(settings.Route.SEARCH_ENGINES); |
| 420 |
| 421 setTimeout(function() { |
| 422 section = self.getSection(basic, 'search'); |
| 423 assertGT(section.clientHeight, 0); |
| 424 |
| 425 settings.navigateTo(settings.Route.SITE_SETTINGS); |
| 426 setTimeout(function() { |
| 427 advanced = self.getPage('advanced'); |
| 428 section = self.getSection(advanced, 'privacy'); |
| 429 assertGT(section.clientHeight, 0); |
| 430 |
| 431 settings.navigateTo(settings.Route.FONTS); |
| 432 setTimeout(function() { |
| 433 section = self.getSection(basic, 'appearance'); |
| 434 assertGT(section.clientHeight, 0); |
| 435 done(); |
| 436 }); |
| 437 }); |
| 438 }); |
| 439 }); |
| 440 }); |
| 441 |
| 442 mocha.run(); |
| 443 }); |
OLD | NEW |