Add iframe tests for insert on click and follow-selected

This commit is contained in:
Jay Kamat 2017-12-18 11:00:03 -08:00
parent 6433096611
commit 344ebed6ad
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5
7 changed files with 88 additions and 2 deletions

View File

@ -2,7 +2,6 @@
<!--
target: hello.txt
qtwebengine_todo: Doesn't seem to work?
-->
<html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<!--
target: hello.txt
-->
<html>
<head>
<meta charset="utf-8">
<title>Link wrapped across multiple lines</title>
</head>
<body>
<div style="width: 20em;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis <button id="myButton" class="float-left submit-button" >nostrud exercitation</button> ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<script type="text/javascript">
document.getElementById("myButton").onclick = function () {
location.href = "/data/hello.txt";
};
</script>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hinting inside an iframe</title>
</head>
<body>
<iframe style="margin: 50px;" src="/data/hints/html/wrapped_button.html"></iframe>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hinting inside an iframe</title>
</head>
<body>
<iframe style="margin: 50px;" src="/data/hints/input.html"></iframe>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hinting inside an iframe</title>
</head>
<body>
<iframe style="margin: 50px;" src="/data/search.html"></iframe>
</body>
</html>

View File

@ -209,6 +209,19 @@ Feature: Using hints
And I hint with args "links normal" and follow a
Then "navigation request: url http://localhost:*/data/hello.txt, type NavigationTypeLinkClicked, *" should be logged
Scenario: Using :follow-hint inside an iframe button
When I open data/hints/iframe_button.html
And I hint with args "all normal" and follow s
Then "navigation request: url http://localhost:*/data/hello.txt, type NavigationTypeLinkClicked, *" should be logged
Scenario: Hinting inputs in an iframe without type
When I open data/hints/iframe_input.html
And I hint with args "inputs" and follow a
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
And I run :leave-mode
# The actual check is already done above
Then no crash should happen
### FIXME currenly skipped, see https://github.com/qutebrowser/qutebrowser/issues/1525
@xfail_norun
Scenario: Using :follow-hint inside a scrolled iframe
@ -218,7 +231,6 @@ Feature: Using hints
And I hint wht args "links normal" and follow a
Then "navigation request: url http://localhost:*/data/hello2.txt, type NavigationTypeLinkClicked, *" should be logged
@qtwebengine_skip: Opens in new tab due to Chromium bug
Scenario: Opening a link inside a specific iframe
When I open data/hints/iframe_target.html
And I hint with args "links normal" and follow a

View File

@ -238,3 +238,22 @@ Feature: Searching on a page
Then the following tabs should be open:
- data/search.html
- data/hello.txt (active)
Scenario: Follow a searched link in an iframe
When I open data/iframe_search.html
And I run :tab-only
And I run :search follow
And I wait for "search found follow" in the log
And I run :follow-selected
Then "navigation request: url http://localhost:*/data/hello.txt, type NavigationTypeLinkClicked, is_main_frame False" should be logged
Scenario: Follow a tabbed searched link in an iframe
When I open data/iframe_search.html
And I run :tab-only
And I run :search follow
And I wait for "search found follow" in the log
And I run :follow-selected -t
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
- data/iframe_search.html
- data/hello.txt (active)