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

Side by Side Diff: tracing/tracing/ui/extras/about_tracing/record_controller_test.html

Issue 2948023002: Fix periodic dumping for memory-infra on Android. (Closed)
Patch Set: fix tests. Created 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" 8 <link rel="import"
9 href="/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html "> 9 href="/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html ">
10 <link rel="import" 10 <link rel="import"
(...skipping 14 matching lines...) Expand all
25 const mock = new tr.ui.e.about_tracing.MockTracingControllerClient(); 25 const mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
26 mock.expectRequest('endRecording', function() { 26 mock.expectRequest('endRecording', function() {
27 return ''; 27 return '';
28 }); 28 });
29 mock.expectRequest('getCategories', function() { 29 mock.expectRequest('getCategories', function() {
30 tr.b.timeout(20).then(() => 30 tr.b.timeout(20).then(() =>
31 recordingPromise.selectionDlg.clickRecordButton()); 31 recordingPromise.selectionDlg.clickRecordButton());
32 return ['a', 'b', 'c']; 32 return ['a', 'b', 'c'];
33 }); 33 });
34 mock.expectRequest('beginRecording', function(recordingOptions) { 34 mock.expectRequest('beginRecording', function(recordingOptions) {
35 assert.typeOf(recordingOptions.categoryFilter, 'string'); 35 assert.typeOf(recordingOptions.included_categories, 'array');
36 assert.typeOf(recordingOptions.useSystemTracing, 'boolean'); 36 assert.typeOf(recordingOptions.excluded_categories, 'array');
37 assert.typeOf(recordingOptions.useSampling, 'boolean'); 37 assert.typeOf(recordingOptions.enable_systrace, 'boolean');
38 assert.typeOf(recordingOptions.tracingRecordMode, 'string'); 38 assert.typeOf(recordingOptions.record_mode, 'string');
39 tr.b.timeout(10).then(() => 39 tr.b.timeout(10).then(() =>
40 recordingPromise.progressDlg.clickStopButton()); 40 recordingPromise.progressDlg.clickStopButton());
41 return ''; 41 return '';
42 }); 42 });
43 mock.expectRequest('endRecording', function(data) { 43 mock.expectRequest('endRecording', function(data) {
44 return JSON.stringify(testData); 44 return JSON.stringify(testData);
45 }); 45 });
46 46
47 const recordingPromise = tr.ui.e.about_tracing.beginRecording(mock); 47 const recordingPromise = tr.ui.e.about_tracing.beginRecording(mock);
48 48
49 return recordingPromise.then(function(data) { 49 return recordingPromise.then(function(data) {
50 mock.assertAllRequestsHandled(); 50 mock.assertAllRequestsHandled();
51 assert.strictEqual(data, JSON.stringify(testData)); 51 assert.strictEqual(data, JSON.stringify(testData));
52 }, function(error) { 52 }, function(error) {
53 assert.fail(error); 53 assert.fail(error);
54 }); 54 });
55 }); 55 });
56 }); 56 });
57 </script> 57 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698