Bug 1338340 - Modernize browser_bug435035.js. r=nhnt11 draft
authorJohann Hofmann <jhofmann@mozilla.com>
Mon, 29 May 2017 15:58:27 +0200
changeset 585976 7ad9b3e9902090b8f6a6e7b1f604c76b579a569b
parent 585921 cce4d83d2b99ffedbd67a2f40ce26e53e9ae27ab
child 630846 f194685213b266cac03b54d9bab2d481f0e6c01f
push id61248
push userbmo:jhofmann@mozilla.com
push dateMon, 29 May 2017 13:58:47 +0000
reviewersnhnt11
bugs1338340, 435035
milestone55.0a1
Bug 1338340 - Modernize browser_bug435035.js. r=nhnt11 MozReview-Commit-ID: CBcVE70rkQE
browser/base/content/test/siteIdentity/browser.ini
browser/base/content/test/siteIdentity/browser_bug435035.js
browser/base/content/test/siteIdentity/browser_mixed_passive_content_indicator.js
browser/base/content/test/siteIdentity/simple_mixed_passive.html
browser/base/content/test/siteIdentity/test_bug435035.html
--- a/browser/base/content/test/siteIdentity/browser.ini
+++ b/browser/base/content/test/siteIdentity/browser.ini
@@ -1,16 +1,13 @@
 [DEFAULT]
 support-files =
   head.js
   !/image/test/mochitest/blue.png
 
-[browser_bug435035.js]
-support-files =
-  test_bug435035.html
 [browser_bug822367.js]
 tags = mcb
 support-files =
   file_bug822367_1.html
   file_bug822367_1.js
   file_bug822367_2.html
   file_bug822367_3.html
   file_bug822367_4.html
@@ -61,16 +58,20 @@ support-files =
   test_mcb_redirect_image.html
   test_mcb_double_redirect_image.html
   test_mcb_redirect.js
   test_mcb_redirect.sjs
 [browser_mixed_content_cert_override.js]
 tags = mcb
 support-files =
   test-mixedcontent-securityerrors.html
+[browser_mixed_passive_content_indicator.js]
+tags = mcb
+support-files =
+  simple_mixed_passive.html
 [browser_mixedcontent_securityflags.js]
 tags = mcb
 support-files =
   test-mixedcontent-securityerrors.html
 [browser_mixedContentFramesOnHttp.js]
 tags = mcb
 support-files =
   file_mixedContentFramesOnHttp.html
rename from browser/base/content/test/siteIdentity/browser_bug435035.js
rename to browser/base/content/test/siteIdentity/browser_mixed_passive_content_indicator.js
--- a/browser/base/content/test/siteIdentity/browser_bug435035.js
+++ b/browser/base/content/test/siteIdentity/browser_mixed_passive_content_indicator.js
@@ -1,17 +1,9 @@
-const TEST_URL = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "https://example.com") + "test_bug435035.html";
+const TEST_URL = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "https://example.com") + "simple_mixed_passive.html";
 
-function test() {
-  waitForExplicitFinish();
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
+add_task(async function test_mixed_passive_content_indicator() {
+  await BrowserTestUtils.withNewTab(TEST_URL, function() {
     is(document.getElementById("identity-box").className,
        "unknownIdentity mixedDisplayContent",
        "identity box has class name for mixed content");
-
-    gBrowser.removeCurrentTab();
-    finish();
   });
-
-  gBrowser.loadURI(TEST_URL);
-}
+});
rename from browser/base/content/test/siteIdentity/test_bug435035.html
rename to browser/base/content/test/siteIdentity/simple_mixed_passive.html