| Index: third_party/WebKit/LayoutTests/installedapp/api-defined.html
|
| diff --git a/third_party/WebKit/LayoutTests/installedapp/api-defined.html b/third_party/WebKit/LayoutTests/installedapp/api-defined.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..311c3d187778aa3c8b4cb900ff94c35170e2f06a
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/installedapp/api-defined.html
|
| @@ -0,0 +1,39 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<body>
|
| +<script src="../resources/js-test.js"></script>
|
| +<script>
|
| +description("Test installed app API definitions.");
|
| +
|
| +if (!window.testRunner)
|
| + debug('This test cannot be run without the TestRunner');
|
| +
|
| +gc();
|
| +jsTestIsAsync = true;
|
| +testRunner.waitUntilDone();
|
| +
|
| +var installedApps;
|
| +function getInstalledRelatedAppsSuccess(installedAppsArray) {
|
| + debug('getInstalledRelatedAppsSuccess invoked');
|
| +
|
| + installedApps = installedAppsArray;
|
| + shouldBeDefined("installedApps");
|
| + shouldBeNonNull("installedApps");
|
| + shouldBeTrue("Array.isArray(installedApps)");
|
| +
|
| + shouldBe('installedApps.length', '0');
|
| + setTimeout(finishJSTest, 0);
|
| +}
|
| +
|
| +function getInstalledRelatedAppsFailure() {
|
| + testFailed('failed to successfully resolve the promise');
|
| + setTimeout(finishJSTest, 0);
|
| +}
|
| +
|
| +promise = navigator.getInstalledRelatedApps();
|
| +shouldBeDefined("promise");
|
| +shouldBeDefined("promise.then");
|
| +promise.then(getInstalledRelatedAppsSuccess, getInstalledRelatedAppsFailure);
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|