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

Unified Diff: LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html

Issue 1345103005: Unflake inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
Index: LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
diff --git a/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html b/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
index b4d8a60737e0ad0e6121427e26ef4ba8c86e46c1..f167b2ed4577777a228884fb8c24c0aa1acb1533 100644
--- a/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
+++ b/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
@@ -29,13 +29,30 @@ var test = function()
if (!counter) {
//Both breakpoints are resolved before reload
InspectorTest.dumpBreakpointSidebarPane("Breakpoints before reload:");
- InspectorTest.addSniffer(WebInspector.CompilerScriptMapping.prototype, "_sourceMapLoaded", onSourceMapLoaded);
+ waitForBreakpoints();
InspectorTest.reloadPage(onPageReloaded);
}
}
+
+ function waitForBreakpoints()
+ {
+ var breakpointAddCounter = 2;
+ var jsBreakpoints = WebInspector.panels.sources.sidebarPanes.jsBreakpoints;
+ jsBreakpoints.didReceiveBreakpointLineForTest = function(uiSourceCode)
+ {
+ if (WebInspector.CompilerScriptMapping.StubProjectID === uiSourceCode.project().id())
+ return;
+ --breakpointAddCounter;
+ if (breakpointAddCounter)
+ return;
+ breakpointSourcesReceived = true;
+ maybeCompleteTest();
+ }
+ }
+
}
- var sourceMapLoaded = false;
+ var breakpointSourcesReceived = false;
var pageReloaded = false;
function onPageReloaded()
@@ -44,15 +61,9 @@ var test = function()
maybeCompleteTest();
}
- function onSourceMapLoaded()
- {
- sourceMapLoaded = true;
- maybeCompleteTest();
- }
-
function maybeCompleteTest()
{
- if (!pageReloaded || !sourceMapLoaded)
+ if (!pageReloaded || !breakpointSourcesReceived)
return;
InspectorTest.dumpBreakpointSidebarPane("Breakpoints after reload:");
InspectorTest.completeDebuggerTest();

Powered by Google App Engine
This is Rietveld 408576698