| Index: tests/compiler/dart2js_native/native_novel_html_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_novel_html_test.dart b/tests/compiler/dart2js_native/native_novel_html_test.dart
|
| index 81da1fad992612c2b41cf8bc05e40f417c1d0050..19f9ecae882a9909bdc89459ba1e421471efd7c5 100644
|
| --- a/tests/compiler/dart2js_native/native_novel_html_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_novel_html_test.dart
|
| @@ -15,23 +15,26 @@ class Element {
|
| makeE() native;
|
| makeF() native;
|
|
|
| -void setup() native """
|
| -// A novel HTML element.
|
| -function HTMLGoofyElement(){}
|
| -HTMLGoofyElement.prototype.nativeMethod = function(a) {
|
| - return 'Goofy.nativeMethod(' + a + ')';
|
| -};
|
| -makeE = function(){return new HTMLGoofyElement};
|
| -
|
| -// A non-HTML element with a misleading name.
|
| -function HTMLFakeyElement(){}
|
| -HTMLFakeyElement.prototype.nativeMethod = function(a) {
|
| - return 'Fakey.nativeMethod(' + a + ')';
|
| -};
|
| -makeF = function(){return new HTMLFakeyElement};
|
| -
|
| -self.nativeConstructor(HTMLGoofyElement);
|
| -""";
|
| +void setup() {
|
| + JS('', r"""
|
| +(function(){
|
| + // A novel HTML element.
|
| + function HTMLGoofyElement(){}
|
| + HTMLGoofyElement.prototype.nativeMethod = function(a) {
|
| + return 'Goofy.nativeMethod(' + a + ')';
|
| + };
|
| + makeE = function(){return new HTMLGoofyElement()};
|
| +
|
| + // A non-HTML element with a misleading name.
|
| + function HTMLFakeyElement(){}
|
| + HTMLFakeyElement.prototype.nativeMethod = function(a) {
|
| + return 'Fakey.nativeMethod(' + a + ')';
|
| + };
|
| + makeF = function(){return new HTMLFakeyElement()};
|
| +
|
| + self.nativeConstructor(HTMLGoofyElement);
|
| +})()""");
|
| +}
|
|
|
| main() {
|
| nativeTesting();
|
|
|