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

Side by Side Diff: dart/tests/html/custom/created_callback_test.dart

Issue 60733003: Version 0.8.10.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library created_callback_test; 5 library created_callback_test;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart'; 7 import 'package:unittest/html_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:js' as js; 9 import 'dart:js' as js;
10 import '../utils.dart'; 10 import '../utils.dart';
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 static void test() { 209 static void test() {
210 register(); 210 register();
211 211
212 upgradingContext = new DivElement(); 212 upgradingContext = new DivElement();
213 upgradingContext.setInnerHtml('<$tag></$tag>', 213 upgradingContext.setInnerHtml('<$tag></$tag>',
214 treeSanitizer: new NullTreeSanitizer()); 214 treeSanitizer: new NullTreeSanitizer());
215 var child = upgradingContext.firstChild; 215 var child = upgradingContext.firstChild;
216 216
217 expect(child.foo, 666); 217 expect(child.foo, 666);
218 expect(upgradingContextChild is HTMLElement, isTrue); 218 expect(upgradingContextChild is HtmlElement, isFalse);
219 expect(upgradingContextChild is AccessWhileUpgradingElement, isFalse, 219 expect(upgradingContextChild is AccessWhileUpgradingElement, isFalse,
220 reason: 'Elements accessed while upgrading should not be upgraded.'); 220 reason: 'Elements accessed while upgrading should not be upgraded.');
221 } 221 }
222 } 222 }
223 223
224 class MissingCreatedElement extends HtmlElement { 224 class MissingCreatedElement extends HtmlElement {
225 static final tag = 'x-missing-created'; 225 static final tag = 'x-missing-created';
226 226
227 factory MissingCreatedElement() => new Element.tag(tag); 227 factory MissingCreatedElement() => new Element.tag(tag);
228 } 228 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } catch(e) { 290 } catch(e) {
291 rethrow; 291 rethrow;
292 } finally { 292 } finally {
293 js.context['testExpectsGlobalError'] = false; 293 js.context['testExpectsGlobalError'] = false;
294 } 294 }
295 var errors = js.context['testSuppressedGlobalErrors']; 295 var errors = js.context['testSuppressedGlobalErrors'];
296 expect(errors['length'], 1); 296 expect(errors['length'], 1);
297 // Clear out the errors; 297 // Clear out the errors;
298 js.context['testSuppressedGlobalErrors']['length'] = 0; 298 js.context['testSuppressedGlobalErrors']['length'] = 0;
299 } 299 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698