[ChromeDriver] Update js tests to use v1 shadow DOM

Bug: chromedriver:2729
Change-Id: I7727fa078f5b099ebd38f26fd95bd8fe6ddd283a
Reviewed-on: https://chromium-review.googlesource.com/c/1412935
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Tatiana Buldina <buldina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623025}
diff --git a/chrome/test/chromedriver/js/call_function_test.html b/chrome/test/chromedriver/js/call_function_test.html
index ff9fe30d..9dedc54 100644
--- a/chrome/test/chromedriver/js/call_function_test.html
+++ b/chrome/test/chromedriver/js/call_function_test.html
@@ -187,7 +187,7 @@
 
   // Set up something in the shadow DOM.
   var host = document.body.appendChild(document.createElement('div'));
-  var root = host.createShadowRoot();
+  var root = host.attachShadow({ mode: 'open' });
   var shadowDiv = root.appendChild(document.createElement('div'));
 
   function func(element) {
@@ -209,7 +209,7 @@
 
   // Set up something in the shadow DOM.
   var host = document.body.appendChild(document.createElement('div'));
-  var root = host.createShadowRoot();
+  var root = host.attachShadow({ mode: 'open' });
   var shadowDiv = root.appendChild(document.createElement('div'));
 
   function func(element) {
@@ -237,7 +237,7 @@
   
   // Set up something in the shadow DOM.
   var host = document.body.appendChild(document.createElement('div'));
-  var root = host.createShadowRoot();
+  var root = host.attachShadow({ mode: 'open' });
   var shadowDiv = root.appendChild(document.createElement('div'));
   
   // Test with attached element in shadow DOM.
@@ -263,7 +263,7 @@
 
   // Set up something in the shadow DOM.
   var host = document.body.appendChild(document.createElement('div'));
-  var root = host.createShadowRoot();
+  var root = host.attachShadow({ mode: 'open' });
   var shadowDiv = root.appendChild(document.createElement('div'));
 
   // Test with detached element in shadow DOM.