diff options
author | Matt A. Tobin <email@mattatobin.com> | 2016-10-16 19:34:53 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2016-10-16 19:34:53 -0400 |
commit | 81805ce3f63e2e4a799bd54f174083c58a9b5640 (patch) | |
tree | 6e13374b213ac9b2ae74c25d8aac875faf71fdd0 /toolkit/devtools/webide/test/test_device_settings.html | |
parent | 28c8da71bf521bb3ee76f27b8a241919e24b7cd5 (diff) | |
download | palemoon-gre-81805ce3f63e2e4a799bd54f174083c58a9b5640.tar.gz |
Move Mozilla DevTools to Platform - Part 3: Merge the browser/devtools and toolkit/devtools adjusting for directory collisions
Diffstat (limited to 'toolkit/devtools/webide/test/test_device_settings.html')
-rw-r--r-- | toolkit/devtools/webide/test/test_device_settings.html | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/toolkit/devtools/webide/test/test_device_settings.html b/toolkit/devtools/webide/test/test_device_settings.html new file mode 100644 index 000000000..e075db4fd --- /dev/null +++ b/toolkit/devtools/webide/test/test_device_settings.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> + +<html> + + <head> + <meta charset="utf8"> + <title></title> + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"></script> + <script type="application/javascript;version=1.8" src="head.js"></script> + <script type="application/javascript;version=1.8" src="device_front_shared.js"></script> + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"> + </head> + + <body> + + <script type="application/javascript;version=1.8"> + window.onload = function() { + SimpleTest.waitForExplicitFinish(); + + Task.spawn(function*() { + Cu.import("resource://gre/modules/devtools/dbg-server.jsm"); + + if (SpecialPowers.isMainProcess()) { + Cu.import("resource://gre/modules/SettingsRequestManager.jsm"); + } + + if (!DebuggerServer.initialized) { + DebuggerServer.init(); + DebuggerServer.addBrowserActors(); + } + + let win = yield openWebIDE(); + + let settingIframe = win.document.querySelector("#deck-panel-devicesettings"); + + win.AppManager.update("runtimelist"); + + yield connectToLocalRuntime(win); + + let settings = win.document.querySelector("#cmd_showSettings"); + + ok(!settings.hasAttribute("disabled"), "device settings cmd enabled"); + + let deck = win.document.querySelector("#deck"); + + win.Cmds.showSettings(); + is(deck.selectedPanel, settingIframe, "device settings iframe selected"); + + yield nextTick(); + + yield lazyIframeIsLoaded(settingIframe); + + yield nextTick(); + + yield settingIframe.contentWindow.getAllSettings; + + setDocument(settingIframe); + + let fields = doc.querySelectorAll(".editable"); + + addNewField(); + + addNewFieldWithEnter(); + + editExistingField(); + + addNewFieldInteger(); + + yield editFieldInteger(); + + yield resetNewField("new-string-field"); + + addNewFieldBoolean(); + + searchFields(deck, "new-boolean-field2"); + + DebuggerServer.destroy(); + + yield closeWebIDE(win); + + SimpleTest.finish(); + }).then(null, e => { + ok(false, "Exception: " + e); + SimpleTest.finish(); + }); + } + </script> + </body> +</html> |