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

Side by Side Diff: chrome/test/data/extensions/api_test/input_method/background.html

Issue 8758008: Move another block of extension 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
1 <script> 1 <!--
2 var kNewInputMethod = "ru::rus"; 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 3 * source code is governed by a BSD-style license that can be found in the
4 function setAndGetTest() { 4 * LICENSE file.
5 console.log('Changing input method to: ' + kNewInputMethod); 5 -->
6 chrome.test.sendMessage('setInputMethod:' + kNewInputMethod, 6 <script src="background.js"></script>
7 function (response) {
8 chrome.test.assertEq('done', response);
9 console.log('Getting current input method.');
10 chrome.inputMethodPrivate.get(function (inputMethod) {
11 chrome.test.assertEq(inputMethod, kNewInputMethod);
12 chrome.test.succeed();
13 }
14 );
15 });
16 }
17
18 function setAndObserveTest() {
19 console.log('Adding input method event listener.');
20 chrome.inputMethodPrivate.onChanged.addListener(
21 function(newInputMethod) {
22 chrome.test.assertEq(kNewInputMethod, newInputMethod);
23 chrome.test.succeed();
24 }
25 );
26 console.log('Changing input method to: ' + kNewInputMethod);
27 chrome.test.sendMessage('setInputMethod:' + kNewInputMethod,
28 function (response) {
29 chrome.test.assertEq('done', response);
30 }
31 );
32 }
33
34 chrome.test.runTests([setAndGetTest, setAndObserveTest]);
35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698