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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.js

Issue 2955943002: DevTools: migrate inspector-protocol/dom tests to a new test runner (Closed)
Patch Set: rebaseline Created 3 years, 6 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
Index: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.js b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.js
new file mode 100644
index 0000000000000000000000000000000000000000..0d5a292f2c32d50e50efa207bce75aff26a6875b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.js
@@ -0,0 +1,21 @@
+(async function(testRunner) {
+ var {page, session, dp} = await testRunner.startHTML(`
+ <svg id='main' xmlns='http://www.w3.org/2000/svg' width='600' height='500' viewBox='0 0 100 120' />
+ `, 'Test that DOM attribute case is preserved when modified in XML documents.');
+
+ var response = await dp.DOM.getDocument();
+ var rootNodeId = response.result.root.nodeId;
+
+ response = await dp.DOM.querySelector({nodeId: rootNodeId, selector: '#main'})
+ var nodeId = response.result.nodeId;
+ testRunner.log('Original attributes:');
+ response = await dp.DOM.getAttributes({nodeId});
+ for (var i = 0; i < response.result.attributes.length; i += 2)
+ testRunner.log(response.result.attributes[i] + '=' + response.result.attributes[i + 1]);
+
+ dp.DOM.setAttributesAsText({nodeId, name: 'viewBox', text: 'viewBox="0 0 120 120"'});
+ response = await dp.DOM.onceAttributeModified();
+ testRunner.log('Modified attribute:');
+ testRunner.log(response.params.name + '=' + response.params.value);
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698