Bug 1452643 [wpt PR 10315] - Added testdriver automation for html/editing/focus/focus-02.html, a=testonly
authorJonathon Kereliuk <kereliuk@google.com>
Mon, 09 Apr 2018 22:16:16 +0000
changeset 467293 42e3924a5c323376090a216b3db18d8a0b44bc0e
parent 467292 5c615d1b5baee09ecdbea2e0962b709a69b64a0c
child 467294 12541a4f7b34e260399935dbcaf65d4aa2abad64
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452643, 10315
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452643 [wpt PR 10315] - Added testdriver automation for html/editing/focus/focus-02.html, a=testonly Automatic update from web-platform-testsMerge pull request #10315 from kereliuk/automate-focus-02 Added testdriver automation for html/editing/focus/focus-02.html wpt-commits: 841f3f5a8346d6bbbe3043c1d1bc3b32aa0dabbc wpt-pr: 10315 wpt-commits: 841f3f5a8346d6bbbe3043c1d1bc3b32aa0dabbc wpt-pr: 10315
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html/editing/focus/focus-02-manual.html
testing/web-platform/tests/html/editing/focus/focus-02.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -14192,22 +14192,16 @@
     ]
    ],
    "html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.html": [
     [
      "/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.html",
      {}
     ]
    ],
-   "html/editing/focus/focus-02-manual.html": [
-    [
-     "/html/editing/focus/focus-02-manual.html",
-     {}
-    ]
-   ],
    "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative-manual.html": [
     [
      "/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative-manual.html",
      {}
     ]
    ],
    "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order-manual.html": [
     [
@@ -330671,16 +330665,24 @@
    "html/editing/focus/focus-01.html": [
     [
      "/html/editing/focus/focus-01.html",
      {
       "testdriver": true
      }
     ]
    ],
+   "html/editing/focus/focus-02.html": [
+    [
+     "/html/editing/focus/focus-02.html",
+     {
+      "testdriver": true
+     }
+    ]
+   ],
    "html/editing/focus/focus-management/focus-event-targets-simple.html": [
     [
      "/html/editing/focus/focus-management/focus-event-targets-simple.html",
      {}
     ]
    ],
    "html/editing/focus/focus-management/focus-events.html": [
     [
@@ -563538,19 +563540,19 @@
   "html/editing/focus/element-level-focus-apis/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "html/editing/focus/focus-01.html": [
    "e41cfdeaf3e9ddeed0450298212443bfcad8298d",
    "testharness"
   ],
-  "html/editing/focus/focus-02-manual.html": [
-   "adbca2e8e3cdaa58c33d452cf153fd70013c9f4b",
-   "manual"
+  "html/editing/focus/focus-02.html": [
+   "1280112041cf00a7d10c9414dca8c855f72f2c2b",
+   "testharness"
   ],
   "html/editing/focus/focus-management/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "html/editing/focus/focus-management/focus-event-targets-simple.html": [
    "0abbf699b995b9c47307f8b4badf75598854d081",
    "testharness"
deleted file mode 100644
--- a/testing/web-platform/tests/html/editing/focus/focus-02-manual.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>HTML Test: focus - key events</title>
-<link rel="author" title="Intel" href="http://www.intel.com/">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#focus">
-<meta assert="flag" content="interact">
-<meta assert="assert" content="Check if the key events received by document are targeted at the element when no element is focused">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<h2>Steps:</h2>
-<ol>
-  <li>Press any key in [0-9a-zA-Z].</li>
-</ol>
-<h2>Expect results:</h2>
-<p>PASS</p>
-<div id="log"></div>
-<script>
-
-//These tests can be automated once we have an uniform way to use webdriver.
-var t1 = async_test("The keydown event must be targeted at the body element"),
-    t2 = async_test("The keypress event must be targeted at the body element"),
-    t3 = async_test("The keyup event must be targeted at the body element");
-
-setup({timeout: 10000});
-
-document.onkeydown = t1.step_func_done(function(evt){
-  assert_equals(evt.target, document.body, "The keydown events must be targeted at the document's body.");
-});
-
-document.onkeypress = t2.step_func_done(function(evt){
-  assert_equals(evt.target, document.body, "The keypress events must be targeted at the document's body.");
-});
-
-document.onkeyup = t3.step_func_done(function(evt){
-  assert_equals(evt.target, document.body, "The keyup events must be targeted at the document's body.");
-});
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/editing/focus/focus-02.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>HTML Test: focus - key events</title>
+<link rel="author" title="Intel" href="http://www.intel.com/">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#focus">
+<meta assert="flag" content="interact">
+<meta assert="assert" content="Check if the key events received by document are targeted at the element when no element is focused">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<div id="log"></div>
+<script>
+
+//These tests can be automated once we have an uniform way to use webdriver.
+var t1 = async_test("The keydown event must be targeted at the body element"),
+    t2 = async_test("The keypress event must be targeted at the body element"),
+    t3 = async_test("The keyup event must be targeted at the body element");
+
+setup({timeout: 10000});
+
+document.onkeydown = t1.step_func_done(function(evt){
+  assert_equals(evt.target, document.body, "The keydown events must be targeted at the document's body.");
+});
+
+document.onkeypress = t2.step_func_done(function(evt){
+  assert_equals(evt.target, document.body, "The keypress events must be targeted at the document's body.");
+});
+
+document.onkeyup = t3.step_func_done(function(evt){
+  assert_equals(evt.target, document.body, "The keyup events must be targeted at the document's body.");
+});
+
+t1.step(function() {
+  test_driver.send_keys(document.body, "a");
+});
+
+</script>