Commit 6705c68f authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[CrOS Settings] Record page Search User action metrics.

This CL records user action focus when the user creates a query that
is used to generate search results.

Bug: 1049830
Change-Id: I88e709ec0f40c7e19cf943a122d3bc4f53590b03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062640Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742937}
parent ac5683fd
......@@ -268,6 +268,7 @@ Polymer({
searchField.setValue(urlSearchQuery, true /* noEvent */);
}
settings.recordSearch();
this.$.main.searchContents(urlSearchQuery);
},
......
......@@ -270,6 +270,16 @@ TEST_F('OSSettingsUIBrowserTest', 'AllJsTests', () => {
ui.$$('#prefs').fire('user-action-setting-change');
assertEquals(userActionRecorder.settingChangeCount, 1);
});
test('userActionSearchEvent', function() {
const searchField =
/** @type {CrToolbarSearchFieldElement} */ (
ui.$$('os-toolbar').getSearchField());
assertEquals(userActionRecorder.searchCount, 0);
searchField.setValue('GOOGLE');
assertEquals(userActionRecorder.searchCount, 1);
});
});
mocha.run();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment