| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 | 5 |
| 6 /** | 6 /** |
| 7 * @fileoverview Tests the local NTP. | 7 * @fileoverview Tests the local NTP. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 return pass; | 64 return pass; |
| 65 } | 65 } |
| 66 | 66 |
| 67 | 67 |
| 68 /** | 68 /** |
| 69 * Tests that Google NTPs show a fakebox and logo. | 69 * Tests that Google NTPs show a fakebox and logo. |
| 70 */ | 70 */ |
| 71 function testShowsFakeboxAndLogoIfGoogle() { | 71 function testShowsFakeboxAndLogoIfGoogle() { |
| 72 var localNTP = LocalNTP({href: 'isGoogle'}); | 72 var localNTP = LocalNTP(); |
| 73 configData.isGooglePage = true; |
| 73 localNTP.init(); | 74 localNTP.init(); |
| 74 assert($('fakebox')); | 75 assert($('fakebox')); |
| 75 assert($('logo')); | 76 assert($('logo')); |
| 76 } | 77 } |
| 77 | 78 |
| 78 | 79 |
| 79 /** | 80 /** |
| 80 * Tests that non-Google NTPs do not show a fakebox. | 81 * Tests that non-Google NTPs do not show a fakebox. |
| 81 */ | 82 */ |
| 82 function testDoesNotShowFakeboxIfNotGoogle() { | 83 function testDoesNotShowFakeboxIfNotGoogle() { |
| 83 var localNTP = LocalNTP({href: ''}); | 84 var localNTP = LocalNTP(); |
| 85 configData.isGooglePage = false; |
| 84 localNTP.init(); | 86 localNTP.init(); |
| 85 assert(!$('fakebox')); | 87 assert(!$('fakebox')); |
| 86 assert(!$('logo')); | 88 assert(!$('logo')); |
| 87 } | 89 } |
| OLD | NEW |