summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_history_api.cc2
-rw-r--r--chrome/browser/extensions/extension_history_api_constants.cc2
-rw-r--r--chrome/browser/extensions/extension_history_api_constants.h2
-rwxr-xr-xchrome/common/extensions/api/extension_api.json2
-rw-r--r--chrome/common/extensions/docs/experimental.history.html4
-rw-r--r--chrome/test/data/extensions/api_test/history/test.js24
-rwxr-xr-xchrome/test/data/extensions/api_test/permissions/disabled/background.html4
-rwxr-xr-xchrome/test/data/extensions/api_test/permissions/enabled/background.html4
8 files changed, 22 insertions, 22 deletions
diff --git a/chrome/browser/extensions/extension_history_api.cc b/chrome/browser/extensions/extension_history_api.cc
index af45f82..08c6cec 100644
--- a/chrome/browser/extensions/extension_history_api.cc
+++ b/chrome/browser/extensions/extension_history_api.cc
@@ -243,7 +243,7 @@ bool SearchHistoryFunction::RunAsyncImpl() {
// Initialize the HistoryQuery
std::wstring search_text;
- EXTENSION_FUNCTION_VALIDATE(json->GetString(keys::kSearchKey, &search_text));
+ EXTENSION_FUNCTION_VALIDATE(json->GetString(keys::kTextKey, &search_text));
history::QueryOptions options;
options.SetRecentDayRange(1);
diff --git a/chrome/browser/extensions/extension_history_api_constants.cc b/chrome/browser/extensions/extension_history_api_constants.cc
index 130890f..4abb406 100644
--- a/chrome/browser/extensions/extension_history_api_constants.cc
+++ b/chrome/browser/extensions/extension_history_api_constants.cc
@@ -15,8 +15,8 @@ const wchar_t kMaxResultsKey[] = L"maxResults";
const wchar_t kNewKey[] = L"new";
const wchar_t kReferringVisitId[] = L"referringVisitId";
const wchar_t kRemovedKey[] = L"removed";
-const wchar_t kSearchKey[] = L"search";
const wchar_t kStartTimeKey[] = L"startTime";
+const wchar_t kTextKey[] = L"text";
const wchar_t kTitleKey[] = L"title";
const wchar_t kTypedCountKey[] = L"typedCount";
const wchar_t kVisitCountKey[] = L"visitCount";
diff --git a/chrome/browser/extensions/extension_history_api_constants.h b/chrome/browser/extensions/extension_history_api_constants.h
index c6e3711..77596ab 100644
--- a/chrome/browser/extensions/extension_history_api_constants.h
+++ b/chrome/browser/extensions/extension_history_api_constants.h
@@ -19,8 +19,8 @@ extern const wchar_t kMaxResultsKey[];
extern const wchar_t kNewKey[];
extern const wchar_t kReferringVisitId[];
extern const wchar_t kRemovedKey[];
-extern const wchar_t kSearchKey[];
extern const wchar_t kStartTimeKey[];
+extern const wchar_t kTextKey[];
extern const wchar_t kTitleKey[];
extern const wchar_t kTypedCountKey[];
extern const wchar_t kVisitCountKey[];
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index ca67e5a..ea80713 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -1746,7 +1746,7 @@
"name": "query",
"type": "object",
"properties": {
- "search": {"type": "string", "description": "A free-text query to the history service, leave empty to retrieve all pages."},
+ "text": {"type": "string", "description": "A free-text query to the history service. Leave empty to retrieve all pages."},
"startTime": {"type": "number", "optional": true, "description": "Limit results to those visited after this date, represented in milliseconds since the epoch."},
"endTime": {"type": "number", "optional": true, "description": "Limit results to those visited before this date, represented in milliseconds since the epoch."},
"maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve. Defaults to 100."}
diff --git a/chrome/common/extensions/docs/experimental.history.html b/chrome/common/extensions/docs/experimental.history.html
index c49a258..f602b2e 100644
--- a/chrome/common/extensions/docs/experimental.history.html
+++ b/chrome/common/extensions/docs/experimental.history.html
@@ -1320,7 +1320,7 @@ For an example of using this API, see the
<div>
<div>
<dt>
- <var>search</var>
+ <var>text</var>
<em>
<!-- TYPE -->
@@ -1346,7 +1346,7 @@ For an example of using this API, see the
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>A free-text query to the history service, leave empty to retrieve all pages.</dd>
+ <dd>A free-text query to the history service. Leave empty to retrieve all pages.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
diff --git a/chrome/test/data/extensions/api_test/history/test.js b/chrome/test/data/extensions/api_test/history/test.js
index 5e6f4e0..8f7bed4 100644
--- a/chrome/test/data/extensions/api_test/history/test.js
+++ b/chrome/test/data/extensions/api_test/history/test.js
@@ -95,7 +95,7 @@ function tabsCompleteListener(tabId, changeInfo) {
* @param {function(number)} callback The closure.
*/
function countItemsInHistory(callback) {
- var query = {'search': ''};
+ var query = {'text': ''};
chrome.experimental.history.search(query, function(results) {
callback(results.length);
});
@@ -128,7 +128,7 @@ chrome.test.runTests([
// basicSearch callback.
function basicSearchTestVerification() {
removeItemVisitedListener();
- var query = { 'search': '' };
+ var query = { 'text': '' };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(GOOGLE_URL, results[0].url);
@@ -152,7 +152,7 @@ chrome.test.runTests([
function timeScopedSearchTestVerification() {
removeItemVisitedListener();
- var query = { 'search': '',
+ var query = { 'text': '',
'startTime': startDate.getTime(),
'endTime': endDate.getTime() };
chrome.experimental.history.search(query, function(results) {
@@ -200,7 +200,7 @@ chrome.test.runTests([
endDate = new Date();
endDate.setTime(endDate.getTime() + 1000);
- var query = { 'search': '',
+ var query = { 'text': '',
'startTime': startDate.getTime(),
'endTime': endDate.getTime() };
chrome.experimental.history.search(query, function(results) {
@@ -245,7 +245,7 @@ chrome.test.runTests([
removeItemVisitedListener();
- var query = { 'search': '', 'maxResults': 1 };
+ var query = { 'text': '', 'maxResults': 1 };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(PICASA_URL, results[0].url);
@@ -268,13 +268,13 @@ chrome.test.runTests([
var validateTest = function() {
// Continue with the test.
// A title search for www.a.com should find a.
- var query = { 'search': 'www.a.com' };
+ var query = { 'text': 'www.a.com' };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(A_RELATIVE_URL, results[0].url);
// Text in the body of b.html.
- query = { 'search': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' };
+ query = { 'text': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(B_RELATIVE_URL, results[0].url);
@@ -330,7 +330,7 @@ chrome.test.runTests([
removeItemVisitedListener();
// Verify that we received the url.
- var query = { 'search': '' };
+ var query = { 'text': '' };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(GOOGLE_URL, results[0].url);
@@ -357,7 +357,7 @@ chrome.test.runTests([
function deleteUrlTestVerification() {
removeItemRemovedListener();
- var query = { 'search': '' };
+ var query = { 'text': '' };
chrome.experimental.history.search(query, function(results) {
assertEq(0, results.length);
@@ -369,7 +369,7 @@ chrome.test.runTests([
function onAddedItem() {
removeItemVisitedListener();
- var query = { 'search': '' };
+ var query = { 'text': '' };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(GOOGLE_URL, results[0].url);
@@ -395,7 +395,7 @@ chrome.test.runTests([
function deleteRangeTestVerification() {
removeItemRemovedListener();
- var query = { 'search': '' };
+ var query = { 'text': '' };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(PICASA_URL, results[0].url);
@@ -448,7 +448,7 @@ chrome.test.runTests([
function deleteRange2TestVerification() {
removeItemRemovedListener();
- var query = { 'search': '' };
+ var query = { 'text': '' };
chrome.experimental.history.search(query, function(results) {
assertEq(1, results.length);
assertEq(GOOGLE_URL, results[0].url);
diff --git a/chrome/test/data/extensions/api_test/permissions/disabled/background.html b/chrome/test/data/extensions/api_test/permissions/disabled/background.html
index d235c08..1363291 100755
--- a/chrome/test/data/extensions/api_test/permissions/disabled/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/disabled/background.html
@@ -5,7 +5,7 @@
chrome.test.runTests([
function history() {
try {
- var query = { 'search': '', 'maxResults': 1 };
+ var query = { 'text': '', 'maxResults': 1 };
chrome.experimental.history.search(query, function(results) {
chrome.test.fail();
});
@@ -34,4 +34,4 @@ chrome.test.runTests([
}
}
]);
-</script> \ No newline at end of file
+</script>
diff --git a/chrome/test/data/extensions/api_test/permissions/enabled/background.html b/chrome/test/data/extensions/api_test/permissions/enabled/background.html
index e5e94b1..5ccd5e2 100755
--- a/chrome/test/data/extensions/api_test/permissions/enabled/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/enabled/background.html
@@ -7,7 +7,7 @@ var pass = chrome.test.callbackPass;
chrome.test.runTests([
function history() {
try {
- var query = { 'search': '', 'maxResults': 1 };
+ var query = { 'text': '', 'maxResults': 1 };
chrome.experimental.history.search(query, pass(function(results) {}));
} catch (e) {
chrome.test.fail();
@@ -30,4 +30,4 @@ chrome.test.runTests([
}
}
]);
-</script> \ No newline at end of file
+</script>