OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 var assertEq = chrome.test.assertEq; | 5 var assertEq = chrome.test.assertEq; |
6 var assertTrue = chrome.test.assertTrue; | 6 var assertTrue = chrome.test.assertTrue; |
7 var fail = chrome.test.fail; | 7 var fail = chrome.test.fail; |
8 var succeed = chrome.test.succeed; | 8 var succeed = chrome.test.succeed; |
9 | 9 |
10 function assertThrowsError(method, opt_expectedError) { | 10 function assertThrowsError(method, opt_expectedError) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 assertEq('undefined', typeof(document.linkColor)); | 58 assertEq('undefined', typeof(document.linkColor)); |
59 assertEq('undefined', typeof(document.vlinkColor)); | 59 assertEq('undefined', typeof(document.vlinkColor)); |
60 | 60 |
61 succeed(); | 61 succeed(); |
62 }, | 62 }, |
63 | 63 |
64 function testHistory() { | 64 function testHistory() { |
65 // Accessing these logs warnings to the console. | 65 // Accessing these logs warnings to the console. |
66 assertEq('undefined', typeof(history.back)); | 66 assertEq('undefined', typeof(history.back)); |
67 assertEq('undefined', typeof(history.forward)); | 67 assertEq('undefined', typeof(history.forward)); |
| 68 assertEq('undefined', typeof(history.go)); |
68 assertEq('undefined', typeof(history.length)); | 69 assertEq('undefined', typeof(history.length)); |
69 | 70 |
70 // These are part of the HTML5 History API that are feature detected, so we | 71 // These are part of the HTML5 History API that are feature detected, so we |
71 // remove them altogether, allowing apps to have fallback behavior. | 72 // remove them altogether, allowing apps to have fallback behavior. |
72 chrome.test.assertFalse('pushState' in history); | 73 chrome.test.assertFalse('pushState' in history); |
73 chrome.test.assertFalse('replaceState' in history); | 74 chrome.test.assertFalse('replaceState' in history); |
74 chrome.test.assertFalse('state' in history); | 75 chrome.test.assertFalse('state' in history); |
75 | 76 |
76 succeed(); | 77 succeed(); |
77 }, | 78 }, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 assertEq('undefined', typeof(chrome.extension)); | 188 assertEq('undefined', typeof(chrome.extension)); |
188 succeed(); | 189 succeed(); |
189 }, | 190 }, |
190 | 191 |
191 function testExtensionApis() { | 192 function testExtensionApis() { |
192 assertEq('undefined', typeof(chrome.tabs)); | 193 assertEq('undefined', typeof(chrome.tabs)); |
193 assertEq('undefined', typeof(chrome.windows)); | 194 assertEq('undefined', typeof(chrome.windows)); |
194 succeed(); | 195 succeed(); |
195 } | 196 } |
196 ]); | 197 ]); |
OLD | NEW |