* available since Chrome 34 * https://developer.chrome.com/extensions/test
(assert-bool test expected)
(assert-bool test expected message)
|test| - https://developer.chrome.com/extensions/test#property-assertBool-test. |expected| - https://developer.chrome.com/extensions/test#property-assertBool-expected. |message| - https://developer.chrome.com/extensions/test#property-assertBool-message.
https://developer.chrome.com/extensions/test#method-assertBool.
|test| - https://developer.chrome.com/extensions/test#property-assertBool-test. |expected| - https://developer.chrome.com/extensions/test#property-assertBool-expected. |message| - https://developer.chrome.com/extensions/test#property-assertBool-message. https://developer.chrome.com/extensions/test#method-assertBool.
(assert-eq)
(assert-eq expected)
(assert-eq expected actual)
(assert-eq expected actual message)
|expected| - https://developer.chrome.com/extensions/test#property-assertEq-expected. |actual| - https://developer.chrome.com/extensions/test#property-assertEq-actual. |message| - https://developer.chrome.com/extensions/test#property-assertEq-message.
https://developer.chrome.com/extensions/test#method-assertEq.
|expected| - https://developer.chrome.com/extensions/test#property-assertEq-expected. |actual| - https://developer.chrome.com/extensions/test#property-assertEq-actual. |message| - https://developer.chrome.com/extensions/test#property-assertEq-message. https://developer.chrome.com/extensions/test#method-assertEq.
(assert-false test)
(assert-false test message)
|test| - https://developer.chrome.com/extensions/test#property-assertFalse-test. |message| - https://developer.chrome.com/extensions/test#property-assertFalse-message.
https://developer.chrome.com/extensions/test#method-assertFalse.
|test| - https://developer.chrome.com/extensions/test#property-assertFalse-test. |message| - https://developer.chrome.com/extensions/test#property-assertFalse-message. https://developer.chrome.com/extensions/test#method-assertFalse.
(assert-last-error expected-error)
|expected-error| - https://developer.chrome.com/extensions/test#property-assertLastError-expectedError.
https://developer.chrome.com/extensions/test#method-assertLastError.
|expected-error| - https://developer.chrome.com/extensions/test#property-assertLastError-expectedError. https://developer.chrome.com/extensions/test#method-assertLastError.
(assert-no-last-error)
https://developer.chrome.com/extensions/test#method-assertNoLastError.
(assert-throws fn self args)
(assert-throws fn self args message)
|fn| - https://developer.chrome.com/extensions/test#property-assertThrows-fn. |self| - https://developer.chrome.com/extensions/test#property-assertThrows-self. |args| - https://developer.chrome.com/extensions/test#property-assertThrows-args. |message| - https://developer.chrome.com/extensions/test#property-assertThrows-message.
https://developer.chrome.com/extensions/test#method-assertThrows.
|fn| - https://developer.chrome.com/extensions/test#property-assertThrows-fn. |self| - https://developer.chrome.com/extensions/test#property-assertThrows-self. |args| - https://developer.chrome.com/extensions/test#property-assertThrows-args. |message| - https://developer.chrome.com/extensions/test#property-assertThrows-message. https://developer.chrome.com/extensions/test#method-assertThrows.
(assert-true test)
(assert-true test message)
|test| - https://developer.chrome.com/extensions/test#property-assertTrue-test. |message| - https://developer.chrome.com/extensions/test#property-assertTrue-message.
https://developer.chrome.com/extensions/test#method-assertTrue.
|test| - https://developer.chrome.com/extensions/test#property-assertTrue-test. |message| - https://developer.chrome.com/extensions/test#property-assertTrue-message. https://developer.chrome.com/extensions/test#method-assertTrue.
(callback)
(callback func)
(callback func expected-error)
|func| - https://developer.chrome.com/extensions/test#property-callback-func. |expected-error| - https://developer.chrome.com/extensions/test#property-callback-expectedError.
https://developer.chrome.com/extensions/test#method-callback.
|func| - https://developer.chrome.com/extensions/test#property-callback-func. |expected-error| - https://developer.chrome.com/extensions/test#property-callback-expectedError. https://developer.chrome.com/extensions/test#method-callback.
(callback-added)
https://developer.chrome.com/extensions/test#method-callbackAdded.
(callback-fail expected-error)
|expected-error| - https://developer.chrome.com/extensions/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/extensions/test#method-callbackFail.
|expected-error| - https://developer.chrome.com/extensions/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/extensions/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.
https://developer.chrome.com/extensions/test#method-callbackPass.
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/extensions/test#method-callbackPass.
(check-deep-eq)
(check-deep-eq expected)
(check-deep-eq expected actual)
|expected| - https://developer.chrome.com/extensions/test#property-checkDeepEq-expected. |actual| - https://developer.chrome.com/extensions/test#property-checkDeepEq-actual.
https://developer.chrome.com/extensions/test#method-checkDeepEq.
|expected| - https://developer.chrome.com/extensions/test#property-checkDeepEq-expected. |actual| - https://developer.chrome.com/extensions/test#property-checkDeepEq-actual. https://developer.chrome.com/extensions/test#method-checkDeepEq.
(fail)
(fail message)
|message| - https://developer.chrome.com/extensions/test#property-fail-message. https://developer.chrome.com/extensions/test#method-fail.
(get-api-definitions)
(get-api-definitions api-names)
|api-names| - https://developer.chrome.com/extensions/test#property-getApiDefinitions-apiNames.
https://developer.chrome.com/extensions/test#method-getApiDefinitions.
|api-names| - https://developer.chrome.com/extensions/test#property-getApiDefinitions-apiNames. https://developer.chrome.com/extensions/test#method-getApiDefinitions.
(get-api-features)
https://developer.chrome.com/extensions/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/extensions/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/extensions/test#method-getConfig.
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/extensions/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/extensions/test#method-getConfig.
(get-module-system context)
Returns an instance of the module system for the given context.
|context| - https://developer.chrome.com/extensions/test#property-getModuleSystem-context.
https://developer.chrome.com/extensions/test#method-getModuleSystem.
Returns an instance of the module system for the given context. |context| - https://developer.chrome.com/extensions/test#property-getModuleSystem-context. https://developer.chrome.com/extensions/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/extensions/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/extensions/test#method-getWakeEventPage.
(is-processing-user-gesture)
https://developer.chrome.com/extensions/test#method-isProcessingUserGesture.
(listen-forever event)
|event| - https://developer.chrome.com/extensions/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/extensions/test#method-listenForever.
|event| - https://developer.chrome.com/extensions/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/extensions/test#method-listenForever.
(listen-once event)
|event| - https://developer.chrome.com/extensions/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/extensions/test#method-listenOnce.
|event| - https://developer.chrome.com/extensions/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/extensions/test#method-listenOnce.
(log message)
Logs a message during internal unit testing.
|message| - https://developer.chrome.com/extensions/test#property-log-message.
Logs a message during internal unit testing. |message| - https://developer.chrome.com/extensions/test#property-log-message. https://developer.chrome.com/extensions/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/extensions/test#property-notifyFail-message.
https://developer.chrome.com/extensions/test#method-notifyFail.
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/extensions/test#property-notifyFail-message. https://developer.chrome.com/extensions/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/extensions/test#property-notifyPass-message.
https://developer.chrome.com/extensions/test#method-notifyPass.
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/extensions/test#property-notifyPass-message. https://developer.chrome.com/extensions/test#method-notifyPass.
(run-next-test)
https://developer.chrome.com/extensions/test#method-runNextTest.
(run-tests tests)
|tests| - https://developer.chrome.com/extensions/test#property-runTests-tests.
https://developer.chrome.com/extensions/test#method-runTests.
|tests| - https://developer.chrome.com/extensions/test#property-runTests-tests. https://developer.chrome.com/extensions/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/extensions/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/extensions/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/extensions/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/extensions/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/extensions/test#method-sendMessage.
Sends a string message to the browser process, generating a Notification that C++ test code can wait for. |message| - https://developer.chrome.com/extensions/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/extensions/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/extensions/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/extensions/test#property-callback-message. |exception| - https://developer.chrome.com/extensions/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/extensions/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/extensions/test#property-callback-message. |exception| - https://developer.chrome.com/extensions/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/extensions/test#method-setExceptionHandler.
(succeed)
(succeed message)
|message| - https://developer.chrome.com/extensions/test#property-succeed-message.
https://developer.chrome.com/extensions/test#method-succeed.
|message| - https://developer.chrome.com/extensions/test#property-succeed-message. https://developer.chrome.com/extensions/test#method-succeed.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.test namespace.
Taps all valid non-deprecated events in chromex.ext.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/extensions/test#property-onMessage-info.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/test#event-onMessage.
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/extensions/test#property-onMessage-info. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/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/extensions/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/extensions/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/extensions/test#method-waitForRoundTrip.
Sends a string message one round trip from the renderer to the browser process and back. |message| - https://developer.chrome.com/extensions/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/extensions/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/extensions/test#method-waitForRoundTrip.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close