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

Unified Diff: third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-after-profiling.html

Issue 1957303003: [DevTools] Fix InspectorOverlay breakage after suspend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-after-profiling-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-after-profiling.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-shadow-text.html b/third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-after-profiling.html
similarity index 59%
copy from third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-shadow-text.html
copy to third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-after-profiling.html
index b181dd427f217a482db266ac863f96f2214cdb61..9381c1dbfd146c695861361124d7754e00cfa260 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-shadow-text.html
+++ b/third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-after-profiling.html
@@ -2,34 +2,33 @@
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/elements-test.js"></script>
-
<script>
function click()
{
- var target = document.getElementById("host");
+ var target = document.getElementById("inspected");
var rect = target.getBoundingClientRect();
// Simulate the mouse click over the target to trigger an event dispatch.
- if (window.eventSender) {
- window.eventSender.mouseMoveTo(rect.left + 10, rect.top + 10);
- window.eventSender.mouseDown();
- window.eventSender.mouseUp();
- }
+ eventSender.mouseMoveTo(rect.left + 10, rect.top + 10);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
}
function test()
{
- InspectorTest.domModel.setInspectMode(DOMAgent.InspectMode.SearchForNode, step2);
+ InspectorTest.cpuProfilerModel.startRecording();
+ InspectorTest.cpuProfilerModel.stopRecording();
+ InspectorTest.domModel.setInspectMode(DOMAgent.InspectMode.SearchForNode, clickAtInspected);
- function step2()
+ function clickAtInspected()
{
- InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged, step3);
+ InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged, dumpAndFinish);
InspectorTest.evaluateInPage("click()");
}
- function step3()
+ function dumpAndFinish()
{
- InspectorTest.firstElementsTreeOutline().removeEventListener(WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged, step3);
+ InspectorTest.firstElementsTreeOutline().removeEventListener(WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged, dumpAndFinish);
var selectedElement = InspectorTest.firstElementsTreeOutline().selectedTreeElement;
InspectorTest.addResult("Node selected: " + selectedElement.node().getAttribute("id"));
InspectorTest.completeTest();
@@ -40,15 +39,9 @@ function test()
</head>
<body onload="runTest()">
-
-<p>Test that devtools can inspect text element under shadow root.</p>
-
-<div><div><div id="host"></div></div></div>
-<script>
- var host = document.querySelector('#host');
- var sr = host.createShadowRoot();
- sr.innerHTML = "Text Text Text<br>Text Text Text";
-</script>
-
+<p>
+Tests that inspect mode works after profiling start/stop.
+</p>
+<div id="inspected" style="width:100px;height:100px;"></div>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/inspect-mode-after-profiling-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698