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

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_iterationWithModification.html

Issue 2097093002: [Typed OM] Rename cssString methods to cssText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename-transformvalue
Patch Set: Update usage in csspaint logging for tests Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 4
5 <div id="testElement"></div> 5 <div id="testElement"></div>
6 6
7 <script> 7 <script>
8 8
9 test(function() { 9 test(function() {
10 testElement.style = "width: 60px; border-left-width: 30px;"; 10 testElement.style = "width: 60px; border-left-width: 30px;";
11 11
12 var iterator = testElement.styleMap.entries(); 12 var iterator = testElement.styleMap.entries();
13 var entry = iterator.next(); 13 var entry = iterator.next();
14 assert_equals(entry.value[0], 'width'); 14 assert_equals(entry.value[0], 'width');
15 assert_true(entry.value[1] instanceof CSSSimpleLength); 15 assert_true(entry.value[1] instanceof CSSSimpleLength);
16 assert_equals(entry.value[1].cssString, '60px'); 16 assert_equals(entry.value[1].cssText, '60px');
17 17
18 // This shouldn't appear in the iterator. 18 // This shouldn't appear in the iterator.
19 testElement.style.borderTopWidth = '10px'; 19 testElement.style.borderTopWidth = '10px';
20 20
21 entry = iterator.next(); 21 entry = iterator.next();
22 assert_equals(entry.value[0], 'border-left-width'); 22 assert_equals(entry.value[0], 'border-left-width');
23 assert_true(entry.value[1] instanceof CSSSimpleLength); 23 assert_true(entry.value[1] instanceof CSSSimpleLength);
24 assert_equals(entry.value[1].cssString, '30px'); 24 assert_equals(entry.value[1].cssText, '30px');
25 25
26 assert_true(iterator.next().done); 26 assert_true(iterator.next().done);
27 }, "Adding a property while iterating over entries() doesn't affect iterator"); 27 }, "Adding a property while iterating over entries() doesn't affect iterator");
28 28
29 test(function() { 29 test(function() {
30 testElement.style = "width: 60px; border-left-width: 30px;"; 30 testElement.style = "width: 60px; border-left-width: 30px;";
31 31
32 var iterator = testElement.styleMap.values(); 32 var iterator = testElement.styleMap.values();
33 var entry = iterator.next(); 33 var entry = iterator.next();
34 assert_true(entry.value instanceof CSSSimpleLength); 34 assert_true(entry.value instanceof CSSSimpleLength);
35 assert_equals(entry.value.cssString, '60px'); 35 assert_equals(entry.value.cssText, '60px');
36 36
37 // This shouldn't appear in the iterator. 37 // This shouldn't appear in the iterator.
38 testElement.style.borderTopWidth = '10px'; 38 testElement.style.borderTopWidth = '10px';
39 39
40 entry = iterator.next(); 40 entry = iterator.next();
41 assert_true(entry.value instanceof CSSSimpleLength); 41 assert_true(entry.value instanceof CSSSimpleLength);
42 assert_equals(entry.value.cssString, '30px'); 42 assert_equals(entry.value.cssText, '30px');
43 43
44 assert_true(iterator.next().done); 44 assert_true(iterator.next().done);
45 }, "Adding a property while iterating over values() doesn't affect current itera tor"); 45 }, "Adding a property while iterating over values() doesn't affect current itera tor");
46 46
47 test(function() { 47 test(function() {
48 testElement.style = "width: 60px; border-left-width: 30px;"; 48 testElement.style = "width: 60px; border-left-width: 30px;";
49 49
50 var iterator = testElement.styleMap.keys(); 50 var iterator = testElement.styleMap.keys();
51 var entry = iterator.next(); 51 var entry = iterator.next();
52 assert_equals(entry.value, 'width'); 52 assert_equals(entry.value, 'width');
53 53
54 // This shouldn't appear in the iterator. 54 // This shouldn't appear in the iterator.
55 testElement.style.borderTopWidth = '10px'; 55 testElement.style.borderTopWidth = '10px';
56 56
57 entry = iterator.next(); 57 entry = iterator.next();
58 assert_equals(entry.value, 'border-left-width'); 58 assert_equals(entry.value, 'border-left-width');
59 59
60 assert_true(iterator.next().done); 60 assert_true(iterator.next().done);
61 }, "Adding a property while iterating over keys() doesn't affect iterator"); 61 }, "Adding a property while iterating over keys() doesn't affect iterator");
62 62
63 </script> 63 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698