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

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

Issue 14027005: Implement Command Line Private extension API (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: rebase Created 7 years, 8 months 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
« no previous file with comments | « chrome/test/data/extensions/api_test/command_line/basics/manifest.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
Added: svn:mime-type
+ text/javascript
OLDNEW
(Empty)
1 // Copyright 2013 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 // These string constants should be consistent with those in
6 // chrome/browser/extensions/api/command_line_private/.
7 var kTestCommandLineSwitch = 'command-line-private-api-test-foo';
8 var kEmptySwitchName = 'Switch name is empty.';
9
10 var kNonExistingSwitch = 'foo-bar-non-existing-switch';
11
12 var pass = chrome.test.callbackPass;
13 var fail = chrome.test.callbackFail;
14 var assertTrue = chrome.test.assertTrue;
15 var assertFalse = chrome.test.assertFalse;
16
17 chrome.test.runTests([
18
19 function testHaveSwitch() {
20 chrome.commandLinePrivate.hasSwitch(kTestCommandLineSwitch,
21 pass(function(result) {
22 assertTrue(result);
23 }));
24 },
25
26 function testNotHaveSwitch() {
27 chrome.commandLinePrivate.hasSwitch(kNonExistingSwitch,
28 pass(function(result) {
29 assertFalse(result);
30 }));
31 },
32
33 function testInvalidArgs() {
34 chrome.commandLinePrivate.hasSwitch('', fail(kEmptySwitchName));
35 }
36
37 ]);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/command_line/basics/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698