aboutsummaryrefslogtreecommitdiff
path: root/catapult/third_party/polymer/components/shadycss/tests/scoping-api.html
diff options
context:
space:
mode:
authorWei Wang <wvw@google.com>2020-08-05 13:26:00 -0700
committerWei Wang <wvw@google.com>2020-08-05 13:34:28 -0700
commit8be73e4796dddc52e141edcee353a7e7f1d07021 (patch)
tree8a0d6fd78eb610653f12ded770595c80f1e89a61 /catapult/third_party/polymer/components/shadycss/tests/scoping-api.html
parent706249e9ec9e10c6c48508b7f84315104a3ff990 (diff)
downloadchromium-trace-8be73e4796dddc52e141edcee353a7e7f1d07021.tar.gz
Update catapult to latest version (6dacd170b)
git log --oneline --no-merges cad35e22d..6dacd170b tracing systrace 6dacd170b trace-viewer: Add polyfill to systrace viewer 8af044eac [v8][wasm] Introduce metric for compilation tierup ade0fed37 metrics: Add diagnostics to console error metric 59d6160bf [v8][wasm] Centralize collection of events for wasm metrics 9a983c5e0 [ftrace importer] Add thermal parser 49d9f039e [v8][wasm] Introduce metric for baseline streaming compilation 4dd7f16b5 catapult: Rename black_list/white_list in presubmit a207ab60c trace_viewer: Make links open in new tab 72669fe03 telemetry: Allow benchmarks to add an info blurb 0c87b3242 heap: Add metric for time that cannot be moved to concurrent thread 7bb44abcc [trace-viewer] Fix custom filename when saving traces 2e401eea3 [rendering] Report only the average for thread-times metrics. 32ec2ce70 [v8] Add first wasm metric for instantiation de622ae39 [rendering] Remove breakdowns for cpu-time metrics. c4dd7047a atrace_agent: Support /sys/kernel/tracing e6867ba7c Peak Gpu Memory Ablation Telemetry fbbd9ca81 rendering: Fix alerts for dropped frames. 9d178021d [tracing] Add Ampere-hour unit to histogram proto format 2755b192a Add more helpful error message when unit is not found 69e9be866 [tracing] Add Ampere-hour unit f773e05e5 Remove the pipeline metrics and visualization charts e5247fccd tracing: Fix suggested save filename for protobuf traces 4e00dc571 tracing: Add rudimentary protobuf trace support 03e7ff403 Fix events clashing cd6894f0a Fix slice interleaving bug 1e4bfa556 gc_metric: Add scavenger stack survival metrics 06f14d9d4 Reland "Reland "Refractor out ts_proxy_server and webpagereplay_go_server to py_utils."" eda74a743 [Tracing] Support None value in _variance in RunningStatistics c5ffb2104 Revert "Reland "Refractor out ts_proxy_server and webpagereplay_go_server to py_utils."" cd56abf06 Reland "Refractor out ts_proxy_server and webpagereplay_go_server to py_utils." f00e7afd3 Added new tracing category presets d06fd11a1 Revert "Refractor out ts_proxy_server and webpagereplay_go_server to py_utils." 7e5acd6c9 Refractor out ts_proxy_server and webpagereplay_go_server to py_utils. 953cd08e7 [metrics] Implement Total Blocking Time metric ee5bb39ff [tracing] Change TTI metric to use FCP as start point 297fffa49 Add origin trial token for tests e9a5bd129 rendering: Add a metric for total cpu/wall time ratio. 27d7ac2c1 rendering: Add a missing param. 3999e2615 rendering benchmark: Some no-op cleanups. c72a211d0 Update the default systrace tags to the recommended Android defaults. 910f6c87a [catapult] Update message loop start time event name. 504782cdb [trace-viewer] Speed up rendering 1be7dc685 [trace-viewer] Speed up rendering (part 2) a0519c673 [systrace] Change the count for new HTML format 438ea30dc [systrace] Add android_cgroup_agent a8bbccaab Remove histogram proto JSON converter code. 8351d2182 [Catapult] Remove myself from OWNERS. 4a1f482cf [tracing] Ignore renderers without mainThread when computing metrics bdb8301ab Remove some prints I accidentally left in. 6ff57586c Implement proto writing in the dashboard. 9ca9ff382 Support disabled-by-default-toplevel.flow to toplevel.flow rename 42d02fb84 [trace viewer] Speed up selection a58084c62 Make all values in the proto doubles. 786ed18d9 Move the histogram proto stub to proto/. 7004f998c Fix parsing of summary options. 329b47817 Remove the proto test driver. 27182f007 Add a small proto->JSON tool. 7ce0bb097 trace_data: Raise exceptions only after traces are added to artifacts 21c99c447 Use doubles for the histogram C++ API. e12edec0d Add method for setting summary options. 50d86304a [trace viewer] Add way to hide the polyfill warning cc6ba530a [trace viewer] Update embedder doc and example 0503911de heap: Restructure blink gc metrics 657c0f420 [trace viewer] Fix test runner under polyfill 0d19767dc [results.html] Add webcomponents v0 polyfill to results.html 3b3069e9b [trace viewer] Fix a number of broken features under polyfill cb90cdd77 [trace viewer] Fix keyboard navigation under polyfill cc6825061 [trace viewer] Enable Webcomponents V0 Polyfill 601fc962a Add origin trial token for 127.0.0.1:8003 ea794b87a Teaching histograms to deserialize from protos. 3403d9601 Remove UE bucketing in runtimeStatsTotalMetric 0b016536a trace_data: fix typo in error message 9769628aa Use auto instead of google::protobuf in the histogram C++ API. b9cc8d75a Fix gn gen --check breakage on the unit test target. c8ebd366b Move to protobuf lite. 5546abd6b Fix bugs where I assume some optional fields were required. d4405431b Add support for diagnostics and unit conversion. fada3b97d Add reserved_infos.h/cc. dd7cdd9b5 Use python 2 for trace2html 6a138fbe7 Add JSON converter and proto test driver. 13d8a54a7 heap: Adding metrics for Oilpan foreground/background marking time 32c9791b8 trace event import: Don't try to clock-translate duration values. ae4bbcda1 Avoid infinite loop in updateMajorMarkData 85c4a438f Add support for sending histogram.proto JSON to /add_histograms. debe1986c Add makefile for histogram.proto. 9506caf2e Fixed speed index computation in case of zero visible area. 69f98e5ab Implement Histogram C++ API for samples, and running statistics. b9acce749 Add rect based speed index back to loading metric. 47e7bed70 Add proto definition for the new Histograms C++ API. 903bda890 Correct LCP metric use of Map. 69cc04af2 Add navigationStart histogram to loading_metric. a61151f11 [tracing] Add khokhlov to relevant OWNERS files 731aba0ef Add a new category for shared memory in v8 8412598cc Add python inputs for tracing:generate_about_tracing 536c641b7 Update V8 runtime_stats to use different pattern for optimize background 9413ab06f Add origin trial token for local dev server f34a9d2df Add --results-label command line option to run_metric 25db8d2fb Fix breakpad symbolization of heap profiles when so is mapped from apk. 6e71a5063 [tracing] Rename 'tir_label' to 'grouping_label'. 204286b69 Make HistogramBinBoundaries creation thread-safe 28ef213de Allow filtering flow events d039ea0c1 [tracing/ui] Truncate long thread names instead of showing ellipsis 4b1db19bd trace-viewer: Avoid generating tracks when a process is hidden. a38631cd7 Log JS errors on the server bf69ed0d3 uma-metric: Specify the bins for peak gpu memory usage metric. 376ccc06c trace-viewer: Make some style changes for the toolbar. c4191602b [tracing] Add HistogramSet.Merge method e62dfe906 Add support for WebRTC internal commit ranges. 69077a26c Add ms to legacy unit infos dd2bd9ef0 [metrics] Add metrics reported by page a8bbe3b25 rendering: Remove some dead code. 54ac3634e Handle traces with process labels stripped from the metadata eb8f5aa22 Remove main_thread_scroll_latency metric c979465c5 Symbolize object type with frame name if enable "--frame-as-object-type" 77ad3c478 Add more owners for symbolizer script. f2c3c6a6a [metrics] Move filtering of GC metrics to the metrics code 9b593a340 [Tracing] Add Main-Thread histograms to runtimeStatsTotalMetric. 8e42ececc [Tracing] Remove runtimeStatsMetric 3f0606454 [tracing] Replace crouleau@ with perezju@ for owning TBMv2 and tracing tooling. 5d664a903 Fix order of timestamps dfd000a38 Add dproy as owner of tracing 900b41d09 [trace-viewer] Add support for viewing images d7d4ef32e Remove visually complete by some time metric ab8067161 Update viewport used in metric calculation b38fb99e3 Update to match new traced values naming 35d417023 Remove speed index from loading metric 3b2499a6a Adds dproy as tracing/metrics owner e46910861 [Telemetry] Add file name extensions to trace files 8bd58eb92 Update which screenshots are considered in calculating the metric Bug: 162963924 Bug: 160818586 Test: external/chromium-trace/catapult/systrace/bin/systrace -o ~/trace.html sched freq gfx hal idle power workq irq view camera thermal -b 32768 Change-Id: Ie9f01eed98f8ab80e041777202f135dae4f8646e
Diffstat (limited to 'catapult/third_party/polymer/components/shadycss/tests/scoping-api.html')
-rw-r--r--catapult/third_party/polymer/components/shadycss/tests/scoping-api.html131
1 files changed, 131 insertions, 0 deletions
diff --git a/catapult/third_party/polymer/components/shadycss/tests/scoping-api.html b/catapult/third_party/polymer/components/shadycss/tests/scoping-api.html
new file mode 100644
index 00000000..d537ed7c
--- /dev/null
+++ b/catapult/third_party/polymer/components/shadycss/tests/scoping-api.html
@@ -0,0 +1,131 @@
+<!doctype html>
+<!--
+@license
+Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+<html>
+
+<head>
+ <meta charset="utf-8">
+ <script>
+ WCT = { waitFor(cb) { window.HTMLImports.whenReady(cb) } }
+ </script>
+ <script src="./test-flags.js"></script>
+ <script src="../node_modules/wct-browser-legacy/browser.js"></script>
+ <script src="../node_modules/@webcomponents/webcomponents-platform/webcomponents-platform.js"></script>
+ <script src="../node_modules/es6-promise/dist/es6-promise.auto.min.js"></script>
+ <script src="../node_modules/@webcomponents/template/template.js"></script>
+ <script src="../node_modules/@webcomponents/html-imports/html-imports.min.js"></script>
+ <script>
+ window.ShadyDOM = {force: true}
+ </script>
+ <script src="../node_modules/@webcomponents/shadydom/shadydom.min.js"></script>
+ <script>
+ // disable document watcher
+ window.ShadyDOM.handlesDynamicScoping = true;
+ </script>
+ <script src="../node_modules/@webcomponents/custom-elements/custom-elements.min.js"></script>
+ <script src="../scoping-shim.min.js"></script>
+ <script src="../apply-shim.min.js"></script>
+ <script src="../custom-style-interface.min.js"></script>
+ <script src="module/generated/make-element.js"></script>
+</head>
+<body>
+ <template id="sync-element">
+ <style>
+ div {
+ background: rgb(255, 0, 0);
+ border: 10px solid black;
+ }
+ </style>
+ <div id="inner">Test</div>
+ </template>
+ <div id="arena"></div>
+ <script>
+ function assertComputedStyle(node, expectedValue, property = 'border-top-width') {
+ const actualValue = getComputedStyle(node).getPropertyValue(property).trim();
+ assert.equal(actualValue, expectedValue, `${property} does not have the expected value`);
+ }
+ suite('Synchronous Scoping API', function() {
+ const arena = document.querySelector('#arena');
+ const csfn = (node) => {
+ return window.ShadyCSS.ScopingShim.currentScopeForNode(node);
+ };
+ const sfn = (node) => {
+ return window.ShadyCSS.ScopingShim.scopeForNode(node);
+ };
+ const scopeNode = (node, scope) => {
+ window.ShadyCSS.ScopingShim.scopeNode(node, scope);
+ }
+ const unscopeNode = (node, scope) => {
+ window.ShadyCSS.ScopingShim.unscopeNode(node, scope);
+ }
+ let el;
+
+ suiteSetup(function() {
+ makeElement('sync-element');
+ });
+
+ setup(function() {
+ el = document.createElement('sync-element');
+ arena.appendChild(el);
+ });
+
+ teardown(function() {
+ arena.innerHTML = '';
+ });
+
+ test('mutation observer is disabled', function(done) {
+ const inner = el.shadowRoot.querySelector('#inner');
+ arena.appendChild(inner);
+ setTimeout(() => {
+ assertComputedStyle(inner, 'rgb(255, 0, 0)', 'background-color');
+ done();
+ }, 100);
+ });
+
+ test('currentScopeForNode', function() {
+ assert.equal(csfn(el), '', 'sync-scoping should be document scope');
+ const inner = el.shadowRoot.querySelector('#inner');
+ assert.equal(csfn(inner), 'sync-element', 'inner div should have sync-element scope');
+ const disconnected = document.createElement('sync-element');
+ assert.equal(csfn(disconnected), '', 'disconnected element should have a blank scope')
+ const dynamic = document.createElement('div');
+ el.shadowRoot.appendChild(dynamic);
+ assert.equal(csfn(dynamic), '', 'dynamically appended node will not be scoped yet');
+ });
+
+ test('scopeForNode', function() {
+ assert.equal(sfn(el), '', 'sync-scoping should be document scope');
+ const inner = el.shadowRoot.querySelector('#inner');
+ assert.equal(sfn(inner), 'sync-element', 'inner div should have sync-element scope');
+ const disconnected = document.createElement('sync-element');
+ assert.equal(sfn(disconnected), '', 'disconnected element should have a blank scope');
+ const dynamic = document.createElement('div');
+ el.shadowRoot.appendChild(dynamic);
+ assert.equal(sfn(dynamic), 'sync-element', 'dynamically created node should have sync-element scope');
+ });
+
+ test('scopeNode', function() {
+ const div = document.createElement('div');
+ el.shadowRoot.appendChild(div);
+ scopeNode(div, sfn(div));
+ assertComputedStyle(div, '10px');
+ assertComputedStyle(div, 'rgb(255, 0, 0)', 'background-color');
+ });
+
+ test('unscopeNode', function() {
+ const inner = el.shadowRoot.querySelector('#inner');
+ arena.appendChild(inner);
+ unscopeNode(inner, csfn(inner));
+ assertComputedStyle(inner, '0px');
+ });
+ });
+ </script>
+</body>
+</html> \ No newline at end of file