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

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

Issue 586103004: Implement ChromeVox next/previous line, link, and heading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Address comments. Created 6 years, 2 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/testing/chromevox_unittest_base.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
(Empty)
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
3 // found in the LICENSE file.
4
5 // Common testing utilities.
6
7 /**
8 * Shortcut for document.getElementById.
9 * @param {string} id of the element.
10 * @return {HTMLElement} with the id.
11 */
12 function $(id) {
13 return document.getElementById(id);
14 }
15
16 /**
17 * @constructor
18 */
19 var TestUtils = function() {};
20
21 /**
22 * Extracts some inlined html encoded as a comment inside a function,
23 * so you can use it like this:
24 *
25 * this.appendDoc(function() {/*!
26 * <p>Html goes here</p>
27 * * /});
28 *
29 * @param {Function} commentEncodedHtml The html , embedded as a
30 * comment inside an anonymous function - see example, above.
31 * @return {string} The html text.
32 */
33 TestUtils.extractHtmlFromCommentEncodedString = function(commentEncodedHtml) {
34 return commentEncodedHtml.toString().
35 replace(/^[^\/]+\/\*!?/, '').
36 replace(/\*\/[^\/]+$/, '');
37 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/testing/chromevox_unittest_base.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698