Backed out changeset acc254692008 (bug 1124536) for xpcshell bustage on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Wed, 11 Feb 2015 14:44:16 -0800
changeset 242524 1821e8426f636de03e540e19645344eed6387433
parent 242523 aa618f42c5a61f25423d59eebbcac0dfb5b33b35
child 242525 e1af04992cfb81ec7daaa7990fa586daa3089872
push id660
push usermichael.l.comella@gmail.com
push dateThu, 12 Feb 2015 18:55:31 +0000
bugs1124536
milestone38.0a1
backs outacc254692008fcf3ad1603c9bbeadc5e504e2535
Backed out changeset acc254692008 (bug 1124536) for xpcshell bustage on a CLOSED TREE
browser/devtools/debugger/test/browser.ini
browser/devtools/debugger/test/browser_dbg_sources-pagemod.js
browser/devtools/debugger/test/doc_script-pagemod.html
toolkit/devtools/server/actors/script.js
--- a/browser/devtools/debugger/test/browser.ini
+++ b/browser/devtools/debugger/test/browser.ini
@@ -81,17 +81,16 @@ support-files =
   doc_random-javascript.html
   doc_recursion-stack.html
   doc_same-line-functions.html
   doc_scope-variable.html
   doc_scope-variable-2.html
   doc_scope-variable-3.html
   doc_scope-variable-4.html
   doc_script-eval.html
-  doc_script-pagemod.html
   doc_script-switching-01.html
   doc_script-switching-02.html
   doc_split-console-paused-reload.html
   doc_step-out.html
   doc_terminate-on-tab-close.html
   doc_tracing-01.html
   doc_watch-expressions.html
   doc_watch-expression-button.html
@@ -409,18 +408,16 @@ skip-if = e10s && debug
 [browser_dbg_sources-eval-01.js]
 skip-if = e10s && debug
 [browser_dbg_sources-eval-02.js]
 skip-if = e10s && debug
 [browser_dbg_sources-labels.js]
 skip-if = e10s && debug
 [browser_dbg_sources-sorting.js]
 skip-if = e10s && debug
-[browser_dbg_sources-pagemod.js]
-skip-if = e10s && debug
 [browser_dbg_split-console-paused-reload.js]
 skip-if = e10s && debug
 [browser_dbg_stack-01.js]
 skip-if = e10s && debug
 [browser_dbg_stack-02.js]
 skip-if = e10s && debug
 [browser_dbg_stack-03.js]
 skip-if = e10s # TODO
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_sources-pagemod.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure eval scripts appear in the source list
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-pagemod.html";
-
-const pagemod = require("sdk/page-mod");
-const CONTENT_SCRIPT_CODE = "console.log('page-mod executed');";
-
-
-let testPageMod = pagemod.PageMod({
-  include: TAB_URL,
-  contentScript: CONTENT_SCRIPT_CODE
-});
-
-let destroyTestPageMod = testPageMod.destroy.bind(testPageMod);
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gSources, gBreakpoints;
-
-  initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gBreakpoints = gDebugger.DebuggerController.Breakpoints;
-
-    return Task.spawn(function*() {
-      let waitForSource =  waitForDebuggerEvents(gPanel, gPanel.panelWin.EVENTS.SOURCES_ADDED, 1);
-
-      // NOTE: devtools debugger panel needs to be already open,
-      // or the pagemod script will not be shown in the sources panel
-      callInTab(gTab, "reloadTab");
-
-      yield waitForSource;
-      is(gSources.values.length, 3, "Should have 3 source");
-
-      let item = gSources.getItemForAttachment(e => {
-        return e.label.indexOf("javascript:") === 0;
-      });
-      ok(item, "Source label is incorrect.");
-
-      yield selectSourceAndGetBlackBoxButton(gPanel, "javascript:" + CONTENT_SCRIPT_CODE);
-
-      let res = yield promiseInvoke(gDebugger.DebuggerController.client,
-                                gDebugger.DebuggerController.client.request,
-                                { to: item.value, type: "source"});
-
-      ok(res && res.source == CONTENT_SCRIPT_CODE, "SourceActor reply received");
-      is(res.source, CONTENT_SCRIPT_CODE, "source is correct");
-      is(res.contentType, "text/javascript", "contentType is correct");
-
-      yield closeDebuggerAndFinish(gPanel);
-    }).then(destroyTestPageMod, destroyTestPageMod);
-  });
-}
deleted file mode 100644
--- a/browser/devtools/debugger/test/doc_script-pagemod.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!-- Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/ -->
-<!doctype html>
-
-<html>
-  <head>
-    <meta charset="utf-8"/>
-    <title>Debugger test page</title>
-  </head>
-
-  <body>
-    <script>function reloadTab() { window.location.reload(); }</script>
-  </body>
-</html>
--- a/toolkit/devtools/server/actors/script.js
+++ b/toolkit/devtools/server/actors/script.js
@@ -5309,24 +5309,16 @@ ThreadSources.prototype = {
         if (urlInfo.fileExtension === "html") {
           spec.isInlineSource = true;
         }
         else if (urlInfo.fileExtension === "js") {
           spec.contentType = "text/javascript";
         }
       } catch(ex) {
         // Not a valid URI.
-
-        // bug 1124536: fix getSourceText on scripts associated "javascript:SOURCE" urls
-        // (e.g. 'evaluate(sandbox, sourcecode, "javascript:"+sourcecode)' )
-        if (url.indexOf("javascript:") === 0) {
-          spec.contentType = "text/javascript";
-        } else {
-          console.warn("unable to parse url during SourceActor type detection", url, ex);
-        }
       }
     }
     else {
       // Assume the content is javascript if there's no URL
       spec.contentType = "text/javascript";
     }
 
     return this.source(spec);