Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chrome/test/data/extensions/api_test/omnibox/test.js

Issue 8763008: Move yet another block of tests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
5 var incognito = chrome.extension.inIncognitoContext;
6 var incognitoSuffix = incognito ? " incognito" : "";
7
8 chrome.omnibox.onInputChanged.addListener(
9 function(text, suggest) {
10 chrome.test.log("onInputChanged: " + text);
11 if (text == "suggestio") {
12 // First test, complete "suggestio"
13 var desc = 'Description with style: <match>&lt;match&gt;</match>, ' +
14 '<dim>[dim]</dim>, <url>(url till end)</url>';
15 suggest([
16 {content: text + "n1", description: desc},
17 {content: text + "n2", description: "description2"},
18 {content: text + "n3" + incognitoSuffix, description: "description3"},
19 ]);
20 } else {
21 // Other tests, just provide a simple suggestion.
22 suggest([{content: text + " 1", description: "description"}]);
23 }
24 });
25
26 chrome.omnibox.onInputEntered.addListener(
27 function(text) {
28 chrome.test.assertEq("command" + incognitoSuffix, text);
29 chrome.test.notifyPass();
30 });
31
32 // Now we wait for the input events to fire.
33 chrome.test.notifyPass();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698