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

Side by Side Diff: pkg/unittest/coverage_controller.js

Issue 10917275: Update unittest to new package layout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/unittest/core_matchers.dart ('k') | pkg/unittest/description.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
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.
4
5 /**
6 * Coverage controller logic - used by coverage test harness to embed tests in
7 * DumpRenderTree and extract coverage information.
8 */
9
10 var LONG_LINE = 60000;
11
12 function onReceive(e) {
13 if (e.data == 'unittest-suite-done') {
14 var s = JSON.stringify(top._$jscoverage);
15 var res = '';
16 // DumpRenderTree has a bug on lines longer than 2^16, so we split them
17 while (s.length > LONG_LINE) {
18 res += s.substr(0, LONG_LINE) + '<br>\n';
19 s = s.substr(LONG_LINE);
20 }
21 res += s;
22 window.document.body.innerHTML = res;
23 window.layoutTestController.notifyDone();
24 }
25 }
26
27 if (window.layoutTestController) {
28 window.layoutTestController.dumpAsText();
29 window.layoutTestController.waitUntilDone();
30 window.addEventListener("message", onReceive, false);
31 }
OLDNEW
« no previous file with comments | « pkg/unittest/core_matchers.dart ('k') | pkg/unittest/description.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698