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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js

Issue 2842843003: DevTools: Display product information in ConsoleContextSelector (Closed)
Patch Set: cleanup Created 3 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
Index: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
index 20016947a011603c8af0655944e24589838525b9..c023af8a9edbb59d1c0224427042924d8a6a7892 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
@@ -394,19 +394,14 @@ InspectorTest.waitUntilNthMessageReceivedPromise = function(count)
InspectorTest.changeExecutionContext = function(namePrefix)
{
- var selector = Console.ConsoleView.instance()._consoleContextSelector._selectElement;
- var option = selector.firstChild;
- while (option) {
- if (option.textContent && option.textContent.trim().startsWith(namePrefix))
- break;
- option = option.nextSibling;
- }
- if (!option) {
- InspectorTest.addResult("FAILED: context with prefix: " + namePrefix + " not found in the context list");
- return;
+ var selector = Console.ConsoleView.instance()._consoleContextSelector;
+ for (var executionContext of selector._executionContexts) {
+ if (selector._titleFor(executionContext).startsWith(namePrefix)) {
+ UI.context.setFlavor(SDK.ExecutionContext, executionContext);
+ return;
+ }
}
- option.selected = true;
- Console.ConsoleView.instance()._consoleContextSelector._executionContextChanged();
+ InspectorTest.addResult("FAILED: context with prefix: " + namePrefix + " not found in the context list");
}
InspectorTest.waitForConsoleMessages = function(expectedCount, callback)

Powered by Google App Engine
This is Rietveld 408576698