| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 | 3 |
| 4 <style> | 4 <style> |
| 5 h1 { | 5 h1 { |
| 6 color: #FF2; | 6 color: #FF2; |
| 7 opacity: .5; | 7 opacity: .5; |
| 8 transform: rotate(1000000000000000065537deg); | 8 transform: rotate(1000000000000000065537deg); |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 function testAlterColor(next) | 24 function testAlterColor(next) |
| 25 { | 25 { |
| 26 var colorTreeElement = InspectorTest.getMatchedStylePropertyTreeItem
("color"); | 26 var colorTreeElement = InspectorTest.getMatchedStylePropertyTreeItem
("color"); |
| 27 colorTreeElement.startEditing(colorTreeElement.valueElement); | 27 colorTreeElement.startEditing(colorTreeElement.valueElement); |
| 28 | 28 |
| 29 // PageUp should change to 'FF3' | 29 // PageUp should change to 'FF3' |
| 30 colorTreeElement.valueElement.dispatchEvent(InspectorTest.createKeyE
vent("PageUp")); | 30 colorTreeElement.valueElement.dispatchEvent(InspectorTest.createKeyE
vent("PageUp")); |
| 31 // Ctrl/Meta + Shift Down should change to 'EE3' | 31 // Ctrl/Meta + Shift Down should change to 'EE3' |
| 32 if (WebInspector.isMac()) | 32 if (WebInspector.isMac()) |
| 33 colorTreeElement.valueElement.dispatchEvent(InspectorTest.create
KeyEvent("Down", /*Ctrl*/ false, /*Alt*/ false, /*Shift*/ true, /*Meta*/ true)); | 33 colorTreeElement.valueElement.dispatchEvent(InspectorTest.create
KeyEvent("ArrowDown", /*Ctrl*/ false, /*Alt*/ false, /*Shift*/ true, /*Meta*/ tr
ue)); |
| 34 else | 34 else |
| 35 colorTreeElement.valueElement.dispatchEvent(InspectorTest.create
KeyEvent("Down", /*Ctrl*/ true, /*Alt*/ false, /*Shift*/ true, /*Meta*/ false)); | 35 colorTreeElement.valueElement.dispatchEvent(InspectorTest.create
KeyEvent("ArrowDown", /*Ctrl*/ true, /*Alt*/ false, /*Shift*/ true, /*Meta*/ fal
se)); |
| 36 | 36 |
| 37 InspectorTest.addResult(colorTreeElement.listItemElement.textContent
); | 37 InspectorTest.addResult(colorTreeElement.listItemElement.textContent
); |
| 38 next(); | 38 next(); |
| 39 }, | 39 }, |
| 40 | 40 |
| 41 function testAlterNumber(next) | 41 function testAlterNumber(next) |
| 42 { | 42 { |
| 43 var opacityTreeElement = InspectorTest.getMatchedStylePropertyTreeIt
em("opacity"); | 43 var opacityTreeElement = InspectorTest.getMatchedStylePropertyTreeIt
em("opacity"); |
| 44 opacityTreeElement.startEditing(opacityTreeElement.valueElement); | 44 opacityTreeElement.startEditing(opacityTreeElement.valueElement); |
| 45 // 0.5 (initial). Alt + Up should change to 0.6 | 45 // 0.5 (initial). Alt + Up should change to 0.6 |
| 46 opacityTreeElement.valueElement.dispatchEvent(InspectorTest.createKe
yEvent("Up", /*Ctrl*/ false, /*Alt*/ true, /*Shift*/ false)); | 46 opacityTreeElement.valueElement.dispatchEvent(InspectorTest.createKe
yEvent("ArrowUp", /*Ctrl*/ false, /*Alt*/ true, /*Shift*/ false)); |
| 47 // Up should change to 1.6 | 47 // Up should change to 1.6 |
| 48 opacityTreeElement.valueElement.dispatchEvent(InspectorTest.createKe
yEvent("Up")); | 48 opacityTreeElement.valueElement.dispatchEvent(InspectorTest.createKe
yEvent("ArrowUp")); |
| 49 // Shift + PageUp should change to 11.6 | 49 // Shift + PageUp should change to 11.6 |
| 50 opacityTreeElement.valueElement.dispatchEvent(InspectorTest.createKe
yEvent("PageUp", /*Ctrl*/ false, /*Alt*/ false, /*Shift*/ true)); | 50 opacityTreeElement.valueElement.dispatchEvent(InspectorTest.createKe
yEvent("PageUp", /*Ctrl*/ false, /*Alt*/ false, /*Shift*/ true)); |
| 51 InspectorTest.addResult(opacityTreeElement.listItemElement.textConte
nt); | 51 InspectorTest.addResult(opacityTreeElement.listItemElement.textConte
nt); |
| 52 next(); | 52 next(); |
| 53 }, | 53 }, |
| 54 | 54 |
| 55 function testAlterBigNumber(next) | 55 function testAlterBigNumber(next) |
| 56 { | 56 { |
| 57 var treeElement = InspectorTest.getMatchedStylePropertyTreeItem("tra
nsform"); | 57 var treeElement = InspectorTest.getMatchedStylePropertyTreeItem("tra
nsform"); |
| 58 treeElement.startEditing(treeElement.valueElement); | 58 treeElement.startEditing(treeElement.valueElement); |
| 59 var selection = window.getSelection(); | 59 var selection = window.getSelection(); |
| 60 var range = selection.getRangeAt(0); | 60 var range = selection.getRangeAt(0); |
| 61 var newRange = document.createRange(); | 61 var newRange = document.createRange(); |
| 62 newRange.setStart(range.startContainer, 10); | 62 newRange.setStart(range.startContainer, 10); |
| 63 newRange.setEnd(range.startContainer, 10); | 63 newRange.setEnd(range.startContainer, 10); |
| 64 selection.removeAllRanges(); | 64 selection.removeAllRanges(); |
| 65 selection.addRange(newRange); | 65 selection.addRange(newRange); |
| 66 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"Up")); | 66 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"ArrowUp")); |
| 67 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"PageUp")); | 67 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"PageUp")); |
| 68 InspectorTest.addResult(treeElement.listItemElement.textContent); | 68 InspectorTest.addResult(treeElement.listItemElement.textContent); |
| 69 next(); | 69 next(); |
| 70 } | 70 } |
| 71 ]); | 71 ]); |
| 72 } | 72 } |
| 73 </script> | 73 </script> |
| 74 </head> | 74 </head> |
| 75 | 75 |
| 76 <body onload="runTest()"> | 76 <body onload="runTest()"> |
| 77 <p> | 77 <p> |
| 78 Tests that numeric and color values are incremented/decremented correctly. | 78 Tests that numeric and color values are incremented/decremented correctly. |
| 79 </p> | 79 </p> |
| 80 <h1 id="inspected">Inspect Me</h1> | 80 <h1 id="inspected">Inspect Me</h1> |
| 81 </body> | 81 </body> |
| 82 </html> | 82 </html> |
| OLD | NEW |