New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 709929 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Use js_template in system health story selectors

Project Member Reported by perezju@chromium.org, Apr 10 2017

Issue description

Some places are using naive string interpolation, e.g.:


  def _NavigateToItem(self, action_runner, index):
    item_selector = 'document.querySelectorAll("%s")[%d]' % (
        self.ITEM_SELECTOR, index)


https://cs.chromium.org/chromium/src/tools/perf/page_sets/system_health/browsing_stories.py?rcl=9bb7c0c57c6be13b19f47a289bafed94d55c3c45

which pushes to clients the responsibility of properly quoting strings. Clients should not need to worry about this.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4f35efc6f28e81992019d1cf7783bd02beee531

commit a4f35efc6f28e81992019d1cf7783bd02beee531
Author: Juan A. Navarro Perez <perezju@chromium.org>
Date: Fri Sep 08 14:50:18 2017

[tools/perf] Fix js templating style in browse:* stories

Use js_template in _NavigateToItem so clients do not need to worry
about string interpolation details.

Also tweak some selectors so they all use a uniform style for quotes.

Bug:  709929 
Change-Id: I7516fc401fab2959c3ccfe6e1e3578ac9772dfa6
Reviewed-on: https://chromium-review.googlesource.com/655377
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#500591}
[modify] https://crrev.com/a4f35efc6f28e81992019d1cf7783bd02beee531/tools/perf/page_sets/system_health/browsing_stories.py

Status: Fixed (was: Assigned)

Sign in to add a comment