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

Unified Diff: chrome/test/chromedriver/js/call_function_test.html

Issue 2230053002: [chromedriver] Added option to make element references W3C compliant. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed presubmit errors. Created 4 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/js/call_function.js ('k') | chrome/test/chromedriver/session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/js/call_function_test.html
diff --git a/chrome/test/chromedriver/js/call_function_test.html b/chrome/test/chromedriver/js/call_function_test.html
index 3c99a08d2dc59b0ee8fad66dd49d5773f7aaff88..95f7b90a3c140ea332c7dba03752ed1152f17e87 100644
--- a/chrome/test/chromedriver/js/call_function_test.html
+++ b/chrome/test/chromedriver/js/call_function_test.html
@@ -8,6 +8,28 @@ function clearCache() {
getPageCache().cache_ = {};
}
+function isValidUUID(uuid) {
+ assertEquals(36, uuid.length);
+ var list = uuid.split("-").map(function(x) {return x.length;});
+ assertEquals(5, list.length);
+ assertEquals(8, list[0]);
+ assertEquals(4, list[1]);
+ assertEquals(4, list[2]);
+ assertEquals(4, list[3]);
+ assertEquals(12, list[4]);
+ assert(/[a-z0-9-]{36}/.test(uuid));
+}
+
+function testUUID() {
+ var uuids = {}
+ for (var i = 0; i < 100; i++) {
+ var uuid = generateUUID();
+ isValidUUID(uuid);
+ assertEquals(null, uuids[uuid]);
+ uuids[uuid] = 1;
+ }
+}
+
function testCallFunctionNoArgs() {
clearCache();
@@ -53,11 +75,12 @@ function testCallFunctionArgsUnwrappedReturn() {
function func(elem) {
return elem.querySelector('div');
}
- var result = callFunction(null, func, [wrap(document)], true);
+ var result = callFunction(null, func, [wrap(document)], false, true);
assertEquals(document.querySelector('div'), result);
}
function testCacheWrap() {
+
clearCache();
assertEquals(1, wrap(1));
@@ -182,7 +205,7 @@ function testCallFunctionWithShadowHost() {
document.body.removeChild(host);
}
-function testCallFunctionWithShadowRoot() {
+function DISABLED_testCallFunctionWithShadowRoot() {
clearCache();
// Set up something in the shadow DOM.
@@ -209,7 +232,8 @@ function testCallFunctionWithShadowRoot() {
document.body.removeChild(host);
}
-function testCacheWithShadowDomAttached() {
+
+function DISABLED_testCacheWithShadowDomAttached() {
clearCache();
var pageCache = getPageCache();
« no previous file with comments | « chrome/test/chromedriver/js/call_function.js ('k') | chrome/test/chromedriver/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698