Created
June 6, 2019 20:26
-
-
Save jasonLaster/0c8cdd5fff16e934d52857896614ca35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit c2affe998a48af0a5d89f9cc29589043cfa655da | |
Author: Jason Laster <jlaster@mozilla.com> | |
Date: Thu Jun 6 13:14:00 2019 -0400 | |
consolidate scopes | |
diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-scopes-mutations.js b/devtools/client/debugger/test/mochitest/browser_dbg-scopes-mutations.js | |
index 22902a31f43c..04e7f6c05e64 100644 | |
--- a/devtools/client/debugger/test/mochitest/browser_dbg-scopes-mutations.js | |
+++ b/devtools/client/debugger/test/mochitest/browser_dbg-scopes-mutations.js | |
@@ -1,5 +1,6 @@ | |
-/* Any copyright is dedicated to the Public Domain. | |
- * http://creativecommons.org/publicdomain/zero/1.0/ */ | |
+/* This Source Code Form is subject to the terms of the Mozilla Public | |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this | |
+ * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ | |
function getScopeNodeLabel(dbg, index) { | |
return findElement(dbg, "scopeNode", index).innerText; | |
@@ -22,7 +23,7 @@ function expandNode(dbg, index) { | |
add_task(async function() { | |
const dbg = await initDebugger("doc-script-mutate.html"); | |
- let onPaused = waitForPaused(dbg); | |
+ const onPaused = waitForPaused(dbg); | |
invokeInTab("mutate"); | |
await onPaused; | |
await waitForSelectedSource(dbg, "script-mutate"); | |
@@ -33,41 +34,41 @@ add_task(async function() { | |
'The second element in the scope panel is "<this>"' | |
); | |
is( | |
- getScopeNodeLabel(dbg, 3), | |
+ getScopeNodeLabel(dbg, 4), | |
"phonebook", | |
'The third element in the scope panel is "phonebook"' | |
); | |
info("Expand `phonebook`"); | |
- await expandNode(dbg, 3); | |
+ await expandNode(dbg, 4); | |
is( | |
- getScopeNodeLabel(dbg, 4), | |
+ getScopeNodeLabel(dbg, 5), | |
"S", | |
'The fourth element in the scope panel is "S"' | |
); | |
info("Expand `S`"); | |
- await expandNode(dbg, 4); | |
+ await expandNode(dbg, 5); | |
is( | |
- getScopeNodeLabel(dbg, 5), | |
+ getScopeNodeLabel(dbg, 6), | |
"sarah", | |
'The fifth element in the scope panel is "sarah"' | |
); | |
is( | |
- getScopeNodeLabel(dbg, 6), | |
+ getScopeNodeLabel(dbg, 7), | |
"serena", | |
'The sixth element in the scope panel is "serena"' | |
); | |
info("Expand `sarah`"); | |
- await expandNode(dbg, 5); | |
+ await expandNode(dbg, 6); | |
is( | |
- getScopeNodeLabel(dbg, 6), | |
+ getScopeNodeLabel(dbg, 7), | |
"lastName", | |
'The sixth element in the scope panel is now "lastName"' | |
); | |
is( | |
- getScopeNodeValue(dbg, 6), | |
+ getScopeNodeValue(dbg, 7), | |
'"Doe"', | |
'The "lastName" element has the expected "Doe" value' | |
); | |
@@ -81,7 +82,7 @@ add_task(async function() { | |
'The second element in the scope panel is "<this>"' | |
); | |
is( | |
- getScopeNodeLabel(dbg, 3), | |
+ getScopeNodeLabel(dbg, 4), | |
"phonebook", | |
'The third element in the scope panel is "phonebook"' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment