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,36 @@ |
+// 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 assertEq = chrome.test.assertEq; |
+ |
+chrome.tests.runTests([ |
+ |
+ function testHaveSwitch() { |
+ chrome.commandLinePrivate.hasSwitch(kTestCommandLineSwitch, |
+ pass(function(result) { |
+ assertEq(result, true); |
not at google - send to devlin
2013/04/15 12:20:15
assertTrue(result)?
方觉(Fang Jue)
2013/04/15 23:25:03
Done.
|
+ })); |
+ }, |
+ |
+ function testNotHaveSwitch() { |
+ chrome.commandLinePrivate.hasSwitch(kNonExistingSwitch, |
+ pass(function(result) { |
+ assertEq(result, false); |
not at google - send to devlin
2013/04/15 12:20:15
assertFalse(result)?
方觉(Fang Jue)
2013/04/15 23:25:03
Done.
|
+ })); |
+ }, |
+ |
+ function testInvalidArgs() { |
+ chrome.commandLinePrivate.hasSwitch('', fail(kEmptySwitchName)); |
+ } |
+ |
+]); |
Property changes on: chrome/test/data/extensions/api_test/command_line/basics/test.js |
___________________________________________________________________ |
Added: svn:mime-type |
+ text/javascript |
Added: svn:eol-style |
+ LF |