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

Side by Side 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, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/js-test.js"></script>
5 <script>
6 description("Test installed app API definitions.");
7
8 if (!window.testRunner)
9 debug('This test cannot be run without the TestRunner');
10
11 gc();
12 jsTestIsAsync = true;
13 testRunner.waitUntilDone();
14
15 var installedApps;
16 function getInstalledRelatedAppsSuccess(installedAppsArray) {
17 debug('getInstalledRelatedAppsSuccess invoked');
18
19 installedApps = installedAppsArray;
20 shouldBeDefined("installedApps");
21 shouldBeNonNull("installedApps");
22 shouldBeTrue("Array.isArray(installedApps)");
23
24 shouldBe('installedApps.length', '0');
25 setTimeout(finishJSTest, 0);
26 }
27
28 function getInstalledRelatedAppsFailure() {
29 testFailed('failed to successfully resolve the promise');
30 setTimeout(finishJSTest, 0);
31 }
32
33 promise = navigator.getInstalledRelatedApps();
34 shouldBeDefined("promise");
35 shouldBeDefined("promise.then");
36 promise.then(getInstalledRelatedAppsSuccess, getInstalledRelatedAppsFailure);
37 </script>
38 </body>
39 </html>
OLDNEW
« 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