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

Issue 2829383002: PolymerTest.clearBody: don't remove vulcanized styles (Closed)

Created:
3 years, 8 months ago by michaelpg
Modified:
3 years, 7 months ago
Reviewers:
dpapad
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

PolymerTest.clearBody: don't remove vulcanized styles Vulcanize removes HTML imports of global style definitions and inlines those <style> elements directly in a special <div> on the page. Removing this <div> in tests means those <style>s go away. Without those styles, elements being tested no longer have access to the CSS variables or global style rules they expect, which can break things in all sorts of ways. This hasn't affected any tests that I know of (besides one WIP), because we don't normally test the details of our colors and layouts in tests that call PolymerTest.clearBody. But it's worth fixing regardless in order to decrease the delta between tests in vulcanized vs. unvulcanized builds. BUG=714359 R=dpapad@chromium.org Review-Url: https://codereview.chromium.org/2829383002 Cr-Commit-Position: refs/heads/master@{#469534} Committed: https://chromium.googlesource.com/chromium/src/+/2008e5c933a8a197aacc44422a65ac26c9814692

Patch Set 1 #

Total comments: 3

Patch Set 2 : simplify #

Patch Set 3 : comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M chrome/test/data/webui/polymer_browser_test_base.js View 1 2 1 chunk +6 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (11 generated)
michaelpg
Thoughts? Code would be simpler if we kept the whole div intact, and maybe that's ...
3 years, 8 months ago (2017-04-22 04:04:11 UTC) #3
dpapad
https://codereview.chromium.org/2829383002/diff/1/chrome/test/data/webui/polymer_browser_test_base.js File chrome/test/data/webui/polymer_browser_test_base.js (right): https://codereview.chromium.org/2829383002/diff/1/chrome/test/data/webui/polymer_browser_test_base.js#newcode195 chrome/test/data/webui/polymer_browser_test_base.js:195: var vulcanizeDiv = document.querySelector('body > div[hidden][by-vulcanize]'); Would it be ...
3 years, 8 months ago (2017-04-24 18:35:16 UTC) #6
dpapad
https://codereview.chromium.org/2829383002/diff/1/chrome/test/data/webui/polymer_browser_test_base.js File chrome/test/data/webui/polymer_browser_test_base.js (right): https://codereview.chromium.org/2829383002/diff/1/chrome/test/data/webui/polymer_browser_test_base.js#newcode195 chrome/test/data/webui/polymer_browser_test_base.js:195: var vulcanizeDiv = document.querySelector('body > div[hidden][by-vulcanize]'); On 2017/04/24 at ...
3 years, 8 months ago (2017-04-25 01:11:09 UTC) #7
michaelpg
If we don't care about only preserving <style> tags -- I don't see the harm ...
3 years, 7 months ago (2017-05-04 22:55:12 UTC) #10
dpapad
On 2017/05/04 at 22:55:12, michaelpg wrote: > If we don't care about only preserving <style> ...
3 years, 7 months ago (2017-05-04 23:09:48 UTC) #11
michaelpg
On 2017/05/04 23:09:48, dpapad wrote: > On 2017/05/04 at 22:55:12, michaelpg wrote: > > If ...
3 years, 7 months ago (2017-05-04 23:12:26 UTC) #12
dpapad
On 2017/05/04 at 23:12:26, michaelpg wrote: > On 2017/05/04 23:09:48, dpapad wrote: > > On ...
3 years, 7 months ago (2017-05-04 23:26:47 UTC) #13
michaelpg
On 2017/05/04 23:26:47, dpapad wrote: > On 2017/05/04 at 23:12:26, michaelpg wrote: > > On ...
3 years, 7 months ago (2017-05-04 23:59:08 UTC) #16
dpapad
On 2017/05/04 at 23:59:08, michaelpg wrote: > On 2017/05/04 23:26:47, dpapad wrote: > > On ...
3 years, 7 months ago (2017-05-05 00:00:23 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2829383002/40001
3 years, 7 months ago (2017-05-05 00:02:58 UTC) #19
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 00:10:38 UTC) #22
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/2008e5c933a8a197aacc44422a65...

Powered by Google App Engine
This is Rietveld 408576698