diff --git a/tests/integration/data/prompt/geolocation.html b/tests/integration/data/prompt/geolocation.html new file mode 100644 index 000000000..876676972 --- /dev/null +++ b/tests/integration/data/prompt/geolocation.html @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/tests/integration/data/prompt/jsprompt.html b/tests/integration/data/prompt/jsprompt.html index bdded2664..bc4178a6f 100644 --- a/tests/integration/data/prompt/jsprompt.html +++ b/tests/integration/data/prompt/jsprompt.html @@ -2,12 +2,12 @@ - + diff --git a/tests/integration/features/prompts.feature b/tests/integration/features/prompts.feature index 2e45702f1..2c354c24c 100644 --- a/tests/integration/features/prompts.feature +++ b/tests/integration/features/prompts.feature @@ -99,3 +99,41 @@ Feature: Prompts And I run :prompt-no Then "Error while loading *: SSL handshake failed" should be logged And the page should contain the plaintext "Unable to load page" + + # Geolocation + + Scenario: Always rejecting geolocation + When I set content -> geolocation to false + And I open data/prompt/geolocation.html + And I click the button + Then the javascript message "geolocation permission denied" should be logged + + Scenario: Always accepting geolocation + When I set content -> geolocation to true + And I open data/prompt/geolocation.html + And I click the button + Then the javascript message "geolocation permission denied" should not be logged + + Scenario: geolocation with ask -> true + When I set content -> geolocation to ask + And I open data/prompt/geolocation.html + And I click the button + And I wait for a prompt + And I run :prompt-yes + Then the javascript message "geolocation permission denied" should not be logged + + Scenario: geolocation with ask -> false + When I set content -> geolocation to ask + And I open data/prompt/geolocation.html + And I click the button + And I wait for a prompt + And I run :prompt-no + Then the javascript message "geolocation permission denied" should be logged + + Scenario: geolocation with ask -> abort + When I set content -> geolocation to ask + And I open data/prompt/geolocation.html + And I click the button + And I wait for a prompt + And I run :leave-mode + Then the javascript message "geolocation permission denied" should be logged