Skip to content

Commit

Permalink
fix(tests): update canOpenURL test
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Jan 30, 2025
1 parent 81dd7c9 commit c359f39
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Resources/ti.platform.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ describe('Titanium.Platform', () => {
should(Ti.Platform.canOpenURL).be.a.Function();
});

it('returns true for typical http URL', () => {
should(Ti.Platform.canOpenURL('http://www.google.com/')).be.true();
it('returns true for typical https URL', () => {
should(Ti.Platform.canOpenURL('https://www.google.com/')).be.true();
});

it('returns true for app-sepcific URI scheme', () => {
Expand Down
17 changes: 17 additions & 0 deletions tests/platform/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@
<application>
<meta-data android:name="metatadata1" android:value="Metadata 1"/>
</application>
<queries>
<!-- Allows "http://" and "https://" web URLs. -->
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="https"/>
</intent>
<!-- Allows "mailto:" URLs to an e-mail app. -->
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="mailto"/>
</intent>
<!-- Allows file URLs to local image files. -->
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:mimeType="image/*"/>
</intent>
</queries>
</manifest>

0 comments on commit c359f39

Please sign in to comment.