OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
1 // History api test for Chrome. | 5 // History api test for Chrome. |
2 // browser_tests.exe --gtest_filter=ExtensionHistoryApiTest.Delete | 6 // browser_tests.exe --gtest_filter=ExtensionHistoryApiTest.Delete |
3 | 7 |
4 // runHistoryTestFns is defined in ./common.js . | 8 // runHistoryTestFns is defined in ./common.js . |
5 runHistoryTestFns([ | 9 runHistoryTestFns([ |
6 // All the tests require a blank state to start from. If this fails, | 10 // All the tests require a blank state to start from. If this fails, |
7 // expect all other history tests (ExtensionHistoryApiTest.*) to fail. | 11 // expect all other history tests (ExtensionHistoryApiTest.*) to fail. |
8 function clearHistory() { | 12 function clearHistory() { |
9 chrome.history.deleteAll(pass(function() { | 13 chrome.history.deleteAll(pass(function() { |
10 countItemsInHistory(pass(function(count) { | 14 countItemsInHistory(pass(function(count) { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 chrome.history.search(query, function(results) { | 166 chrome.history.search(query, function(results) { |
163 // Nothing should have been deleted. | 167 // Nothing should have been deleted. |
164 assertEq(2, results.length); | 168 assertEq(2, results.length); |
165 chrome.test.succeed(); | 169 chrome.test.succeed(); |
166 }); | 170 }); |
167 }); | 171 }); |
168 }); | 172 }); |
169 }); | 173 }); |
170 } | 174 } |
171 ]); | 175 ]); |
OLD | NEW |