Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: third_party/WebKit/LayoutTests/installedapp/api-defined.html

Issue 1756793004: Chrome-side patch for IsAppInstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@splitpatch2
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/LayoutTests/installedapp/api-defined-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698