Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: LayoutTests/fast/dom/Document/xml-document-focus.xml

Issue 141733006: Move focus management API from HTMLDocument to Document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add extra prototype check Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/xml-document-focus-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/Document/xml-document-focus.xml
diff --git a/LayoutTests/fast/dom/Document/xml-document-focus.xml b/LayoutTests/fast/dom/Document/xml-document-focus.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5683cff84fec82ad8a90c68009fff77ef207eacd
--- /dev/null
+++ b/LayoutTests/fast/dom/Document/xml-document-focus.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<input id="testElement"></input>
+<script>
+description("Make sure the focus management API is available to XML documents.");
+
+shouldNotBe('document.__proto__', 'HTMLDocument.prototype');
+shouldBe('document.__proto__', 'Document.prototype');
+shouldBeTrue('document.hasFocus()');
+shouldBe('document.activeElement', 'document.body');
+var testElement = document.getElementById('testElement');
+testElement.focus();
+shouldBe('document.activeElement', 'testElement');
+shouldBeTrue('document.hasFocus()');
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/xml-document-focus-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698