| 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 var TestWidget = class extends UI.Widget { | 8 var TestWidget = class extends UI.Widget { |
| 9 constructor(widgetName) | 9 constructor(widgetName) |
| 10 { | 10 { |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 parentWidget.show(UI.inspectorView.element); | 338 parentWidget.show(UI.inspectorView.element); |
| 339 parentWidget.detach(); | 339 parentWidget.detach(); |
| 340 next(); | 340 next(); |
| 341 }, | 341 }, |
| 342 | 342 |
| 343 function testAlienParent(next) | 343 function testAlienParent(next) |
| 344 { | 344 { |
| 345 var parentWidget1 = new TestWidget("Parent"); | 345 var parentWidget1 = new TestWidget("Parent"); |
| 346 var parentWidget2 = new TestWidget("Parent"); | 346 var parentWidget2 = new TestWidget("Parent"); |
| 347 var childWidget = new TestWidget("Child"); | 347 var childWidget = new TestWidget("Child"); |
| 348 childWidget.attach(parentWidget1, parentWidget2.element); | 348 childWidget.attach(parentWidget1); |
| 349 try { | 349 try { |
| 350 childWidget.showWidget(); | 350 childWidget.showWidget(parentWidget2.element); |
| 351 } catch (e) { | 351 } catch (e) { |
| 352 InspectorTest.addResult(e); | 352 InspectorTest.addResult(e); |
| 353 } | 353 } |
| 354 next(); | 354 next(); |
| 355 }, | 355 }, |
| 356 | 356 |
| 357 function testReparentWithinWidget(next) | 357 function testReparentWithinWidget(next) |
| 358 { | 358 { |
| 359 var parentWidget = new TestWidget("Parent"); | 359 var parentWidget = new TestWidget("Parent"); |
| 360 parentWidget.show(UI.inspectorView.element); | 360 parentWidget.show(UI.inspectorView.element); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 371 </script> | 371 </script> |
| 372 </head> | 372 </head> |
| 373 | 373 |
| 374 <body onload="runTest()"> | 374 <body onload="runTest()"> |
| 375 <p> | 375 <p> |
| 376 This tests that events are properly propagated through Widget hierarchy. | 376 This tests that events are properly propagated through Widget hierarchy. |
| 377 </p> | 377 </p> |
| 378 | 378 |
| 379 </body> | 379 </body> |
| 380 </html> | 380 </html> |
| OLD | NEW |