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: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js

Issue 2842843003: DevTools: Display product information in ConsoleContextSelector (Closed)
Patch Set: f 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-context-selector.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d23a82e3d1d1e83ca0ecc3623833b583a1a89f77 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._list._items) {
+ 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)
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-context-selector.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698