InAppBrowser

Make sure http://www.google.com is white listed.
Make sure http://www.apple.com is not in the white list.
In iOS, starred * tests will put the app in a state with no way to return.

User-Agent:

Back

Local URL

target = Default
Expected result: opens successfully in CordovaWebView.

target=_self
Expected result: opens successfully in CordovaWebView.

target=_system
Expected result: fails to open.

target=_blank
Expected result: opens successfully in InAppBrowser with locationBar at top.

target=Random, location=no,disallowoverscroll=yes
Expected result: opens successfully in InAppBrowser without locationBar.

target=Random, toolbarposition=bottom
Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the bottom.

target=Random, toolbarposition=top
Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the top.

target=Random, toolbarposition=top,location=no
Expected result: opens successfully in InAppBrowser with no locationBar. On iOS the toolbar is at the top.

White Listed URL

target=Default*
Expected result: open successfully in CordovaWebView to www.google.com.

target=_self*
Expected result: open successfully in CordovaWebView to www.google.com.

target=_system
Expected result: open successfully in system browser to www.google.com.

target=_blank
Expected result: open successfully in InAppBrowser to www.google.com.

target=Random
Expected result: open successfully in InAppBrowser to www.google.com.

target=Random, no location bar*
Expected result: open successfully in InAppBrowser to www.google.com with no location bar.

Non White Listed URL

target=Default
Expected result: open successfully in InAppBrowser to apple.com (_self enforces whitelist).

target=_self
Expected result: open successfully in InAppBrowser to apple.com (_self enforces whitelist).

target=_system
Expected result: open successfully in system browser to apple.com.

target=_blank
Expected result: open successfully in InAppBrowser to apple.com.

target=Random
Expected result: open successfully in InAppBrowser to apple.com.

target=Random, no location bar*
Expected result: open successfully in InAppBrowser to apple.com without locationBar.

Page with redirect

http://google.com
Expected result: should 301 and open successfully in InAppBrowser to www.google.com.

http://goo.gl/pUFqg
Expected result: should 302 and open successfully in InAppBrowser to www.zhihu.com/answer/16714076.

PDF URL

Remote URL
Expected result: InAppBrowser opens. PDF should render on iOS.

Local URL
Expected result: InAppBrowser opens. PDF should render on iOS.

Invalid URL

Invalid Scheme
Expected result: fail to load in InAppBrowser.

Invalid Host
Expected result: fail to load in InAppBrowser.

Missing Local File
Expected result: fail to load in InAppBrowser (404).

CSS / JS Injection

Original Document
Expected result: open successfully in InAppBrowser without text "Style updated from..."

CSS File Injection
Expected result: open successfully in InAppBrowser with "Style updated from file".

CSS File Injection (callback)
Expected result: open successfully in InAppBrowser with "Style updated from file", and alert dialog with text "Results verified".

CSS Literal Injection
Expected result: open successfully in InAppBrowser with "Style updated from literal".

CSS Literal Injection (callback)
Expected result: open successfully in InAppBrowser with "Style updated from literal", and alert dialog with text "Results verified".

Script File Injection
Expected result: open successfully in InAppBrowser with text "Script file successfully injected"

Script File Injection (callback)
Expected result: open successfully in InAppBrowser with text "InAppBrowser - Script / Style Injection Test" and alert dialog with the text "Results verified".

Script Literal Injection
Expected result: open successfully in InAppBrowser with the text "abc" in small font in the top left corner.

Script Literal Injection (callback)
Expected result: open successfully in InAppBrowser with text "InAppBrowser - Script / Style Injection Test" and alert dialog with the text "Results verified".

Open Hidden

create hidden
Expected result: no additional browser window. Alert appears with the text "background window loaded".

show hidden
Expected result: after first clicking on previous test "create hidden", open successfully in InAppBrowser to google.com.

close hidden
Expected result: no output. But click on "show hidden" again and nothing should be shown.

google.com not hidden
Expected result: open successfully in InAppBrowser to www.google.com

Clearing Cache

Clear Browser Cache
Expected result: ?

Clear Session Cache
Expected result: ?

Video tag

remote video
Expected result: open successfully in InAppBrowser with an embedded video that works after clicking the "play" button.

Local with anchor tag

Anchor1
Expected result: open successfully in InAppBrowser to the local page, scrolled to the top.

Anchor2
Expected result: open successfully in InAppBrowser to the local page, scrolled to the beginning of the tall div with border.

Back