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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js

Issue 2496823002: Implement word wrapping and panning in multiline Braille. (Closed)
Patch Set: Addressed David's comments Created 4 years 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Asserts that a given argument's value is undefined. 6 * Asserts that a given argument's value is undefined.
7 * @param {object} a The argument to check. 7 * @param {object} a The argument to check.
8 */ 8 */
9 function assertUndefined(a) { 9 function assertUndefined(a) {
10 if (a !== undefined) { 10 if (a !== undefined) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 * @param {string=} opt_message Message used for errors. 73 * @param {string=} opt_message Message used for errors.
74 */ 74 */
75 function assertEqualsJSON(expected, actual, opt_message) { 75 function assertEqualsJSON(expected, actual, opt_message) {
76 if (JSON.stringify(actual) !== JSON.stringify(expected)) { 76 if (JSON.stringify(actual) !== JSON.stringify(expected)) {
77 throw new Error((opt_message ? opt_message + '\n' : '') + 77 throw new Error((opt_message ? opt_message + '\n' : '') +
78 'Expected ' + JSON.stringify(expected) + '\n' + 78 'Expected ' + JSON.stringify(expected) + '\n' +
79 'Got ' + JSON.stringify(actual)); 79 'Got ' + JSON.stringify(actual));
80 } 80 }
81 } 81 }
82 82
83 /**
84 * Asserts that two ArrayBuffers have the same content.
85 * @param {ArrayBuffer} arrayBufA The expected ArrayBuffer.
86 * @param {ArrayBuffer} arrayBufB The test ArrayBuffer.
87 */
88 function assertArrayBuffersEquals(arrayBufA, arrayBufB) {
89 var view1 = new Uint8Array(arrayBufA);
90 var view2 = new Uint8Array(arrayBufB);
91 assertEquals(JSON.stringify(view1), JSON.stringify(view2));
92 }
93
94 /**
95 * Asserts that two Arrays have the same content.
96 * @param {ArrayBuffer} arrayA The expected array.
97 * @param {ArrayBuffer} arrayB The test array.
98 */
99 function assertArraysEquals(arrayA, arrayB) {
100 assertEquals(JSON.stringify(arrayA), JSON.stringify(arrayB));
101 }
102
83 assertSame = assertEquals; 103 assertSame = assertEquals;
84 assertNotSame = assertNotEquals; 104 assertNotSame = assertNotEquals;
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698