Backed out 3 changesets (bug 1202663) for Wr bustage a=backout
authorWes Kocher <wkocher@mozilla.com>
Mon, 19 Oct 2015 09:52:17 -0700
changeset 296511 ffa9e4184d55a68ffbc86d817e8764ddd81282cf
parent 296510 c2d1c0fe2e8d9e661636696b7eca5bcf09d30d49
child 296512 542dfaef09d09087168b0a07bea9075cf4e7d822
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1202663
milestone43.0a2
backs outcfaf54890d17918288e0b3b42936bcbbf07e45b4
4149b264250c134387df66ba5c2a2be6316aafc1
c615a2e6b269c268e62e08460c42fa3e00cde229
Backed out 3 changesets (bug 1202663) for Wr bustage a=backout CLOSED TREE Backed out changeset cfaf54890d17 (bug 1202663) Backed out changeset 4149b264250c (bug 1202663) Backed out changeset c615a2e6b269 (bug 1202663)
testing/marionette/driver.js
testing/marionette/listener.js
testing/web-platform/meta/html/editing/the-hidden-attribute/hidden-2.svg.ini
testing/web-platform/meta/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped.html.ini
testing/web-platform/meta/html/semantics/text-level-semantics/the-bdo-element/bdo-override.html.ini
testing/web-platform/meta/html/semantics/text-level-semantics/the-br-element/br-bidi.html.ini
testing/web-platform/meta/shadow-dom/untriaged/shadow-trees/text-decoration-001.html.ini
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2519,18 +2519,16 @@ GeckoDriver.prototype.clearImportedScrip
  *     Reference to a web element.
  * @param {string} highlights
  *     List of web elements to highlight.
  *
  * @return {string}
  *     PNG image encoded as base64 encoded string.
  */
 GeckoDriver.prototype.takeScreenshot = function(cmd, resp) {
-  let {id, highlights, full} = cmd.parameters;
-
   switch (this.context) {
     case Context.CHROME:
       let win = this.getCurrentWindow();
       let canvas = win.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
       let doc;
       if (this.appName == "B2G") {
         doc = win.document.body;
       } else {
@@ -2563,17 +2561,20 @@ GeckoDriver.prototype.takeScreenshot = f
       context.scale(scale, scale);
       context.drawWindow(win, 0, 0, width, height, "rgb(255,255,255)", flags);
       let dataUrl = canvas.toDataURL("image/png", "");
       let data = dataUrl.substring(dataUrl.indexOf(",") + 1);
       resp.body.value = data;
       break;
 
     case Context.CONTENT:
-      return this.listener.takeScreenshot(id, highlights, full);
+      resp.body.value = yield this.listener.takeScreenshot({
+        id: cmd.parameters.id,
+        highlights: cmd.parameters.highlights,
+        full: cmd.parameters.full});
       break;
   }
 };
 
 /**
  * Get the current browser orientation.
  *
  * Will return one of the valid primary orientation values
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -211,17 +211,16 @@ var findElementContentFn = dispatch(find
 var findElementsContentFn = dispatch(findElementsContent);
 var isElementSelectedFn = dispatch(isElementSelected);
 var clearElementFn = dispatch(clearElement);
 var isElementDisplayedFn = dispatch(isElementDisplayed);
 var getElementValueOfCssPropertyFn = dispatch(getElementValueOfCssProperty);
 var switchToShadowRootFn = dispatch(switchToShadowRoot);
 var getCookiesFn = dispatch(getCookies);
 var singleTapFn = dispatch(singleTap);
-var takeScreenshotFn = dispatch(takeScreenshot);
 
 /**
  * Start all message listeners
  */
 function startListeners() {
   addMessageListenerId("Marionette:receiveFiles", receiveFiles);
   addMessageListenerId("Marionette:newSession", newSession);
   addMessageListenerId("Marionette:executeScript", executeScript);
@@ -256,17 +255,17 @@ function startListeners() {
   addMessageListenerId("Marionette:switchToFrame", switchToFrame);
   addMessageListenerId("Marionette:switchToShadowRoot", switchToShadowRootFn);
   addMessageListenerId("Marionette:deleteSession", deleteSession);
   addMessageListenerId("Marionette:sleepSession", sleepSession);
   addMessageListenerId("Marionette:emulatorCmdResult", emulatorCmdResult);
   addMessageListenerId("Marionette:importScript", importScript);
   addMessageListenerId("Marionette:getAppCacheStatus", getAppCacheStatus);
   addMessageListenerId("Marionette:setTestName", setTestName);
-  addMessageListenerId("Marionette:takeScreenshot", takeScreenshotFn);
+  addMessageListenerId("Marionette:takeScreenshot", takeScreenshot);
   addMessageListenerId("Marionette:addCookie", addCookie);
   addMessageListenerId("Marionette:getCookies", getCookiesFn);
   addMessageListenerId("Marionette:deleteAllCookies", deleteAllCookies);
   addMessageListenerId("Marionette:deleteCookie", deleteCookie);
 }
 
 /**
  * Used during newSession and restart, called to set up the modal dialog listener in b2g
@@ -360,17 +359,17 @@ function deleteSession(msg) {
   removeMessageListenerId("Marionette:switchToFrame", switchToFrame);
   removeMessageListenerId("Marionette:switchToShadowRoot", switchToShadowRootFn);
   removeMessageListenerId("Marionette:deleteSession", deleteSession);
   removeMessageListenerId("Marionette:sleepSession", sleepSession);
   removeMessageListenerId("Marionette:emulatorCmdResult", emulatorCmdResult);
   removeMessageListenerId("Marionette:importScript", importScript);
   removeMessageListenerId("Marionette:getAppCacheStatus", getAppCacheStatus);
   removeMessageListenerId("Marionette:setTestName", setTestName);
-  removeMessageListenerId("Marionette:takeScreenshot", takeScreenshotFn);
+  removeMessageListenerId("Marionette:takeScreenshot", takeScreenshot);
   removeMessageListenerId("Marionette:addCookie", addCookie);
   removeMessageListenerId("Marionette:getCookies", getCookiesFn);
   removeMessageListenerId("Marionette:deleteAllCookies", deleteAllCookies);
   removeMessageListenerId("Marionette:deleteCookie", deleteCookie);
   if (isB2G) {
     content.removeEventListener("mozbrowsershowmodalprompt", modalHandler, false);
   }
   elementManager.reset();
@@ -1998,87 +1997,94 @@ function importScript(msg) {
  * Takes a screen capture of the given web element if <code>id</code>
  * property exists in the message's JSON object, or if null captures
  * the bounding box of the current frame.
  *
  * If given an array of web element references in
  * <code>msg.json.highlights</code>, a red box will be painted around
  * them to highlight their position.
  */
-function takeScreenshot(id, highlights, full) {
+function takeScreenshot(msg) {
   let node = null;
-  if (id) {
-    node = elementManager.getKnownElement(id, curContainer)
-  } else {
+  if (msg.json.id) {
+    try {
+      node = elementManager.getKnownElement(msg.json.id, curContainer)
+    }
+    catch (e) {
+      sendResponse(e.message, e.code, e.stack, msg.json.command_id);
+      return;
+    }
+  }
+  else {
     node = curContainer.frame;
   }
+  let highlights = msg.json.highlights;
 
-  let document = curContainer.frame.document;
-  let rect, win, width, height, left, top;
-
+  var document = curContainer.frame.document;
+  var rect, win, width, height, left, top;
   // node can be either a window or an arbitrary DOM node
   if (node == curContainer.frame) {
     // node is a window
     win = node;
-    if (full) {
+    if (msg.json.full) {
       // the full window
       width = document.body.scrollWidth;
       height = document.body.scrollHeight;
       top = 0;
       left = 0;
-    } else {
+    }
+    else {
       // only the viewport
       width = document.documentElement.clientWidth;
       height = document.documentElement.clientHeight;
       left = curContainer.frame.pageXOffset;
       top = curContainer.frame.pageYOffset;
     }
-  } else {
+  }
+  else {
     // node is an arbitrary DOM node
     win = node.ownerDocument.defaultView;
     rect = node.getBoundingClientRect();
     width = rect.width;
     height = rect.height;
     top = rect.top;
     left = rect.left;
   }
 
-  let canvas = document.createElementNS(
-      "http://www.w3.org/1999/xhtml", "canvas");
+  var canvas = document.createElementNS("http://www.w3.org/1999/xhtml",
+                                        "canvas");
   canvas.width = width;
   canvas.height = height;
-  let ctx = canvas.getContext("2d");
-
-  // draws the DOM contents of the window to the canvas
+  var ctx = canvas.getContext("2d");
+  // Draws the DOM contents of the window to the canvas
   ctx.drawWindow(win, left, top, width, height, "rgb(255,255,255)");
 
-  // this section is for drawing a red rectangle around each element
+  // This section is for drawing a red rectangle around each element
   // passed in via the highlights array
   if (highlights) {
     ctx.lineWidth = "2";
     ctx.strokeStyle = "red";
     ctx.save();
 
     for (var i = 0; i < highlights.length; ++i) {
-      let elem = elementManager.getKnownElement(highlights[i], curContainer);
+      var elem = elementManager.getKnownElement(highlights[i], curContainer);
       rect = elem.getBoundingClientRect();
 
-      let offsetY = -top;
-      let offsetX = -left;
+      var offsetY = -top;
+      var offsetX = -left;
 
-      // draw the rectangle
-      ctx.strokeRect(
-          rect.left + offsetX,
-          rect.top + offsetY,
-          rect.width,
-          rect.height);
+      // Draw the rectangle
+      ctx.strokeRect(rect.left + offsetX,
+                     rect.top + offsetY,
+                     rect.width,
+                     rect.height);
     }
   }
 
-  // return the Base64 encoded string back to the client
-  // so that it can save the file to disk if it is required
-  let dataUrl = canvas.toDataURL("image/png", "");
-  let encoded = dataUrl.substring(dataUrl.indexOf(",") + 1);
-  return encoded;
+  // Return the Base64 encoded string back to the client so that it
+  // can save the file to disk if it is required
+  var dataUrl = canvas.toDataURL("image/png", "");
+  var data = dataUrl.substring(dataUrl.indexOf(",") + 1);
+  sendResponse({value: data}, msg.json.command_id);
 }
 
 // Call register self when we get loaded
 registerSelf();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/editing/the-hidden-attribute/hidden-2.svg.ini
@@ -0,0 +1,3 @@
+[hidden-2.svg]
+  type: reftest
+  expected: TIMEOUT
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped.html.ini
@@ -0,0 +1,5 @@
+[bdi-neutral-wrapped.html]
+  type: reftest
+  expected:
+    if (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
+    if (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/text-level-semantics/the-bdo-element/bdo-override.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[bdo-override.html]
-  type: reftest
-  expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/text-level-semantics/the-br-element/br-bidi.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[br-bidi.html]
-  type: reftest
-  expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/shadow-dom/untriaged/shadow-trees/text-decoration-001.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[text-decoration-001.html]
-  type: reftest
-  expected: FAIL