Commit ad7c7c6b authored by Alex Rudenko's avatar Alex Rudenko Committed by Commit Bot

Fix inspector-protocol/stylesheet-tracking-restart.js

The test became flaky because it was relying on the order in which
stylesheets are created on the backend. This CL changes the test to
rely on sourceURL instead of stylesheetId (incremental) to make the
test not flaky. Drive-by: adds .cache created by clangd to .gitignore

Fixed: 1104288
Change-Id: I243d97018c2153d228f78e07bd55b625265ec8da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299219Reviewed-by: default avatarMathias Bynens <mathias@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788538}
parent e5f1d62c
...@@ -324,5 +324,8 @@ vs-chromium-project.txt ...@@ -324,5 +324,8 @@ vs-chromium-project.txt
# Ignore IntelliJ files. # Ignore IntelliJ files.
.idea/ .idea/
# Ignore cache folder created by clangd
.cache
# Ignore the default results output directory for tools/run-swarmed.py # Ignore the default results output directory for tools/run-swarmed.py
/results /results
...@@ -6858,7 +6858,6 @@ crbug.com/1104333 http/tests/devtools/bindings/inline-styles-binding.js [ Pass F ...@@ -6858,7 +6858,6 @@ crbug.com/1104333 http/tests/devtools/bindings/inline-styles-binding.js [ Pass F
crbug.com/1104910 [ Mac ] external/wpt/webaudio/the-audio-api/the-oscillatornode-interface/osc-basic-waveform.html [ Pass Failure ] crbug.com/1104910 [ Mac ] external/wpt/webaudio/the-audio-api/the-oscillatornode-interface/osc-basic-waveform.html [ Pass Failure ]
crbug.com/1104910 fast/dom/cssTarget-crash.html [ Pass Timeout Failure ] crbug.com/1104910 fast/dom/cssTarget-crash.html [ Pass Timeout Failure ]
crbug.com/1104910 fast/peerconnection/RTCPeerConnection-reload-interesting-usage.html [ Pass Failure ] crbug.com/1104910 fast/peerconnection/RTCPeerConnection-reload-interesting-usage.html [ Pass Failure ]
crbug.com/1104910 inspector-protocol/stylesheet-tracking-restart.js [ Pass Failure ]
crbug.com/1104910 [ Win ] virtual/cache-storage-eager-reading/external/wpt/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ] crbug.com/1104910 [ Win ] virtual/cache-storage-eager-reading/external/wpt/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]
crbug.com/1104910 [ Win ] http/tests/devtools/elements/styles-1/dynamic-style-tag.js [ Pass Failure ] crbug.com/1104910 [ Win ] http/tests/devtools/elements/styles-1/dynamic-style-tag.js [ Pass Failure ]
crbug.com/1104910 [ Mac10.15 ] editing/selection/selection-background.html [ Pass Failure ] crbug.com/1104910 [ Mac10.15 ] editing/selection/selection-background.html [ Pass Failure ]
......
...@@ -3,8 +3,8 @@ This test checks that if style sheet is removed between two inspector launches i ...@@ -3,8 +3,8 @@ This test checks that if style sheet is removed between two inspector launches i
Running test Running test
Opening front-end for the first time Opening front-end for the first time
Enabling CSS domain. Enabling CSS domain.
- style sheet added: foo.css
- style sheet added: bar.css - style sheet added: bar.css
- style sheet added: foo.css
Closing inspector. Closing inspector.
Removing style sheet. Removing style sheet.
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
session.protocol.DOM.enable(); session.protocol.DOM.enable();
await session.protocol.CSS.enable(); await session.protocol.CSS.enable();
var headers = {}; var headers = {};
headersAdded.sort((a, b) => a.styleSheetId - b.styleSheetId); headersAdded.sort((a, b) => a.sourceURL.localeCompare(b.sourceURL));
for (var header of headersAdded) { for (var header of headersAdded) {
headers[header.styleSheetId] = header.sourceURL; headers[header.styleSheetId] = header.sourceURL;
testRunner.log(' - style sheet added: ' + header.sourceURL); testRunner.log(' - style sheet added: ' + header.sourceURL);
......
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