Commit d3b12b23 authored by Christoph Kerschbaumer's avatar Christoph Kerschbaumer
Browse files

Bug 1733333: Update tests within devtools/shared/ to work with https-first enabled r=jdescottes

parent 418f6acb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
"use strict";
/* import-globals-from ../../../../gfx/layers/apz/test/mochitest/apz_test_utils.js */

const TEST_URI = TEST_URI_ROOT + "doc_layoutHelpers_getBoxQuads2-a.html";
const TEST_URI = TEST_URI_ROOT_SSL + "doc_layoutHelpers_getBoxQuads2-a.html";

add_task(async function() {
  info("Opening a fission window.");
+2 −2
Original line number Diff line number Diff line
@@ -13,8 +13,8 @@
<div style="width:100px; height:100px; background:green"></div>

<div style="margin:20px">
<iframe id="b" style="width:250px; height:250px; border:10px solid black" src="http://test:80/browser/devtools/client/shared/test/doc_layoutHelpers_getBoxQuads2-b-and-d.html">
</iframe><iframe id="d" style="width:250px; height:250px; border:0; padding:40px" src="http://test:80/browser/devtools/client/shared/test/doc_layoutHelpers_getBoxQuads2-b-and-d.html">
<iframe id="b" style="width:250px; height:250px; border:10px solid black" src="https://example.org/browser/devtools/client/shared/test/doc_layoutHelpers_getBoxQuads2-b-and-d.html">
</iframe><iframe id="d" style="width:250px; height:250px; border:0; padding:40px" src="https://example.org/browser/devtools/client/shared/test/doc_layoutHelpers_getBoxQuads2-b-and-d.html">
</iframe>
</div>
</body>
+1 −1
Original line number Diff line number Diff line
@@ -25,5 +25,5 @@ window.onmessage = event => {
    border: 0;
  }
</style>
<iframe src="http://example.org:80/browser/devtools/client/shared/test/doc_layoutHelpers_getBoxQuads2-c-and-e.html">
<iframe src="https://test1.example.com/browser/devtools/client/shared/test/doc_layoutHelpers_getBoxQuads2-c-and-e.html">
</iframe>
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ const { DOMHelpers } = require("devtools/shared/dom-helpers");
const { Hosts } = require("devtools/client/framework/toolbox-hosts");

const TEST_URI_ROOT = "http://example.com/browser/devtools/client/shared/test/";
const TEST_URI_ROOT_SSL =
  "https://example.com/browser/devtools/client/shared/test/";
const OPTIONS_VIEW_URL = CHROME_URL_ROOT + "doc_options-view.xhtml";

const EXAMPLE_URL =
+7 −7
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

"use strict";

const TEST_RELOAD_URL = `${URL_ROOT}/inspectedwindow-reload-target.sjs`;
const TEST_RELOAD_URL = `${URL_ROOT_SSL}/inspectedwindow-reload-target.sjs`;

async function setup(pageUrl) {
  // Disable bfcache for Fission for now.
@@ -97,7 +97,7 @@ function collectEvalResults() {
}

add_task(async function test_successfull_inspectedWindowEval_result() {
  const { commands, extension, fakeExtCallerInfo } = await setup(URL_ROOT);
  const { commands, extension, fakeExtCallerInfo } = await setup(URL_ROOT_SSL);

  const result = await commands.inspectedWindowCommand.eval(
    fakeExtCallerInfo,
@@ -108,12 +108,12 @@ add_task(async function test_successfull_inspectedWindowEval_result() {
  ok(result.value, "Got a result from inspectedWindow eval");
  is(
    result.value.href,
    URL_ROOT,
    URL_ROOT_SSL,
    "Got the expected window.location.href property value"
  );
  is(
    result.value.protocol,
    "http:",
    "https:",
    "Got the expected window.location.protocol property value"
  );

@@ -126,7 +126,7 @@ add_task(async function test_successfull_inspectedWindowEval_resultAsGrip() {
    extension,
    fakeExtCallerInfo,
    webConsoleFront,
  } = await setup(URL_ROOT);
  } = await setup(URL_ROOT_SSL);

  let result = await commands.inspectedWindowCommand.eval(
    fakeExtCallerInfo,
@@ -197,7 +197,7 @@ add_task(async function test_successfull_inspectedWindowEval_resultAsGrip() {
});

add_task(async function test_error_inspectedWindowEval_result() {
  const { commands, extension, fakeExtCallerInfo } = await setup(URL_ROOT);
  const { commands, extension, fakeExtCallerInfo } = await setup(URL_ROOT_SSL);

  const result = await commands.inspectedWindowCommand.eval(
    fakeExtCallerInfo,
@@ -280,7 +280,7 @@ add_task(
);

add_task(async function test_exception_inspectedWindowEval_result() {
  const { commands, extension, fakeExtCallerInfo } = await setup(URL_ROOT);
  const { commands, extension, fakeExtCallerInfo } = await setup(URL_ROOT_SSL);

  const result = await commands.inspectedWindowCommand.eval(
    fakeExtCallerInfo,
Loading