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

Unified Diff: chrome/test/data/chromedriver/shadow_dom_test.html

Issue 529763002: Added shadow DOM support to chromedriver. atoms.cc and .h are generated from the selenium tree. I'l… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « chrome/test/chromedriver/test/run_py_tests.py ('k') | third_party/webdriver/atoms.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/chromedriver/shadow_dom_test.html
diff --git a/chrome/test/data/chromedriver/shadow_dom_test.html b/chrome/test/data/chromedriver/shadow_dom_test.html
new file mode 100644
index 0000000000000000000000000000000000000000..6730114bc703fec0994e07bbd2e47d98cb75cd36
--- /dev/null
+++ b/chrome/test/data/chromedriver/shadow_dom_test.html
@@ -0,0 +1,55 @@
+<html>
+<body>
+<H1>Page for Shadow DOM chromedriver tests</H1>
+The page has a shadow root that in turn contains two shadow roots. So we can check behaviour with both nested roots and younger/older sibling roots.
+<div id="outerDiv">
+ <div id="innerDiv">
+ stuff
+ </div>
+</div>
+
+<template id="parentTemplate">
+<div id="parentDiv"">
+ <H3>Parent</H3>
+ <H4>Contents</H4>
+ <content></content>
+</div>
+</template>
+<template id="olderChildTemplate">
+<div id="olderChildDiv"">
+ <H3 id="olderHeading">Older Child</H3>
+ As the older child of a nested shadow root, this is the most likely to go
+ wrong bit of the page, so we'll concentrate our tests here.
+ <H4>Contents</H4>
+ <content></content>
+ <input id="olderTextBox" type="text" value="foo"/>
+ <input type="button" onClick="buttonWasClicked()" value="button" id="olderButton" );
+</div>
+</template>
+<template id="youngerChildTemplate">
+<div id="youngerChildDiv">
+ <H3>Younger Child</H3>
+ <H4>Contents</H4>
+ <content></content>
+ <H4>Shadow</H4>
+ <shadow></shadow>
+</div>
+</template>
+<script>var CLOSURE_NO_DEPS=true</script>
+<script src="../../../third_party/chromevox/third_party/closure-library/closure/goog/base.js"></script>
+<script>
+var parentShadowRoot = document.querySelector('#innerDiv').createShadowRoot();
+parentShadowRoot.appendChild(document.querySelector('#parentTemplate').content.cloneNode(true));
+var olderShadowRoot = parentShadowRoot.querySelector("#parentDiv").createShadowRoot();
+olderShadowRoot.appendChild(document.querySelector('#olderChildTemplate').content.cloneNode(true));
+var youngerShadowRoot = parentShadowRoot.querySelector("#parentDiv").createShadowRoot();
+youngerShadowRoot.appendChild(document.querySelector('#youngerChildTemplate').content.cloneNode(true));
+function buttonWasClicked() {
+ document.querySelector("* /deep/ #olderTextBox").value="Button Was Clicked";
+}
+</script>
+
+
+
+
+
« no previous file with comments | « chrome/test/chromedriver/test/run_py_tests.py ('k') | third_party/webdriver/atoms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698