| Index: chrome/test/data/extensions/api_test/command_line/basics/test.js
|
| ===================================================================
|
| --- chrome/test/data/extensions/api_test/command_line/basics/test.js (revision 0)
|
| +++ chrome/test/data/extensions/api_test/command_line/basics/test.js (revision 0)
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// These string constants should be consistent with those in
|
| +// chrome/browser/extensions/api/command_line_private/.
|
| +var kTestCommandLineSwitch = 'command-line-private-api-test-foo';
|
| +var kEmptySwitchName = 'Switch name is empty.';
|
| +
|
| +var kNonExistingSwitch = 'foo-bar-non-existing-switch';
|
| +
|
| +var pass = chrome.test.callbackPass;
|
| +var fail = chrome.test.callbackFail;
|
| +var assertTrue = chrome.test.assertTrue;
|
| +var assertFalse = chrome.test.assertFalse;
|
| +
|
| +chrome.test.runTests([
|
| +
|
| + function testHaveSwitch() {
|
| + chrome.commandLinePrivate.hasSwitch(kTestCommandLineSwitch,
|
| + pass(function(result) {
|
| + assertTrue(result);
|
| + }));
|
| + },
|
| +
|
| + function testNotHaveSwitch() {
|
| + chrome.commandLinePrivate.hasSwitch(kNonExistingSwitch,
|
| + pass(function(result) {
|
| + assertFalse(result);
|
| + }));
|
| + },
|
| +
|
| + function testInvalidArgs() {
|
| + chrome.commandLinePrivate.hasSwitch('', fail(kEmptySwitchName));
|
| + }
|
| +
|
| +]);
|
|
|
| Property changes on: chrome/test/data/extensions/api_test/command_line/basics/test.js
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
| Added: svn:mime-type
|
| + text/javascript
|
|
|
|
|