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

Unified Diff: test/codegen/expect/lib/html/table_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
« no previous file with comments | « test/codegen/expect/lib/html/svgelement_test.js ('k') | test/codegen/expect/lib/html/text_event_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/lib/html/table_test.js
diff --git a/test/codegen/expect/lib/html/table_test.js b/test/codegen/expect/lib/html/table_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..4a90652b32242ed5d56788a4cb11562ae5bfe52c
--- /dev/null
+++ b/test/codegen/expect/lib/html/table_test.js
@@ -0,0 +1,57 @@
+dart_library.library('lib/html/table_test', null, /* Imports */[
+ 'dart_sdk',
+ 'unittest'
+], function load__table_test(exports, dart_sdk, unittest) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const html = dart_sdk.html;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const html_config = unittest.html_config;
+ const unittest$ = unittest.unittest;
+ const src__matcher__expect = unittest.src__matcher__expect;
+ const table_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ table_test.main = function() {
+ html_config.useHtmlConfiguration();
+ unittest$.test('createTBody', dart.fn(() => {
+ let table = html.TableElement.new();
+ let head = table[dartx.createTHead]();
+ src__matcher__expect.expect(table[dartx.tHead], head);
+ let headerRow = head[dartx.addRow]();
+ let headerCell = headerRow[dartx.addCell]();
+ headerCell[dartx.text] = 'Header Cell';
+ let caption = table[dartx.createCaption]();
+ src__matcher__expect.expect(table[dartx.caption], caption);
+ let body = table[dartx.createTBody]();
+ src__matcher__expect.expect(table[dartx.tBodies][dartx.length], 1);
+ src__matcher__expect.expect(table[dartx.tBodies][dartx.get](0), body);
+ let bodyRow = body[dartx.addRow]();
+ src__matcher__expect.expect(body[dartx.rows][dartx.length], 1);
+ src__matcher__expect.expect(body[dartx.rows][dartx.get](0), bodyRow);
+ let bodyCell = bodyRow[dartx.addCell]();
+ bodyCell[dartx.text] = 'Body Cell';
+ src__matcher__expect.expect(bodyRow[dartx.cells][dartx.length], 1);
+ src__matcher__expect.expect(bodyRow[dartx.cells][dartx.get](0), bodyCell);
+ let foot = table[dartx.createTFoot]();
+ src__matcher__expect.expect(table[dartx.tFoot], foot);
+ let footerRow = foot[dartx.addRow]();
+ src__matcher__expect.expect(foot[dartx.rows][dartx.length], 1);
+ src__matcher__expect.expect(foot[dartx.rows][dartx.get](0), footerRow);
+ let footerCell = footerRow[dartx.addCell]();
+ footerCell[dartx.text] = 'Footer Cell';
+ src__matcher__expect.expect(footerRow[dartx.cells][dartx.length], 1);
+ src__matcher__expect.expect(footerRow[dartx.cells][dartx.get](0), footerCell);
+ let body2 = table[dartx.createTBody]();
+ let bodyRow2 = body2[dartx.addRow]();
+ let bodyCell2 = bodyRow2[dartx.addCell]();
+ bodyCell2[dartx.text] = 'Body Cell2';
+ src__matcher__expect.expect(body2[dartx.rows][dartx.length], 1);
+ src__matcher__expect.expect(table[dartx.tBodies][dartx.length], 2);
+ src__matcher__expect.expect(table[dartx.tBodies][dartx.get](1), body2);
+ }, VoidTodynamic()));
+ };
+ dart.fn(table_test.main, VoidTodynamic());
+ // Exports:
+ exports.table_test = table_test;
+});
« no previous file with comments | « test/codegen/expect/lib/html/svgelement_test.js ('k') | test/codegen/expect/lib/html/text_event_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698