| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 function TestWidget(widgetName) | 8 function TestWidget(widgetName) |
| 9 { | 9 { |
| 10 WebInspector.Widget.call(this); | 10 WebInspector.Widget.call(this); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 var parentWidget1 = new TestWidget("Parent"); | 348 var parentWidget1 = new TestWidget("Parent"); |
| 349 var parentWidget2 = new TestWidget("Parent"); | 349 var parentWidget2 = new TestWidget("Parent"); |
| 350 var childWidget = new TestWidget("Child"); | 350 var childWidget = new TestWidget("Child"); |
| 351 childWidget.attach(parentWidget1); | 351 childWidget.attach(parentWidget1); |
| 352 try { | 352 try { |
| 353 childWidget.showWidget(parentWidget2.element); | 353 childWidget.showWidget(parentWidget2.element); |
| 354 } catch (e) { | 354 } catch (e) { |
| 355 InspectorTest.addResult(e); | 355 InspectorTest.addResult(e); |
| 356 } | 356 } |
| 357 next(); | 357 next(); |
| 358 }, |
| 359 |
| 360 function testReparentWithinWidget(next) |
| 361 { |
| 362 var parentWidget = new TestWidget("Parent"); |
| 363 parentWidget.show(WebInspector.inspectorView.element); |
| 364 var childWidget = new TestWidget("Child"); |
| 365 var container1 = parentWidget.element.createChild("div"); |
| 366 var container2 = parentWidget.element.createChild("div"); |
| 367 childWidget.show(container1); |
| 368 childWidget.show(container2); |
| 369 next(); |
| 358 } | 370 } |
| 359 ]); | 371 ]); |
| 360 } | 372 } |
| 361 | 373 |
| 362 </script> | 374 </script> |
| 363 </head> | 375 </head> |
| 364 | 376 |
| 365 <body onload="runTest()"> | 377 <body onload="runTest()"> |
| 366 <p> | 378 <p> |
| 367 This tests that events are properly propagated through Widget hierarchy. | 379 This tests that events are properly propagated through Widget hierarchy. |
| 368 </p> | 380 </p> |
| 369 | 381 |
| 370 </body> | 382 </body> |
| 371 </html> | 383 </html> |
| OLD | NEW |