Commit 07166214 authored by Hugo Holgersson's avatar Hugo Holgersson Committed by Commit Bot

Snav: Convert snav-two-elements-one-line.html to snav-testharness.js

With snav-testharness.js, the flakiness seen in Issue 836275 will
most probably be gone.

Bug: 803086, 836275
Change-Id: If44b1ca5c88af3c0fcc045061cdce50dcc91a276
Reviewed-on: https://chromium-review.googlesource.com/c/1257919Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Commit-Queue: Hugo Holgersson <hugoh@vewd.com>
Cr-Commit-Position: refs/heads/master@{#596206}
parent eff4e801
...@@ -4766,7 +4766,6 @@ crbug.com/831796 virtual/mouseevent_fractional/fast/events/autoscroll-in-textfie ...@@ -4766,7 +4766,6 @@ crbug.com/831796 virtual/mouseevent_fractional/fast/events/autoscroll-in-textfie
# Sheriff 2018-04-24 # Sheriff 2018-04-24
crbug.com/836242 [ Linux Mac Win ] fast/loader/reload-zero-byte-plugin.html [ Pass Failure ] crbug.com/836242 [ Linux Mac Win ] fast/loader/reload-zero-byte-plugin.html [ Pass Failure ]
crbug.com/836275 [ Linux Mac ] fast/spatial-navigation/snav-two-elements-one-line.html [ Pass Failure ]
# Sheriff 2018-04-25 # Sheriff 2018-04-25
crbug.com/836783 fast/peerconnection/RTCRtpSender-setParameters.html [ Pass Timeout ] crbug.com/836783 fast/peerconnection/RTCRtpSender-setParameters.html [ Pass Timeout ]
......
AAAAAAAAAA AAAAAAAAAA AA AA AAAAAAAAAA AAAAAAAAAA
AAAAAAAAAA AAAAAAAAAA AA B AA AAAAAAAAAA AAAAAAAAAA
PASS successfullyParsed is true
TEST COMPLETE
PASS gFocusedDocument.activeElement.getAttribute("id") is "e1"
PASS gFocusedDocument.activeElement.getAttribute("id") is "e2"
PASS gFocusedDocument.activeElement.getAttribute("id") is "e3"
PASS gFocusedDocument.activeElement.getAttribute("id") is "e2"
PASS gFocusedDocument.activeElement.getAttribute("id") is "e1"
PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
This test is testing that we can handle 2 inline elements in the same line.
<html> <!DOCTYPE html>
<head> <style>
<script src="../../resources/js-test.js"></script> div { width: 100px;}
<script src="resources/spatial-navigation-utils.js"></script> </style>
<script type="application/javascript"> <div>
<a href="#" id="start">AAAAAAAAAA AAAAAAAAAA AA</a>
var resultMap = [ <a href="#" id="e1">AA AAAAAAAAAA AAAAAAAAAA</a>
["Down", "e1"],
["Down", "e2"],
["Down", "e3"],
["Up", "e2"],
["Up", "e1"],
["Up", "start"],
["DONE", "DONE"]
];
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
testRunner.overridePreference("WebKitSpatialNavigationEnabled", 1);
testRunner.waitUntilDone();
}
function runTest()
{
// starting the test itself: get to a known place.
document.getElementById("start").focus();
initTest(resultMap, testCompleted);
}
function testCompleted()
{
if (window.testRunner)
testRunner.notifyDone();
}
window.onload = runTest;
</script>
<style>
div.container1 { width: 100px;}
div.container2 { width: 100px;}
</style>
</head>
<body id="some-content" xmlns="http://www.w3.org/1999/xhtml" style="padding:20px">
<div class="container1">
<a href="#" id="start">AAAAAAAAAA AAAAAAAAAA AA</a>
<a href="#" id="e1">AA AAAAAAAAAA AAAAAAAAAA</a>
</div> </div>
<br><br> <br><br>
<div class="container2"> <div>
<a href="#" id="e2">AAAAAAAAAA AAAAAAAAAA AA</a> <a href="#" id="e2">AAAAAAAAAA AAAAAAAAAA AA</a>
<span>B</span> <span>B</span>
<a href="#" id="e3">AA AAAAAAAAAA AAAAAAAAAA</a> <a href="#" id="e3">AA AAAAAAAAAA AAAAAAAAAA</a>
</div> </div>
<p>Spatnav can navigate focusables that span multiple lines.</p>
<script src="../../resources/testharness.js"></script>
<div id="console"></div> <script src="../../resources/testharnessreport.js"></script>
This test is testing that we can handle 2 inline elements in the same line. <script src="resources/snav-testharness.js"></script>
</body> <script>
</html> var resultMap = [
["Down", "e1"],
["Down", "e2"],
["Down", "e3"],
["Up", "e2"],
["Up", "e1"],
["Up", "start"],
];
document.getElementById("start").focus();
snav.assertFocusMoves(resultMap);
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment