| OLD | NEW |
| (Empty) |
| 1 <script> | |
| 2 chrome.test.runTests([ | |
| 3 function expand() { | |
| 4 chrome.test.listenOnce(chrome.toolstrip.onExpanded, function(){}); | |
| 5 chrome.toolstrip.expand({height:200}, | |
| 6 chrome.test.callbackPass(function(){})); | |
| 7 }, | |
| 8 | |
| 9 function collapse() { | |
| 10 chrome.test.listenOnce(chrome.toolstrip.onCollapsed, function(){}); | |
| 11 chrome.toolstrip.collapse({}, chrome.test.callbackPass(function(){})); | |
| 12 }, | |
| 13 | |
| 14 /* TODO(mpcomplete): this is failing in part due to bug 21905 | |
| 15 function expandOther() { | |
| 16 var orig = window.location; | |
| 17 var relative = "folder/relative.html"; | |
| 18 | |
| 19 // Get the other toolstrip. | |
| 20 var toolstrips = chrome.extension.getToolstrips(); | |
| 21 var other = (toolstrips[0].location == location) ? | |
| 22 toolstrips[1] : toolstrips[0]; | |
| 23 | |
| 24 other.chrome.toolstrip.expand({height:200, url:relative}, | |
| 25 chrome.test.callbackPass(function() { | |
| 26 // TODO(mpcomplete) this never gets called | |
| 27 chrome.test.log(other.location.toString()); | |
| 28 chrome.test.listenOnce(other.onLoad, function() { | |
| 29 chrome.test.log(other.location.toString()); | |
| 30 chrome.test.assertEq(other.location.toString(), | |
| 31 chrome.extension.getURL(relative)); | |
| 32 other.chrome.toolstrip.collapse({url:"../test2.html"}, | |
| 33 chrome.test.callbackPass(function() { | |
| 34 chrome.test.assertEq(other.location.toString(), orig); | |
| 35 })); | |
| 36 }); | |
| 37 })); | |
| 38 }, | |
| 39 */ | |
| 40 ]); | |
| 41 </script> | |
| 42 test | |
| OLD | NEW |