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

Unified Diff: test/codegen/expect/lib/html/client_rect_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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:
View side-by-side diff with in-line comments
Download patch
Index: test/codegen/expect/lib/html/client_rect_test.js
diff --git a/test/codegen/expect/lib/html/client_rect_test.js b/test/codegen/expect/lib/html/client_rect_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..65c0c1fcfd34a5048a6976a26c698711a245b554
--- /dev/null
+++ b/test/codegen/expect/lib/html/client_rect_test.js
@@ -0,0 +1,40 @@
+dart_library.library('lib/html/client_rect_test', null, /* Imports */[
+ 'dart_sdk',
+ 'unittest'
+], function load__client_rect_test(exports, dart_sdk, unittest) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const math = dart_sdk.math;
+ const html = dart_sdk.html;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const src__matcher__core_matchers = unittest.src__matcher__core_matchers;
+ const html_config = unittest.html_config;
+ const unittest$ = unittest.unittest;
+ const src__matcher__expect = unittest.src__matcher__expect;
+ const client_rect_test = Object.create(null);
+ let RectangleOfnum = () => (RectangleOfnum = dart.constFn(math.Rectangle$(core.num)))();
+ let ListOfRectangleOfnum = () => (ListOfRectangleOfnum = dart.constFn(core.List$(RectangleOfnum())))();
+ let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionType(core.bool, [dart.dynamic])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ client_rect_test.main = function() {
+ let isRectList = src__matcher__core_matchers.predicate(dart.fn(x => ListOfRectangleOfnum().is(x), dynamicTobool()), 'is a List<Rectangle>');
+ function insertTestDiv() {
+ let element = html.Element.tag('div');
+ element[dartx.innerHtml] = ' A large block of text should go here. Click this\n block of text multiple times to see each line\n highlight with every click of the mouse button.\n ';
+ html.document[dartx.body][dartx.append](element);
+ return element;
+ }
+ dart.fn(insertTestDiv, VoidTodynamic());
+ html_config.useHtmlConfiguration();
+ unittest$.test("ClientRectList test", dart.fn(() => {
+ insertTestDiv();
+ let range = html.Range.new();
+ let rects = range[dartx.getClientRects]();
+ src__matcher__expect.expect(rects, isRectList);
+ }, VoidTodynamic()));
+ };
+ dart.fn(client_rect_test.main, VoidTodynamic());
+ // Exports:
+ exports.client_rect_test = client_rect_test;
+});
« no previous file with comments | « test/codegen/expect/lib/html/cdata_test.js ('k') | test/codegen/expect/lib/html/cross_domain_iframe_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698