Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: pkg/dev_compiler/lib/js/common/dart_sdk.js

Issue 2732413002: Fix mocking on native classes (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: pkg/dev_compiler/lib/js/common/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
index b895ceec7a28e5e053f6bbac9a5e212fd9abf843..79d9cfa7ea5dab2918f24ef1cf81bfb8521075c8 100644
--- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
@@ -72298,6 +72298,7 @@ dart.setSignature(html$._GeopositionWrapper, {
timestamp: dart.definiteFunctionType(core.int, [])
})
});
+dart.defineExtensionMembers(html$._GeopositionWrapper, ['coords', 'timestamp']);
dart.defineExtensionNames([
'coords',
'timestamp'
@@ -89778,6 +89779,21 @@ dart.setSignature(html$._WrappedEvent, {
stopPropagation: dart.definiteFunctionType(dart.void, [])
})
});
+dart.defineExtensionMembers(html$._WrappedEvent, [
+ 'preventDefault',
+ 'stopImmediatePropagation',
+ 'stopPropagation',
+ 'bubbles',
+ 'cancelable',
+ 'currentTarget',
+ 'defaultPrevented',
+ 'eventPhase',
+ 'target',
+ 'timeStamp',
+ 'type',
+ 'matchingTarget',
+ 'path'
+]);
html$._BeforeUnloadEvent = class _BeforeUnloadEvent extends html$._WrappedEvent {
new(base) {
this[_returnValue] = null;
@@ -89799,6 +89815,7 @@ dart.setSignature(html$._BeforeUnloadEvent, {
getters: () => ({returnValue: dart.definiteFunctionType(core.String, [])}),
setters: () => ({returnValue: dart.definiteFunctionType(dart.void, [core.String])})
});
+dart.defineExtensionMembers(html$._BeforeUnloadEvent, ['returnValue', 'returnValue']);
const _eventType = Symbol('_eventType');
html$._BeforeUnloadEventStreamProvider = class _BeforeUnloadEventStreamProvider extends core.Object {
new(eventType) {
@@ -93101,6 +93118,25 @@ dart.setSignature(html$.KeyEvent, {
}),
names: ['_makeRecord', '_convertToHexString']
});
+dart.defineExtensionMembers(html$.KeyEvent, [
+ 'getModifierState',
+ 'keyCode',
+ 'charCode',
+ 'altKey',
+ 'which',
+ 'currentTarget',
+ 'code',
+ 'ctrlKey',
+ 'detail',
+ 'key',
+ 'keyLocation',
+ 'metaKey',
+ 'shiftKey',
+ 'sourceDevice',
+ 'view',
+ 'location',
+ 'repeat'
+]);
dart.defineLazy(html$.KeyEvent, {
get _keyboardEventDispatchRecord() {
return html$.KeyEvent._makeRecord();
@@ -94806,12 +94842,16 @@ dart.setSignature(html$._DOMWindowCrossFrame, {
dart.defineExtensionMembers(html$._DOMWindowCrossFrame, [
'close',
'postMessage',
+ 'addEventListener',
+ 'dispatchEvent',
+ 'removeEventListener',
'history',
'location',
'closed',
'opener',
'parent',
- 'top'
+ 'top',
+ 'on'
]);
html$._LocationCrossFrame = class _LocationCrossFrame extends core.Object {
set href(val) {
@@ -95328,12 +95368,33 @@ html_common.convertNativeToDart_ContextAttributes = function(nativeContextAttrib
};
dart.fn(html_common.convertNativeToDart_ContextAttributes, dynamicTodynamic$());
html_common._TypedImageData = class _TypedImageData extends core.Object {
+ get data() {
+ return this[data$];
+ }
+ set data(value) {
+ super.data = value;
+ }
+ get height() {
+ return this[height$];
+ }
+ set height(value) {
+ super.height = value;
+ }
+ get width() {
+ return this[width$];
+ }
+ set width(value) {
+ super.width = value;
+ }
new(data, height, width) {
- this.data = data;
- this.height = height;
- this.width = width;
+ this[data$] = data;
+ this[height$] = height;
+ this[width$] = width;
}
};
+const data$ = Symbol("_TypedImageData.data");
+const height$ = Symbol("_TypedImageData.height");
+const width$ = Symbol("_TypedImageData.width");
html_common._TypedImageData[dart.implements] = () => [html$.ImageData];
dart.setSignature(html_common._TypedImageData, {
fields: () => ({
@@ -95342,6 +95403,7 @@ dart.setSignature(html_common._TypedImageData, {
width: core.int
})
});
+dart.defineExtensionMembers(html_common._TypedImageData, ['data', 'height', 'width']);
html_common.convertNativeToDart_ImageData = function(nativeImageData) {
0;
if (html$.ImageData.is(nativeImageData)) {
@@ -98622,7 +98684,7 @@ svg$.FilterPrimitiveStandardAttributes = class FilterPrimitiveStandardAttributes
dart.throw(new core.UnsupportedError("Not supported"));
}
get height() {
- return this[height$];
+ return this[height$0];
}
set height(value) {
super.height = value;
@@ -98634,7 +98696,7 @@ svg$.FilterPrimitiveStandardAttributes = class FilterPrimitiveStandardAttributes
super.result = value;
}
get width() {
- return this[width$];
+ return this[width$0];
}
set width(value) {
super.width = value;
@@ -98652,9 +98714,9 @@ svg$.FilterPrimitiveStandardAttributes = class FilterPrimitiveStandardAttributes
super.y = value;
}
};
-const height$ = Symbol("FilterPrimitiveStandardAttributes.height");
+const height$0 = Symbol("FilterPrimitiveStandardAttributes.height");
const result = Symbol("FilterPrimitiveStandardAttributes.result");
-const width$ = Symbol("FilterPrimitiveStandardAttributes.width");
+const width$0 = Symbol("FilterPrimitiveStandardAttributes.width");
const x = Symbol("FilterPrimitiveStandardAttributes.x");
const y = Symbol("FilterPrimitiveStandardAttributes.y");
dart.setSignature(svg$.FilterPrimitiveStandardAttributes, {

Powered by Google App Engine
This is Rietveld 408576698