OLD | NEW |
1 <html> | 1 <html> |
2 <script src="../../http/tests/inspector/inspector-test.js"></script> | 2 <script src="../../http/tests/inspector/inspector-test.js"></script> |
3 <script src="../../http/tests/inspector/debugger-test.js"></script> | 3 <script src="../../http/tests/inspector/debugger-test.js"></script> |
4 | 4 |
5 <script type="application/dart" src="scope-variables.dart"></script> | 5 <script type="application/dart" src="scope-variables.dart"></script> |
6 | 6 |
7 <script> | 7 <script> |
8 | 8 |
9 function postMessageToDart() | 9 function postMessageToDart() |
10 { | 10 { |
11 window.postMessage('fromJS', '*'); | 11 window.postMessage('fromJS', '*'); |
12 } | 12 } |
13 | 13 |
14 function testFunction() { | 14 function testFunction() { |
15 postMessageToDart(); | 15 postMessageToDart(); |
16 } | 16 } |
17 | 17 |
18 function test() | 18 function test() |
19 { | 19 { |
20 var realAddResult = InspectorTest.addResult; | 20 var realAddResult = InspectorTest.addResult; |
21 // Inject name mangling for Dart more deeply in the existing JS test | 21 // Inject name mangling for Dart more deeply in the existing JS test |
22 // framework to reduce the amount of code that we need to duplicate from | 22 // framework to reduce the amount of code that we need to duplicate from |
23 // the JS side. | 23 // the JS side. |
24 InspectorTest.addResult = function(text) { | 24 InspectorTest.addResult = function(text) { |
25 text = text.replace(/(file:\/\/\/\w):/g, "$1"); | 25 text = text.replace(/(file:\/\/\/\w):/g, "$1"); |
26 text = text.replace(/file:\/\/\/?[^: )]*([.]dart|[$]script|[$]trampoline
)/g, "(SOURCE_LOCATION)"); | 26 text = text.replace(/file:\/\/\/?[^: )]*([.]dart|[$]script|[$]trampoline
)/g, "(SOURCE_LOCATION)"); |
27 text = text.replace(/\(file:\/\/\/?[^)]*\)/g, "(SOURCE_LOCATION)"); | 27 text = text.replace(/\(file:\/\/\/?[^)]*\)/g, "(SOURCE_LOCATION)"); |
28 text = text.replace(/@\d+/g, "(VM_PRIVATE_MANGLING)"); | 28 text = text.replace(/@\d+/g, "(VM_PRIVATE_MANGLING)"); |
29 text = text.replace(/\$main\-[0-9]*/g, "(DEFAULT_ISOLATE_NAME_SUFFIX)"); | 29 text = text.replace(/\$main\-[0-9]*/g, "(DEFAULT_ISOLATE_NAME_SUFFIX)"); |
30 text = text.replace(/:\d\d\d+/g, ":xxxx"); | 30 text = text.replace(/:\d\d\d+/g, ":xxxx"); |
31 return realAddResult.call(this, text); | 31 return realAddResult.call(this, text); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 pausedCallback(callFrames); | 86 pausedCallback(callFrames); |
87 } | 87 } |
88 } | 88 } |
89 }; | 89 }; |
90 </script> | 90 </script> |
91 | 91 |
92 <body onload="runTest()"> | 92 <body onload="runTest()"> |
93 <div id="example_div">Example div</div> | 93 <div id="example_div">Example div</div> |
94 </body> | 94 </body> |
95 </html> | 95 </html> |
OLD | NEW |