From 6e7bcb52f071ca2dfd60cc2e4b44d7210fb2c951 Mon Sep 17 00:00:00 2001 From: "sra@google.com" Date: Tue, 14 Feb 2012 02:00:45 +0000 Subject: [PATCH] Add XSLTProcessor constructor Fixes Issue 1642 for Frog. Implementation needed for Dartium. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com//9391029 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4205 260f80e4-7a28-3924-810f-c04153c831b5 --- client/dom/frog/dom_frog.dart | 9 ++++++++- .../dom/generated/src/interface/XSLTProcessor.dart | 4 +++- client/dom/src/dummy_FactoryProviders.dart | 5 +++++ client/dom/src/frog_FactoryProviders.dart | 5 +++++ client/dom/src/native_FactoryProviders.dart | 4 ++++ .../src/native_FactoryProvidersImplementation.dart | 1 + client/dom/src/wrapping_FactoryProviders.dart | 7 +++++++ .../interface/interface_XSLTProcessor.darttemplate | 10 ++++++++++ client/tests/client/client.status | 1 + client/tests/client/dom/XSLTProcessorTest.dart | 14 ++++++++++++++ 10 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 client/dom/templates/dom/interface/interface_XSLTProcessor.darttemplate create mode 100644 client/tests/client/dom/XSLTProcessorTest.dart diff --git a/client/dom/frog/dom_frog.dart b/client/dom/frog/dom_frog.dart index 2671043a042..b2ad8d269f3 100644 --- a/client/dom/frog/dom_frog.dart +++ b/client/dom/frog/dom_frog.dart @@ -22691,7 +22691,9 @@ interface XPathResult { // WARNING: Do not edit - generated code. -interface XSLTProcessor { +interface XSLTProcessor default _XSLTProcessorFactoryProvider { + + XSLTProcessor(); void clearParameters(); @@ -23451,6 +23453,11 @@ class _XMLHttpRequestFactoryProvider { factory XMLHttpRequest() native '''return new XMLHttpRequest();'''; } + +class _XSLTProcessorFactoryProvider { + + factory XSLTProcessor() native '''return new XSLTProcessor();'''; +} // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. diff --git a/client/dom/generated/src/interface/XSLTProcessor.dart b/client/dom/generated/src/interface/XSLTProcessor.dart index 21e1ca8cb4f..53ac2872d93 100644 --- a/client/dom/generated/src/interface/XSLTProcessor.dart +++ b/client/dom/generated/src/interface/XSLTProcessor.dart @@ -4,7 +4,9 @@ // WARNING: Do not edit - generated code. -interface XSLTProcessor { +interface XSLTProcessor default _XSLTProcessorFactoryProvider { + + XSLTProcessor(); void clearParameters(); diff --git a/client/dom/src/dummy_FactoryProviders.dart b/client/dom/src/dummy_FactoryProviders.dart index a5aed1f2a45..a00cd180f59 100644 --- a/client/dom/src/dummy_FactoryProviders.dart +++ b/client/dom/src/dummy_FactoryProviders.dart @@ -80,3 +80,8 @@ class _XMLHttpRequestFactoryProvider { factory XMLHttpRequest() => _dummy(); } + +class _XSLTProcessorFactoryProvider { + + factory XSLTProcessor() => _dummy(); +} diff --git a/client/dom/src/frog_FactoryProviders.dart b/client/dom/src/frog_FactoryProviders.dart index 9df968984e9..477e9cd5ca7 100644 --- a/client/dom/src/frog_FactoryProviders.dart +++ b/client/dom/src/frog_FactoryProviders.dart @@ -91,3 +91,8 @@ class _XMLHttpRequestFactoryProvider { factory XMLHttpRequest() native '''return new XMLHttpRequest();'''; } + +class _XSLTProcessorFactoryProvider { + + factory XSLTProcessor() native '''return new XSLTProcessor();'''; +} diff --git a/client/dom/src/native_FactoryProviders.dart b/client/dom/src/native_FactoryProviders.dart index 4462ce8b526..6f5bc5c714e 100644 --- a/client/dom/src/native_FactoryProviders.dart +++ b/client/dom/src/native_FactoryProviders.dart @@ -63,3 +63,7 @@ class _WebSocketFactoryProvider { class _XMLHttpRequestFactoryProvider { factory XMLHttpRequest() => FactoryProviderImplementation.createXMLHttpRequest(); } + +class _XSLTProcessorFactoryProvider { + factory XSLTProcessor() => FactoryProviderImplementation.createXSLTProcessor(); +} diff --git a/client/dom/src/native_FactoryProvidersImplementation.dart b/client/dom/src/native_FactoryProvidersImplementation.dart index 25d2680e59c..93636f7f41d 100644 --- a/client/dom/src/native_FactoryProvidersImplementation.dart +++ b/client/dom/src/native_FactoryProvidersImplementation.dart @@ -20,4 +20,5 @@ class FactoryProviderImplementation { static WebKitPoint createWebKitPoint(num x, num y) native "WebKitPoint_constructor_Callback"; static WebSocket createWebSocket(String url) native "WebSocket_constructor_Callback"; static XMLHttpRequest createXMLHttpRequest() native "XMLHttpRequest_constructor_Callback"; + static XSLTProcessor createXSLTProcessor() native "XSLTProcessor_constructor_Callback"; } diff --git a/client/dom/src/wrapping_FactoryProviders.dart b/client/dom/src/wrapping_FactoryProviders.dart index 938d1bfe1a2..449543a6303 100644 --- a/client/dom/src/wrapping_FactoryProviders.dart +++ b/client/dom/src/wrapping_FactoryProviders.dart @@ -101,3 +101,10 @@ class _XMLHttpRequestFactoryProvider { static XMLHttpRequest create() native; } + +class _XSLTProcessorFactoryProvider { + + factory XSLTProcessor() { return create(); } + + static XSLTProcessor create() native; +} diff --git a/client/dom/templates/dom/interface/interface_XSLTProcessor.darttemplate b/client/dom/templates/dom/interface/interface_XSLTProcessor.darttemplate new file mode 100644 index 00000000000..46429b2dc57 --- /dev/null +++ b/client/dom/templates/dom/interface/interface_XSLTProcessor.darttemplate @@ -0,0 +1,10 @@ +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// WARNING: Do not edit - generated code. + +interface XSLTProcessor$!EXTENDS default _XSLTProcessorFactoryProvider { + + XSLTProcessor(); +$!MEMBERS} diff --git a/client/tests/client/client.status b/client/tests/client/client.status index cc72190c5b0..44b20ad65d5 100644 --- a/client/tests/client/client.status +++ b/client/tests/client/client.status @@ -17,6 +17,7 @@ dom/NativeGCTest: Fail # Issue 1448. dom/TypingTest: Fail dom/XHRTest: Fail dom/WebSocketTest: Fail +dom/XSLTProcessorTest: Fail # Issue 1642 - implement constructor. [ $component == dartium && $mode == debug ] # TODO(vsm): Triage Dartium failures. diff --git a/client/tests/client/dom/XSLTProcessorTest.dart b/client/tests/client/dom/XSLTProcessorTest.dart new file mode 100644 index 00000000000..e61ec082a06 --- /dev/null +++ b/client/tests/client/dom/XSLTProcessorTest.dart @@ -0,0 +1,14 @@ +#library('XSLTProcessorTest'); +#import('../../../testing/unittest/unittest.dart'); +#import('dart:dom'); + +main() { + + forLayoutTests(); + + test('constructorTest', () { + var processor = new XSLTProcessor(); + Expect.isTrue(processor != null); + Expect.isTrue(processor is XSLTProcessor); + }); +}