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

Unified Diff: tracing/tracing/ui/base/tab_view_test.html

Issue 1928873003: Use Polymer.dom with many dom manipulations. (Closed) Base URL: https://github.com/catapult-project/catapult.git@polymer10-migration
Patch Set: fixes Created 4 years, 8 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 | « tracing/tracing/ui/base/tab_view.html ('k') | tracing/tracing/ui/base/table.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/tab_view_test.html
diff --git a/tracing/tracing/ui/base/tab_view_test.html b/tracing/tracing/ui/base/tab_view_test.html
index 2d4a49ca61f7fab4dade393d3468fc2d0805da27..295e1d0c15898e1d4fba6c9f2c429070aa4ee721 100644
--- a/tracing/tracing/ui/base/tab_view_test.html
+++ b/tracing/tracing/ui/base/tab_view_test.html
@@ -49,16 +49,16 @@ tr.b.unittest.testSuite(function() {
var tabView = new TracingAnalysisTabView();
var firstTab = document.createElement('div');
- firstTab.setAttribute('tab-label', 'First Tab Label');
- firstTab.innerHTML = '<p>' + TAB_TEXT + '<p>';
+ Polymer.dom(firstTab).setAttribute('tab-label', 'First Tab Label');
+ Polymer.dom(firstTab).innerHTML = '<p>' + TAB_TEXT + '<p>';
var secondTab = document.createElement('div');
- secondTab.setAttribute('tab-label', 'Second Tab Label');
- secondTab.innerHTML = '<b>' + 'Second Tab Text' + '</b>';
+ Polymer.dom(secondTab).setAttribute('tab-label', 'Second Tab Label');
+ Polymer.dom(secondTab).innerHTML = '<b>' + 'Second Tab Text' + '</b>';
var thirdTab = document.createElement('div');
- thirdTab.setAttribute('tab-label', 'Third Tab Label');
- thirdTab.innerHTML = '<b>' + 'Third Tab Text' + '</b>';
+ Polymer.dom(thirdTab).setAttribute('tab-label', 'Third Tab Label');
+ Polymer.dom(thirdTab).innerHTML = '<b>' + 'Third Tab Text' + '</b>';
Polymer.dom(tabView).appendChild(firstTab);
Polymer.dom(tabView).appendChild(secondTab);
@@ -67,13 +67,13 @@ tr.b.unittest.testSuite(function() {
this.addHTMLOutput(tabViewContainer);
- thirdTab.setAttribute('tab-label', 'Something Different');
+ Polymer.dom(thirdTab).setAttribute('tab-label', 'Something Different');
var button = document.createElement('button');
button.textContent = 'Change label';
button.addEventListener('click', function() {
- thirdTab.setAttribute('tab-label', 'Label Changed');
+ Polymer.dom(thirdTab).setAttribute('tab-label', 'Label Changed');
});
tabView.selectedTab = secondTab;
@@ -105,16 +105,16 @@ tr.b.unittest.testSuite(function() {
tabView.tabStripHeadingText = 'Hello world:';
var firstTab = document.createElement('div');
- firstTab.setAttribute('tab-label', 'First Tab Label');
- firstTab.innerHTML = '<p>' + TAB_TEXT + '<p>';
+ Polymer.dom(firstTab).setAttribute('tab-label', 'First Tab Label');
+ Polymer.dom(firstTab).innerHTML = '<p>' + TAB_TEXT + '<p>';
var secondTab = document.createElement('div');
- secondTab.setAttribute('tab-label', 'Second Tab Label');
- secondTab.innerHTML = '<b>' + 'Second Tab Text' + '</b>';
+ Polymer.dom(secondTab).setAttribute('tab-label', 'Second Tab Label');
+ Polymer.dom(secondTab).innerHTML = '<b>' + 'Second Tab Text' + '</b>';
var thirdTab = document.createElement('div');
- thirdTab.setAttribute('tab-label', 'Third Tab Label');
- thirdTab.innerHTML = '<b>' + 'Third Tab Text' + '</b>';
+ Polymer.dom(thirdTab).setAttribute('tab-label', 'Third Tab Label');
+ Polymer.dom(thirdTab).innerHTML = '<b>' + 'Third Tab Text' + '</b>';
Polymer.dom(tabView).appendChild(firstTab);
Polymer.dom(tabView).appendChild(secondTab);
@@ -227,9 +227,9 @@ tr.b.unittest.testSuite(function() {
Polymer.dom(tabView).appendChild(t2);
Polymer.dom(tabView).appendChild(t3);
- t1.setAttribute('tab-label', 'This should be selected');
- t2.setAttribute('tab-label', 'Not selected');
- t3.setAttribute('tab-label', 'Not selected');
+ Polymer.dom(t1).setAttribute('tab-label', 'This should be selected');
+ Polymer.dom(t2).setAttribute('tab-label', 'Not selected');
+ Polymer.dom(t3).setAttribute('tab-label', 'Not selected');
Polymer.dom(tabViewContainer).appendChild(tabView);
@@ -309,12 +309,12 @@ tr.b.unittest.testSuite(function() {
Polymer.dom(tabView).appendChild(t2);
Polymer.dom(tabView).appendChild(t3);
- t1.setAttribute('tab-label', 'This should not exist');
- t2.setAttribute('tab-label', 'Not selected');
- t3.setAttribute('tab-label', 'Not selected');
+ Polymer.dom(t1).setAttribute('tab-label', 'This should not exist');
+ Polymer.dom(t2).setAttribute('tab-label', 'Not selected');
+ Polymer.dom(t3).setAttribute('tab-label', 'Not selected');
tabView.selectedTab = t1;
- tabView.removeChild(t1);
+ Polymer.dom(tabView).removeChild(t1);
Polymer.dom(tabViewContainer).appendChild(tabView);
« no previous file with comments | « tracing/tracing/ui/base/tab_view.html ('k') | tracing/tracing/ui/base/table.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698