* available since Chrome 36 * https://developer.chrome.com/apps/test
(assert-eq)(assert-eq expected)(assert-eq expected actual)(assert-eq expected actual message)|expected| - https://developer.chrome.com/apps/test#property-assertEq-expected. |actual| - https://developer.chrome.com/apps/test#property-assertEq-actual. |message| - https://developer.chrome.com/apps/test#property-assertEq-message.
|expected| - https://developer.chrome.com/apps/test#property-assertEq-expected. |actual| - https://developer.chrome.com/apps/test#property-assertEq-actual. |message| - https://developer.chrome.com/apps/test#property-assertEq-message. https://developer.chrome.com/apps/test#method-assertEq.
(assert-false test)(assert-false test message)|test| - https://developer.chrome.com/apps/test#property-assertFalse-test. |message| - https://developer.chrome.com/apps/test#property-assertFalse-message.
|test| - https://developer.chrome.com/apps/test#property-assertFalse-test. |message| - https://developer.chrome.com/apps/test#property-assertFalse-message. https://developer.chrome.com/apps/test#method-assertFalse.
(assert-last-error expected-error)|expected-error| - https://developer.chrome.com/apps/test#property-assertLastError-expectedError.
https://developer.chrome.com/apps/test#method-assertLastError.
|expected-error| - https://developer.chrome.com/apps/test#property-assertLastError-expectedError. https://developer.chrome.com/apps/test#method-assertLastError.
(assert-no-last-error)https://developer.chrome.com/apps/test#method-assertNoLastError.
(assert-throws fn self args)(assert-throws fn self args message)|fn| - https://developer.chrome.com/apps/test#property-assertThrows-fn. |self| - https://developer.chrome.com/apps/test#property-assertThrows-self. |args| - https://developer.chrome.com/apps/test#property-assertThrows-args. |message| - https://developer.chrome.com/apps/test#property-assertThrows-message.
|fn| - https://developer.chrome.com/apps/test#property-assertThrows-fn. |self| - https://developer.chrome.com/apps/test#property-assertThrows-self. |args| - https://developer.chrome.com/apps/test#property-assertThrows-args. |message| - https://developer.chrome.com/apps/test#property-assertThrows-message. https://developer.chrome.com/apps/test#method-assertThrows.
(assert-true test)(assert-true test message)|test| - https://developer.chrome.com/apps/test#property-assertTrue-test. |message| - https://developer.chrome.com/apps/test#property-assertTrue-message.
|test| - https://developer.chrome.com/apps/test#property-assertTrue-test. |message| - https://developer.chrome.com/apps/test#property-assertTrue-message. https://developer.chrome.com/apps/test#method-assertTrue.
(callback)(callback func)(callback func expected-error)|func| - https://developer.chrome.com/apps/test#property-callback-func. |expected-error| - https://developer.chrome.com/apps/test#property-callback-expectedError.
|func| - https://developer.chrome.com/apps/test#property-callback-func. |expected-error| - https://developer.chrome.com/apps/test#property-callback-expectedError. https://developer.chrome.com/apps/test#method-callback.
(callback-added)https://developer.chrome.com/apps/test#method-callbackAdded.
(callback-fail expected-error)|expected-error| - https://developer.chrome.com/apps/test#property-callbackFail-expectedError.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
|expected-error| - https://developer.chrome.com/apps/test#property-callbackFail-expectedError. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-callbackFail.
(callback-pass)This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-callbackPass.
(check-deep-eq)(check-deep-eq expected)(check-deep-eq expected actual)|expected| - https://developer.chrome.com/apps/test#property-checkDeepEq-expected. |actual| - https://developer.chrome.com/apps/test#property-checkDeepEq-actual.
|expected| - https://developer.chrome.com/apps/test#property-checkDeepEq-expected. |actual| - https://developer.chrome.com/apps/test#property-checkDeepEq-actual. https://developer.chrome.com/apps/test#method-checkDeepEq.
(fail)(fail message)|message| - https://developer.chrome.com/apps/test#property-fail-message. https://developer.chrome.com/apps/test#method-fail.
(get-api-definitions)(get-api-definitions api-names)|api-names| - https://developer.chrome.com/apps/test#property-getApiDefinitions-apiNames.
https://developer.chrome.com/apps/test#method-getApiDefinitions.
|api-names| - https://developer.chrome.com/apps/test#property-getApiDefinitions-apiNames. https://developer.chrome.com/apps/test#method-getApiDefinitions.
(get-api-features)https://developer.chrome.com/apps/test#method-getApiFeatures.
(get-config)Gives configuration options set by the test.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [test-config] where:
|test-config| - https://developer.chrome.com/apps/test#property-callback-testConfig.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Gives configuration options set by the test. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [test-config] where: |test-config| - https://developer.chrome.com/apps/test#property-callback-testConfig. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-getConfig.
(get-module-system context)Returns an instance of the module system for the given context.
|context| - https://developer.chrome.com/apps/test#property-getModuleSystem-context.
https://developer.chrome.com/apps/test#method-getModuleSystem.
Returns an instance of the module system for the given context. |context| - https://developer.chrome.com/apps/test#property-getModuleSystem-context. https://developer.chrome.com/apps/test#method-getModuleSystem.
(get-wake-event-page)Returns the wake-event-page API function, which can be called to wake up the extension's event page.
https://developer.chrome.com/apps/test#method-getWakeEventPage.
Returns the wake-event-page API function, which can be called to wake up the extension's event page. https://developer.chrome.com/apps/test#method-getWakeEventPage.
(is-processing-user-gesture)https://developer.chrome.com/apps/test#method-isProcessingUserGesture.
(listen-forever event)|event| - https://developer.chrome.com/apps/test#property-listenForever-event.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/test#method-listenForever.
|event| - https://developer.chrome.com/apps/test#property-listenForever-event. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-listenForever.
(listen-once event)|event| - https://developer.chrome.com/apps/test#property-listenOnce-event.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
|event| - https://developer.chrome.com/apps/test#property-listenOnce-event. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-listenOnce.
(log message)Logs a message during internal unit testing.
|message| - https://developer.chrome.com/apps/test#property-log-message.
Logs a message during internal unit testing. |message| - https://developer.chrome.com/apps/test#property-log-message. https://developer.chrome.com/apps/test#method-log.
(notify-fail message)Notifies the browser process that test code running in the extension failed. This is only used for internal unit testing.
|message| - https://developer.chrome.com/apps/test#property-notifyFail-message.
Notifies the browser process that test code running in the extension failed. This is only used for internal unit testing. |message| - https://developer.chrome.com/apps/test#property-notifyFail-message. https://developer.chrome.com/apps/test#method-notifyFail.
(notify-pass)(notify-pass message)Notifies the browser process that test code running in the extension passed. This is only used for internal unit testing.
|message| - https://developer.chrome.com/apps/test#property-notifyPass-message.
Notifies the browser process that test code running in the extension passed. This is only used for internal unit testing. |message| - https://developer.chrome.com/apps/test#property-notifyPass-message. https://developer.chrome.com/apps/test#method-notifyPass.
(run-tests tests)|tests| - https://developer.chrome.com/apps/test#property-runTests-tests. https://developer.chrome.com/apps/test#method-runTests.
(run-with-user-gesture)Runs the callback in the context of a user gesture.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/test#method-runWithUserGesture.
Runs the callback in the context of a user gesture. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-runWithUserGesture.
(send-message message)Sends a string message to the browser process, generating a Notification that C++ test code can wait for.
|message| - https://developer.chrome.com/apps/test#property-sendMessage-message.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [response] where:
|response| - https://developer.chrome.com/apps/test#property-callback-response.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Sends a string message to the browser process, generating a Notification that C++ test code can wait for. |message| - https://developer.chrome.com/apps/test#property-sendMessage-message. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [response] where: |response| - https://developer.chrome.com/apps/test#property-callback-response. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-sendMessage.
(set-exception-handler)Sets the function to be called when an exception occurs. By default this is a function which fails the test. This is reset for every test run through test.runTests.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [message exception] where:
|message| - https://developer.chrome.com/apps/test#property-callback-message. |exception| - https://developer.chrome.com/apps/test#property-callback-exception.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/test#method-setExceptionHandler.
Sets the function to be called when an exception occurs. By default this is a function which fails the test. This is reset for every test run through test.runTests. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [message exception] where: |message| - https://developer.chrome.com/apps/test#property-callback-message. |exception| - https://developer.chrome.com/apps/test#property-callback-exception. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-setExceptionHandler.
(succeed)(succeed message)|message| - https://developer.chrome.com/apps/test#property-succeed-message. https://developer.chrome.com/apps/test#method-succeed.
(tap-all-events chan)Taps all valid non-deprecated events in chromex.app.test namespace.
Taps all valid non-deprecated events in chromex.app.test namespace.
(tap-on-message-events channel & args)Used to test sending messages to extensions.
Events will be put on the |channel| with signature [::on-message [info]] where:
|info| - https://developer.chrome.com/apps/test#property-onMessage-info.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
Used to test sending messages to extensions. Events will be put on the |channel| with signature [::on-message [info]] where: |info| - https://developer.chrome.com/apps/test#property-onMessage-info. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/test#event-onMessage.
(wait-for-round-trip message)Sends a string message one round trip from the renderer to the browser process and back.
|message| - https://developer.chrome.com/apps/test#property-waitForRoundTrip-message.
This function returns a core.async channel of type promise-chan which eventually receives a result value.
Signature of the result value put on the channel is [message] where:
|message| - https://developer.chrome.com/apps/test#property-callback-message.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/test#method-waitForRoundTrip.
Sends a string message one round trip from the renderer to the browser process and back. |message| - https://developer.chrome.com/apps/test#property-waitForRoundTrip-message. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [message] where: |message| - https://developer.chrome.com/apps/test#property-callback-message. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/test#method-waitForRoundTrip.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |